Author: heiko.braun(a)jboss.com
Date: 2008-10-28 09:39:17 -0400 (Tue, 28 Oct 2008)
New Revision: 2646
Added:
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/WEB-INF/
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/WEB-INF/access.properties
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/WEB-INF/classes/
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/WEB-INF/classes/messages.properties
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/WEB-INF/faces-config.xml
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/WEB-INF/jboss-web.xml
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/WEB-INF/jbpm4jsf-config.xml
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/WEB-INF/web.xml
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/images/
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/images/background.gif
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/images/bullet.gif
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/images/info.gif
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/index.jsp
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/sa/
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/sa/deployproc.xhtml
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/sa/group.xhtml
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/sa/identities.xhtml
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/sa/jobs.xhtml
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/sa/procdef.xhtml
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/sa/processes.xhtml
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/sa/procins.xhtml
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/sa/t_comments.xhtml
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/sa/t_loggedin.xhtml
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/sa/t_pager.xhtml
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/sa/t_processinstances.xhtml
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/sa/t_tasks.xhtml
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/sa/t_tokens.xhtml
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/sa/t_vars.xhtml
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/sa/task.xhtml
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/sa/tasks.xhtml
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/sa/token.xhtml
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/sa/user.xhtml
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/ua/
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/ua/jbpm.css
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/ua/login-example.xhtml
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/ua/login.xhtml
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/ua/t_base.xhtml
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/JbpmActionListener.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/JbpmJsfContext.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/CoreLibrary.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/AddCommentActionListener.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/ApplyVariableMapActionListener.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/AssignTaskActionListener.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/CancelActionListener.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/CompleteTaskActionListener.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/DeleteActionListener.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/DeployProcessActionListener.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/GetDiagramInfoActionListener.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/GetProcessLogsActionListener.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/GetTaskFormInfoActionListener.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/GetVariableActionListener.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/GetVariableMapActionListener.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/LazyJbpmActionListener.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/ListJobsActionListener.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/ListProcessInstancesActionListener.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/ListProcessesActionListener.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/ListTasksActionListener.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/ListTasksForActorActionListener.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/ListTasksForProcessActionListener.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/ListTasksForProcessInstanceActionListener.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/ListTokensActionListener.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/LoadJobActionListener.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/LoadProcessActionListener.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/LoadProcessInstanceActionListener.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/LoadTaskActionListener.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/LoadTokenActionListener.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/MoveTokenActionListener.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/RemoveVariableActionListener.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/ResumeActionListener.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/SignalActionListener.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/StartProcessActionListener.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/StartTaskActionListener.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/SuspendActionListener.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/TaskFormButtonActionListener.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/UpdateTaskStartActionListener.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/UpdateVariableActionListener.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/config/
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/config/Configuration.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/config/ConfigurationLocator.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/AbstractHandler.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/AddCommentHandler.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/ApplyVariableMapHandler.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/AssignTaskHandler.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/CancelHandler.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/CompleteTaskHandler.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/DeleteHandler.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/DeployProcessHandler.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/GetDiagramInfoHandler.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/GetProcessLogsHandler.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/GetTaskFormInfoHandler.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/GetVariableHandler.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/GetVariableMapHandler.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/IncludeProcessFileHandler.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/JbpmActionListenerHandler.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/ListJobsHandler.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/ListProcessInstancesHandler.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/ListProcessesHandler.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/ListTasksForActorHandler.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/ListTasksForProcessHandler.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/ListTasksForProcessInstanceHandler.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/ListTasksHandler.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/ListTokensHandler.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/LoadJobHandler.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/LoadProcessHandler.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/LoadProcessInstanceHandler.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/LoadTaskHandler.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/LoadTokenHandler.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/MoveTokenHandler.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/RemoveVariableHandler.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/ResumeHandler.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/SignalHandler.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/StartProcessHandler.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/StartTaskHandler.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/SuspendHandler.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/TaskFormHandler.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/UpdateTaskStartHandler.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/UpdateVariableHandler.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/impl/
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/impl/JbpmActionListenerWrapper.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/impl/JbpmJsfContextImpl.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/impl/UpdatesHashMap.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/package-info.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/phase/
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/phase/JbpmPhaseListener.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/phase/ProcessFilePhaseListener.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/ui/
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/ui/UITaskForm.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/IdentityLibrary.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/action/
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/action/AddMembershipActionListener.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/action/CreateGroupActionListener.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/action/CreateUserActionListener.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/action/DeleteGroupActionListener.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/action/DeleteMembershipActionListener.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/action/DeleteUserActionListener.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/action/ListGroupsActionListener.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/action/ListUsersActionListener.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/action/LoadGroupActionListener.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/action/LoadGroupByNameActionListener.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/action/LoadUserActionListener.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/action/VerifyUserActionListener.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/handler/
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/handler/AddMembershipHandler.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/handler/CreateGroupHandler.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/handler/CreateUserHandler.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/handler/DeleteGroupHandler.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/handler/DeleteMembershipHandler.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/handler/DeleteUserHandler.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/handler/ListGroupsHandler.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/handler/ListUsersHandler.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/handler/LoadGroupByNameHandler.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/handler/LoadGroupHandler.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/handler/LoadUserHandler.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/handler/VerifyUserHandler.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/package-info.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/taskform/
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/taskform/TaskFormBaseLibrary.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/taskform/TaskFormCompatLibrary.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/taskform/TaskFormLibrary.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/taskform/package-info.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/taskform/ui/
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/taskform/ui/UITaskFormButtonBase.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/taskform/ui/UITaskFormCancelButton.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/taskform/ui/UITaskFormSaveButton.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/taskform/ui/UITaskFormTransitionButton.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/taskformlayout/
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/taskformlayout/TaskFormLayoutBaseLibrary.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/taskformlayout/TaskFormLayoutCompatLibrary.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/taskformlayout/TaskFormLayoutLibrary.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/taskformlayout/package-info.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/taskformlayout/renderer/
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/taskformlayout/renderer/DataFormRenderer.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/taskformlayout/ui/
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/taskformlayout/ui/UIDataArea.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/taskformlayout/ui/UIDataCell.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/taskformlayout/ui/UIDataForm.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/taskformlayout/ui/UIDataSection.java
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/resources/META-INF/core.taglib.xml
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/resources/META-INF/faces-config.xml
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/resources/META-INF/identity.taglib.xml
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/resources/META-INF/tf-compat.taglib.xml
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/resources/META-INF/tf.taglib.xml
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/resources/META-INF/tfl-compat.taglib.xml
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/resources/META-INF/tfl.taglib.xml
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/tld/core.tld
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/tld/identity.tld
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/tld/tf.tld
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/tld/tfl.tld
Log:
Import sources from
https://svn.jboss.org/repos/jbpm/jbpm3/tags/jpdl-3.2.2.GA -r 2639.
Related modules are 'console' and 'jbpm4jsf'
Added:
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/WEB-INF/access.properties
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/WEB-INF/access.properties
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/WEB-INF/access.properties 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,42 @@
+# Security configuration for jBPM Administration Console.
+#
+# Customize the properties in this file to define security permissions
+# for different components within the console.
+
+# Require one of the given roles for identity management functionality.
+# Insert a bogus role name to disable identity management (if you are not
+# using the jBPM identity module, for example).
+role.identities=manager
+
+# Fine-grained controls for different levels of identity management.
+role.identities.user=admin
+role.identities.user.add=
+role.identities.user.delete=
+role.identities.user.modify=
+
+role.identities.group=admin
+role.identities.group.add=
+role.identities.group.delete=
+role.identities.group.modify=
+
+# Process definition operations
+role.process.deploy=manager,admin
+role.process.delete=admin
+role.process.start=manager
+
+# Process instance and token operations
+role.execution.suspend=
+role.execution.edit=
+role.execution.delete=
+role.execution.end=
+
+# Task management operations
+role.tasks=
+role.task.assign=manager
+role.task.assign.any=manager
+role.task.modify=
+
+# Job management operations
+role.jobs=admin
+role.jobs.delete=
+
Added:
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/WEB-INF/classes/messages.properties
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/WEB-INF/classes/messages.properties
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/WEB-INF/classes/messages.properties 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,136 @@
+
+# Unauthorized access
+
+unauthorized=You are not authorized to access this resource.
+
+# Confirmation alert boxes
+
+confirm.process.delete=Are you sure you want to permanently delete this process? This
operation cannot be undone.
+confirm.token.move=Are you sure you want to move this token?
+
+# Top menu
+
+title=JBoss jBPM Administration Console
+msg.fatal=Fatal Error
+msg.error=Error
+msg.warn=Warning
+msg.info=Information
+
+top.loggedinas=Logged in as: {0}
+top.logout=Log Out
+topmenu.caption=Manage:
+topmenu.processes=Processes
+topmenu.tasks=Tasks
+topmenu.jobs=Jobs
+topmenu.identities=Identities
+
+# Conventions
+# heading.* or *.heading.* - These are headings of tabluar columns
+# action.* or *.action.* - These are actions that appear in action lists, or in the
left-hand menu
+# action.*.beforelink or *.action.*.beforelink - This is the text that is rendered before
the clickable part of an action link
+# action.*.link or *.action.*.link - This is the clickable part of an action link
+# action.*.afterlink or *.action.*.afterlink - This is the text that is rendered after
the clickable part of an action link
+# view.* or *.view.* - This is the name of a view, as it appears in the left-hand menu
+# status.* - These are statuses of various executable elements
+# status.abbr.* - These are the one-character abbreviations for statuses of various
executable elements
+# confirm.* or *.confirm.* - These are the text contents of various confirmation dialogs
+# filter.* or *.filter.* - These are text items used to control search filters
+# prompt.* or *.prompt.* - These are prompts for input fields
+# label.* or *.label.* - These are labels for output fields
+# button.* or *.button.* - These are captions for buttons
+# message.* or *.message.* - These are messages for required/converter/validation fields
+
+# General pages
+
+menu.heading.actions=Actions
+menu.heading.views=Views
+
+action.examine=Examine
+
+heading.actions=Actions
+
+filter.apply=Apply Filter
+filter.clear=Clear Filter
+
+status.notstarted=Not Started
+status.notstarted.suspended=(suspended)
+status.running=Running
+status.suspended=Suspended
+status.ended=Ended
+status.ended.suspended=(was suspended)
+
+status.abbr.notstarted=N
+status.abbr.running=R
+status.abbr.suspended=S
+status.abbr.ended=E
+
+# Deploy process page
+
+deploy.heading=Deploy New Process Definition
+deploy.prompt=File to upload:
+deploy.button=Deploy
+
+# Identities page
+
+identities.action.adduser.beforelink=
+identities.action.adduser.link=Add
+identities.action.adduser.afterlink=a new user
+
+identities.action.addgroup.beforelink=
+identities.action.addgroup.link=Add
+identities.action.addgroup.afterlink=a new group
+
+identities.view.users=Users
+identities.view.groups=Groups
+identities.view.adduser=Add User
+identities.view.addgroup=Add Group
+
+identities.users.heading.id=User ID
+identities.users.heading.name=User Name
+identities.users.heading.email=Email Address
+identities.users.heading.memberships=Memberships
+
+identities.users.confirm.delete=Are you sure you want to delete this user? This
operation cannot be undone.
+
+identities.adduser.prompt.name=User Name
+identities.adduser.prompt.password=Password
+identities.adduser.prompt.passwordconfirm=Password (Confirm)
+identities.adduser.prompt.email=Email Address
+
+identities.adduser.button=Add User
+
+identities.groups.heading.id=Group ID
+identities.groups.heading.name=Group Name
+identities.groups.heading.type=Group Type
+identities.groups.heading.parent=Parent Group Name
+
+identities.groups.confirm.delete=Are you sure you want to delete this group and all of
its child groups? This operation cannot be undone.
+
+identities.addgroup.prompt.name=Group Name
+identities.addgroup.prompt.type=Group Type
+identities.addgroup.prompt.parent=Parent Group Name
+
+identities.addgroup.button=Add Group
+
+# Processes page
+
+processes.heading.id=Process ID
+processes.heading.name=Process Name
+processes.heading.version=Version
+
+processes.examine=Examine
+processes.delete=Delete
+processes.start=Start
+
+processes.action.deploy.beforelink=
+processes.action.deploy.link=Deploy
+processes.action.deploy.afterlink=a new process
+
+# Process page
+
+# Process Instance page
+
+# Task page
+
+# Token page
+
Added:
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/WEB-INF/faces-config.xml
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/WEB-INF/faces-config.xml 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,25 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<faces-config
xmlns="http://java.sun.com/xml/ns/javaee"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd"
+ version="1.2">
+
+ <application>
+
+ <locale-config>
+ <default-locale>en</default-locale>
+ </locale-config>
+
+ <!--
+ Use Facelets as the primary view handler. Since we have bookmarkable URLs,
+ add Gravel's query preserving view handler to the list.
+ -->
+ <view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
+
<view-handler>org.jboss.gravel.QueryPreservingViewHandler</view-handler>
+
+ <!--
+ Use Gravel's navigation model.
+ -->
+
<navigation-handler>org.jboss.gravel.navigation.GravelNavigationHandler</navigation-handler>
+ </application>
+</faces-config>
Added:
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/WEB-INF/jboss-web.xml
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/WEB-INF/jboss-web.xml
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/WEB-INF/jboss-web.xml 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE jboss-web PUBLIC
+ "-//JBoss//DTD Web Application 2.4//EN"
+ "http://www.jboss.org/j2ee/dtd/jboss-web_4_0.dtd">
+
+<jboss-web>
+ <!--
+ Specify the security domain to use. This will be java:/jaas/<name> where
<name> is one of the names configured in your login-config.xml.
+ -->
+ <security-domain>java:/jaas/jbpm-console</security-domain>
+ <context-root>jbpm-console</context-root>
+
+ <resource-ref>
+ <res-ref-name>jdbc/JbpmDataSource</res-ref-name>
+ <jndi-name>java:/JbpmDS</jndi-name>
+ </resource-ref>
+
+ <resource-ref>
+ <res-ref-name>jms/JbpmConnectionFactory</res-ref-name>
+ <jndi-name>java:JmsXA</jndi-name>
+ </resource-ref>
+
+ <!-- workaround for "mapped-name is required" exception in JBoss 5.0.0.CR1
-->
+ <message-destination-ref>
+
<message-destination-ref-name>jms/JobQueue</message-destination-ref-name>
+ <jndi-name>queue/JbpmJobQueue</jndi-name>
+ </message-destination-ref>
+
+</jboss-web>
Added:
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/WEB-INF/jbpm4jsf-config.xml
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/WEB-INF/jbpm4jsf-config.xml
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/WEB-INF/jbpm4jsf-config.xml 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<jbpm4jsf-config
xmlns="http://jbpm.org/jbpm4jsf/config">
+
+ <!-- This entry controls whether to map JSF user authentication to
+ actor IDs. Set to false if the authentication scheme used by
+ the administration console is not related to the set of actors
+ that is used by your processes.
+ -->
+ <authentication-service>
+ <use-jsf-actor>true</use-jsf-actor>
+ </authentication-service>
+
+ <!-- This entry facilitates the usage of process image URLs -->
+ <process-file-matcher>
+ <pattern>^/sa/pi/(\d+).jpg$</pattern>
+ <file-name>processimage.jpg</file-name>
+ <content-type>image/jpg</content-type>
+ </process-file-matcher>
+
+</jbpm4jsf-config>
+
Added:
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/WEB-INF/web.xml
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/WEB-INF/web.xml
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/WEB-INF/web.xml 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,191 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app version="2.4"
+
xmlns="http://java.sun.com/xml/ns/j2ee"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd" >
+
+ <servlet>
+ <description>Enable the JSF servlet. See faces-config.xml for
Faces-specific configuration</description>
+ <servlet-name>Faces Servlet</servlet-name>
+ <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+
+ <!-- Mapping for all plain pages. -->
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>*.jsf</url-pattern>
+ </servlet-mapping>
+
+ <!-- This mapping is for the process images. -->
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>/sa/pi/*</url-pattern>
+ </servlet-mapping>
+
+ <context-param>
+ <description> Use Documents Saved as *.xhtml </description>
+ <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
+ <param-value>.xhtml</param-value>
+ </context-param>
+
+ <context-param>
+ <description> Facelets debug output </description>
+ <param-name>facelets.DEVELOPMENT</param-name>
+ <param-value>false</param-value>
+ </context-param>
+
+ <!-- A simple JSP to redirect to the basic search page. -->
+ <welcome-file-list>
+ <welcome-file>index.jsp</welcome-file>
+ </welcome-file-list>
+
+ <servlet>
+ <description> This is the GDP's deployer servlet </description>
+ <servlet-name>GDP Deployer Servlet</servlet-name>
+ <servlet-class>org.jbpm.web.ProcessUploadServlet</servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>GDP Deployer Servlet</servlet-name>
+ <url-pattern>/upload/*</url-pattern>
+ </servlet-mapping>
+
+ <!--
+ This role list should be changed to include all the relevant roles for your
+ environment.
+ -->
+ <security-role>
+ <role-name>admin</role-name>
+ </security-role>
+ <security-role>
+ <role-name>user</role-name>
+ </security-role>
+
+ <!--
+ Security constraints - optionally customize the role name to require
+ a login before access is allowed to the application.
+
+ Also, be sure to edit jboss-web.xml to configure the security domain if you are
+ deploying inside JBoss AS.
+ -->
+ <security-constraint>
+ <web-resource-collection>
+ <web-resource-name>Secure Area</web-resource-name>
+ <url-pattern>/sa/*</url-pattern>
+ <http-method>GET</http-method>
+ <http-method>POST</http-method>
+ </web-resource-collection>
+ <auth-constraint>
+ <role-name>user</role-name>
+ </auth-constraint>
+ </security-constraint>
+
+ <!-- Example Login page - lists user names -->
+ <login-config>
+ <auth-method>FORM</auth-method>
+ <form-login-config>
+ <form-login-page>/ua/login-example.jsf</form-login-page>
+
<form-error-page>/ua/login-example.jsf?error=true</form-error-page>
+ </form-login-config>
+ </login-config>
+
+ <!-- Login configuration option #1 - use the login page ==>
+ <login-config>
+ <auth-method>FORM</auth-method>
+ <form-login-config>
+ <form-login-page>/ua/login.jsf</form-login-page>
+ <form-error-page>/ua/login.jsf?error=true</form-error-page>
+ </form-login-config>
+ </login-config>
+ <!== Login configuration option #1 -->
+
+ <!-- Login configuration option #2 - use basic auth ==>
+ <login-config>
+ <auth-method>BASIC</auth-method>
+ <realm-name>jBPM Administration Console</realm-name>
+ </login-config>
+ <!== Login configuration option #2 -->
+
+ <!-- Job executor launcher ==>
+ <listener>
+ <description>
+ Starts the job executor on servlet context initialization and stops it on
+ servlet context destruction.
+ </description>
+ <listener-class>org.jbpm.web.JobExecutorLauncher</listener-class>
+ </listener>
+ <!== Job executor launcher -->
+
+ <listener>
+ <description>
+ Closes the jBPM configuration on servlet context destruction, releasing
+ application resources. This listener should appear after the job executor
+ launcher to avoid reopening the configuration.
+ </description>
+
<listener-class>org.jbpm.web.JbpmConfigurationCloser</listener-class>
+ </listener>
+
+ <!-- Job executor servlet ==>
+ <servlet>
+ <description>
+ This servlet has the purpose of executing pending jobs. Deprecated,
+ replaced by JobExecutorLauncher.
+ </description>
+ <servlet-name>JobExecutorServlet</servlet-name>
+
<servlet-class>org.jbpm.job.executor.JobExecutorServlet</servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>JobExecutorServlet</servlet-name>
+ <url-pattern>/jobs</url-pattern>
+ </servlet-mapping>
+ <!== Job executor servlet -->
+
+ <resource-ref>
+ <description>
+ Logical name of the data source that provides connections to the persistence
service.
+ Must match the hibernate.connection.datasource property in the Hibernate
+ configuration file.
+ </description>
+ <res-ref-name>jdbc/JbpmDataSource</res-ref-name>
+ <res-type>javax.sql.DataSource</res-type>
+ <res-auth>Container</res-auth>
+ </resource-ref>
+
+ <resource-ref>
+ <description>
+ Logical name of the factory that provides JMS connections to the message
service.
+ Required for processes that contain asynchronous continuations.
+ </description>
+ <res-ref-name>jms/JbpmConnectionFactory</res-ref-name>
+ <res-type>javax.jms.ConnectionFactory</res-type>
+ <res-auth>Container</res-auth>
+ </resource-ref>
+
+ <ejb-local-ref>
+ <description>
+ Link to the local entity bean that implements the scheduler service. Required
for
+ processes that contain timers.
+ </description>
+ <ejb-ref-name>ejb/TimerEntityBean</ejb-ref-name>
+ <ejb-ref-type>Entity</ejb-ref-type>
+ <local-home>org.jbpm.ejb.LocalTimerEntityHome</local-home>
+ <local>org.jbpm.ejb.LocalTimerEntity</local>
+ <ejb-link>TimerEntityBean</ejb-link>
+ </ejb-local-ref>
+
+ <message-destination-ref>
+ <description>
+ The message service sends job messages to the queue referenced here. To
ensure
+ this is the same queue from which the JobListenerBean receives messages, the
+ message-destination-link element points to a common logical destination,
JobQueue.
+ </description>
+
<message-destination-ref-name>jms/JobQueue</message-destination-ref-name>
+ <message-destination-type>javax.jms.Queue</message-destination-type>
+ <message-destination-usage>Produces</message-destination-usage>
+ <message-destination-link>JobQueue</message-destination-link>
+ </message-destination-ref>
+
+</web-app>
Added:
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/images/background.gif
===================================================================
(Binary files differ)
Property changes on:
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/images/background.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/images/bullet.gif
===================================================================
(Binary files differ)
Property changes on:
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/images/bullet.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/images/info.gif
===================================================================
(Binary files differ)
Property changes on:
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/images/info.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/index.jsp
===================================================================
--- projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/index.jsp
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/index.jsp 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,10 @@
+<%
+ final String queryString = request.getQueryString();
+ final String contextRoot = request.getContextPath();
+ final String target = contextRoot + "/sa/processes.jsf";
+ if (queryString != null && queryString.length() > 0) {
+ response.sendRedirect(target + "?" + queryString);
+ } else {
+ response.sendRedirect(target);
+ }
+%>
Added:
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/sa/deployproc.xhtml
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/sa/deployproc.xhtml
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/sa/deployproc.xhtml 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,62 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:gd="http://gravel.jboss.org/jsf/1.0/data"
+
xmlns:ga="http://gravel.jboss.org/jsf/1.0/action"
+
xmlns:gs="http://gravel.jboss.org/jsf/1.0/simple"
+
xmlns:n="http://gravel.jboss.org/jsf/1.0/navigation"
+
xmlns:j4j="http://jbpm.org/jbpm4jsf/core"
+>
+
+ <ui:composition template="t_loggedin.xhtml">
+
+ <ui:define name="menu">
+ <ga:checkRole roles="#{access.role.process.deploy}"
message="#{msgs.unauthorized}"/>
+ <table class="leftmenu">
+ <tbody>
+ <tr class="leftmenu">
+ <td colspan="2"/>
+ </tr>
+ </tbody>
+ </table>
+ </ui:define>
+
+ <ui:define name="body">
+ <ga:checkRole roles="#{access.role.process.deploy}">
+ <h:form enctype="multipart/form-data">
+ <table class="results">
+ <thead>
+ <tr>
+ <th
colspan="2">#{msgs['deploy.heading']}</th>
+ </tr>
+ </thead>
+ <tbody class="results">
+ <tr>
+ <th>#{msgs['deploy.prompt']}</th>
+ <td>
+ <gd:inputFile target="#{stream}"
maxSize="104857600"/>
+ </td>
+ </tr>
+ <tr>
+ <th/>
+ <td style="text-align:right;">
+ <h:commandButton
value="#{msgs['deploy.button']}">
+ <j4j:deployProcess
archive="#{stream}" target="#{pd}"/>
+ <n:nav outcome="success"
url="procdef.jsf?id=#{pd.id}" storeMessages="true"/>
+ <n:nav outcome="error"
redirect="true" storeMessages="true"/>
+ </h:commandButton>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </h:form>
+ </ga:checkRole>
+
+ </ui:define>
+
+ </ui:composition>
+
+</html>
\ No newline at end of file
Added:
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/sa/group.xhtml
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/sa/group.xhtml
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/sa/group.xhtml 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,244 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:gd="http://gravel.jboss.org/jsf/1.0/data"
+
xmlns:ga="http://gravel.jboss.org/jsf/1.0/action"
+
xmlns:gs="http://gravel.jboss.org/jsf/1.0/simple"
+
xmlns:n="http://gravel.jboss.org/jsf/1.0/navigation"
+
xmlns:j4j="http://jbpm.org/jbpm4jsf/core"
+
xmlns:id="http://jbpm.org/jbpm4jsf/identity"
+>
+<ui:composition template="t_loggedin.xhtml">
+<ui:define name="menu">
+<ga:responseActions>
+ <ga:checkRole roles="#{access.role.identities}">
+ <ga:checkRole roles="#{access.role.identities.group}">
+ <ga:parameter name="id" target="#{id}"
required="true">
+ <f:validateLongRange minimum="0"/>
+ <f:convertNumber integerOnly="true"
maxFractionDigits="0"/>
+ </ga:parameter>
+ <ga:parameter name="view" target="#{viewMode}"
default="children"/>
+ <ga:parameter name="page" target="#{page}"
default="1"/>
+ <id:loadGroup id="#{id}" target="#{group}"/>
+ <gd:sort source="#{group.memberships}"
target="#{members}" entryVar="e" argument="#{e.role == null ?
'' : e.role}"/>
+ <gd:sort source="#{members}" target="#{members}"
entryVar="e" argument="#{e.user.name == null ? '' :
e.user.name}"/>
+ <gd:pager target="#{members_pager}" value="#{members}"
page="#{page}"/>
+ <gd:sort source="#{group.children}"
target="#{children}" entryVar="e" argument="#{e.name}"/>
+ <gd:pager target="#{children_pager}"
value="#{children}" page="#{page}"/>
+ </ga:checkRole>
+ </ga:checkRole>
+</ga:responseActions>
+<gs:div style="padding:0;margin:0">
+ <ga:attribute name="rendered" value="#{group != null}"/>
+ <table class="leftmenu">
+ <tbody>
+ <tr class="leftmenuheader">
+ <th colspan="2">Group Summary</th>
+ </tr>
+ <tr class="leftmenu">
+ <th>Group Link</th>
+ <td>
+ <h:outputLink style="font-weight:bold">
+ <f:param name="id" value="#{id}"/>
+ <h:outputText value="#{group.name} (ID #{id})"/>
+ </h:outputLink>
+ </td>
+ </tr>
+ <gs:tr styleClass="leftmenu">
+ <ga:attribute name="rendered" value="#{! empty
group.parent}"/>
+ <th>Parent Group</th>
+ <td>
+ <h:outputText value="#{group.parent.name}"/>
+ </td>
+ </gs:tr>
+ <tr class="leftmenu">
+ <th>Group Name</th>
+ <td>
+ <h:outputText value="#{group.name}"/>
+ </td>
+ </tr>
+ <tr class="leftmenu">
+ <th>Group Type</th>
+ <td>
+ <h:outputText value="#{group.type}"/>
+ </td>
+ </tr>
+ <tr class="leftmenuheader">
+ <th colspan="2" class="nf">Views</th>
+ </tr>
+ <tr class="leftmenu">
+ <td colspan="2">
+ <gs:ul>
+ <gs:li>
+ <h:outputLink style="#{viewMode == 'children'
? 'font-weight:bold' : ''}">
+ <f:param name="id"
value="#{id}"/>
+ <f:param name="view"
value="children"/>
+ Children
+ </h:outputLink>
+ </gs:li>
+ <ga:checkRole
roles="#{access.role.identities.user}">
+ <gs:li>
+ <h:outputLink style="#{viewMode ==
'members' ? 'font-weight:bold' : ''}">
+ <f:param name="id"
value="#{id}"/>
+ <f:param name="view"
value="members"/>
+ Members
+ </h:outputLink>
+ </gs:li>
+ </ga:checkRole>
+ </gs:ul>
+ </td>
+ </tr>
+ <tr class="leftmenuheader">
+ <th colspan="2" class="nf">Actions</th>
+ </tr>
+ <tr class="leftmenu">
+ <td colspan="2">
+ <h:form>
+ <h:inputHidden value="#{id}"/>
+ <gs:ul>
+ <gs:li>
+ <h:commandLink value="Delete"
onclick="return
confirm('#{msgs['identities.groups.confirm.delete']}');">
+ <f:param name="xid">
+ <ga:attribute name="value"
value="#{group.id}"/>
+ </f:param>
+ <ga:parameter name="xid"
target="#{xid}"/>
+ <id:loadGroup id="#{xid}"
target="#{xgroup}"/>
+ <id:deleteGroup group="#{xgroup}"/>
+ <f:setPropertyActionListener
value="#{null}" target="#{xuser}"/>
+ <n:nav outcome="success"
url="identities.jsf?view=users" storeMessages="true"/>
+ <n:nav outcome="error"
redirect="true" storeMessages="true"/>
+ </h:commandLink>
+ <h:outputText value=" this group"/>
+ </gs:li>
+ </gs:ul>
+ </h:form>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+
+</gs:div>
+</ui:define>
+
+<ui:define name="body">
+ <h:outputText>
+ <ga:attribute name="rendered" value="#{viewMode ==
'children'}"/>
+ <table class="results">
+ <thead>
+ <tr>
+ <th colspan="3">
+ <ui:decorate template="t_pager.xhtml">
+ <ui:define name="pager_params">
+ <f:param name="id"
value="#{id}"/>
+ </ui:define>
+ <ui:param name="pager"
value="#{children_pager}"/>
+ </ui:decorate>
+ <h:outputText value="Children"/>
+ </th>
+ </tr>
+ <tr>
+ <td style="width:160px">Group Name</td>
+ <td style="width:160px">Group Type</td>
+ <td style="width:100px">Actions</td>
+ </tr>
+ </thead>
+ <tbody class="results">
+ <gd:repeat value="#{children}" var="child"
idVar="rid" first="#{children_pager.first}"
limit="#{children_pager.limit}">
+ <gs:tr>
+ <ga:attribute name="styleClass" value="#{rid %
2 == 0 ? 'odd' : 'even'}"/>
+ <td>
+ <h:outputText value="#{child.name}"/>
+ </td>
+ <td>
+ <h:outputText value="#{child.type}"/>
+ </td>
+ <td>
+ <h:form>
+ <h:commandLink value="Remove"
onclick="return
confirm('#{msgs['identities.groups.confirm.delete']}')">
+ <f:param name="xgid">
+ <ga:attribute name="value"
value="#{child.id}"/>
+ </f:param>
+ <ga:parameter name="xgid"
target="#{xgid}"/>
+ <id:loadGroup id="#{xgid}"
target="#{xgroup}"/>
+ <id:deleteGroup group="#{xgroup}"/>
+ <n:nav outcome="success"
redirect="true" storeMessages="true"/>
+ <n:nav outcome="error"
redirect="true" storeMessages="true"/>
+ </h:commandLink>
+ </h:form>
+ </td>
+ </gs:tr>
+ </gd:repeat>
+ </tbody>
+ </table>
+ </h:outputText>
+ <h:outputText>
+ <ga:attribute name="rendered" value="#{viewMode ==
'members'}"/>
+ <table class="results">
+ <thead>
+ <tr>
+ <th colspan="3">
+ <ui:decorate template="t_pager.xhtml">
+ <ui:define name="pager_params">
+ <f:param name="id"
value="#{id}"/>
+ </ui:define>
+ <ui:param name="pager"
value="#{members_pager}"/>
+ </ui:decorate>
+ <h:outputText value="Members"/>
+ </th>
+ </tr>
+ <tr>
+ <td style="width:160px">User Name</td>
+ <td style="width:160px">Role in Group</td>
+ <td style="width:100px">Actions</td>
+ </tr>
+ </thead>
+ <gs:tbody styleClass="results">
+ <ga:attribute name="rendered" value="#{! empty
members}"/>
+ <gd:repeat value="#{members}" var="member"
idVar="rid" first="#{members_pager.first}"
limit="#{members_pager.limit}">
+ <gs:tr>
+ <ga:attribute name="styleClass" value="#{rid %
2 == 0 ? 'odd' : 'even'}"/>
+ <td>
+ <h:outputLink value="user.jsf">
+ <h:outputText
value="#{member.user.name}"/>
+ <f:param name="id">
+ <ga:attribute name="value"
value="#{member.user.id}"/>
+ </f:param>
+ </h:outputLink>
+ </td>
+ <td>
+ <h:outputText value="#{member.role}"/>
+ </td>
+ <td>
+ <h:form>
+ <h:commandLink value="Remove">
+ <f:param name="xuid">
+ <ga:attribute name="value"
value="#{member.user.id}"/>
+ </f:param>
+ <f:param name="xmid">
+ <ga:attribute name="value"
value="#{member.id}"/>
+ </f:param>
+ <ga:parameter name="xuid"
target="#{xuid}"/>
+ <ga:parameter name="xmid"
target="#{xmid}"/>
+ <id:loadUser id="#{xuid}"
target="#{xuser}"/>
+ <id:deleteMembership user="#{xuser}"
membershipId="#{xmid}"/>
+ <n:nav outcome="success"
redirect="true" storeMessages="true"/>
+ <n:nav outcome="error"
redirect="true" storeMessages="true"/>
+ </h:commandLink>
+ </h:form>
+ </td>
+ </gs:tr>
+ </gd:repeat>
+ </gs:tbody>
+ </table>
+
+ </h:outputText>
+</ui:define>
+
+
+
+</ui:composition>
+
+</html>
\ No newline at end of file
Added:
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/sa/identities.xhtml
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/sa/identities.xhtml
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/sa/identities.xhtml 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,469 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:gd="http://gravel.jboss.org/jsf/1.0/data"
+
xmlns:ga="http://gravel.jboss.org/jsf/1.0/action"
+
xmlns:gs="http://gravel.jboss.org/jsf/1.0/simple"
+
xmlns:n="http://gravel.jboss.org/jsf/1.0/navigation"
+
xmlns:j4j="http://jbpm.org/jbpm4jsf/core"
+
xmlns:id="http://jbpm.org/jbpm4jsf/identity"
+>
+ <ui:composition template="../sa/t_loggedin.xhtml">
+ <ui:define name="actions">
+ <ga:checkRole roles="#{access.role.identities}">
+ <ga:responseActions>
+ <!-- First identify the view mode -->
+
+ <ga:checkRole
roles="#{access.role.identities.group}">
+ <f:setPropertyActionListener value="groups"
target="#{viewModeDefault}"/>
+ </ga:checkRole>
+ <ga:checkRole
roles="#{access.role.identities.user}">
+ <f:setPropertyActionListener value="users"
target="#{viewModeDefault}"/>
+ </ga:checkRole>
+ <ga:parameter name="view" target="#{viewMode}"
default="#{empty viewModeDefault ? 'users' : viewModeDefault}"/>
+ <ga:parameter name="page" target="#{page}"
default="1">
+ <f:convertNumber integerOnly="true"/>
+ </ga:parameter>
+
+ <!-- User view mode actions -->
+
+ <ga:checkRole
roles="#{access.role.identities.user}">
+ <ga:parameter name="name"
target="#{userName}" default="">
+ <f:converter
converterId="gravel.StringWildcardFilter"/>
+ </ga:parameter>
+ <ga:parameter name="email"
target="#{userEmail}" default="">
+ <f:converter
converterId="gravel.StringWildcardFilter"/>
+ </ga:parameter>
+ <id:listUsers unless="#{viewMode !=
'users'}" target="#{users}"/>
+ <gd:filter if="#{users != null}"
source="#{users}" target="#{users}" entryVar="e"
filter="#{userName}" filterArgument="#{e.name}"/>
+ <gd:filter if="#{users != null}"
source="#{users}" target="#{users}" entryVar="e"
filter="#{userEmail}" filterArgument="#{e.email}"/>
+ <gd:sort if="#{users != null}"
source="#{users}" target="#{users}" entryVar="e"
argument="#{e.name}"/>
+ <gd:pager target="#{users_pager}"
value="#{users}" page="#{page}"/>
+ </ga:checkRole>
+
+ <!-- Group view mode actions -->
+
+ <ga:checkRole
roles="#{access.role.identities.group}">
+ <ga:parameter name="gname"
target="#{groupName}" default="">
+ <f:converter
converterId="gravel.StringWildcardFilter"/>
+ </ga:parameter>
+ <ga:parameter name="gtype"
target="#{groupType}" default="">
+ <f:converter
converterId="gravel.StringWildcardFilter"/>
+ </ga:parameter>
+ <ga:parameter name="gpname"
target="#{groupParentName}" default="">
+ <f:converter
converterId="gravel.StringWildcardFilter"/>
+ </ga:parameter>
+ <id:listGroups unless="#{viewMode !=
'groups'}" target="#{groups}"/>
+ <gd:filter if="#{groups != null}"
source="#{groups}" target="#{groups}" entryVar="e"
filter="#{groupName}" filterArgument="#{e.name}"/>
+ <gd:filter if="#{groups != null}"
source="#{groups}" target="#{groups}" entryVar="e"
filter="#{groupType}" filterArgument="#{e.type}"/>
+ <gd:filter if="#{groups != null}"
source="#{groups}" target="#{groups}" entryVar="e"
filter="#{groupParentName}" filterArgument="#{e.parent.name}"/>
+ <gd:sort if="#{groups != null}"
source="#{groups}" target="#{groups}" entryVar="e"
argument="#{e.name}"/>
+ <gd:pager target="#{groups_pager}"
value="#{groups}" page="#{page}"/>
+ </ga:checkRole>
+ </ga:responseActions>
+ </ga:checkRole>
+ </ui:define>
+
+ <ui:define name="menu">
+ <ga:checkRole roles="#{access.role.identities}"
message="#{msgs.unauthorized}">
+ <table class="leftmenu">
+ <tbody>
+ <tr class="leftmenuheader">
+ <th colspan="2"><h:outputText
value="#{msgs['menu.heading.actions']}"/></th>
+ </tr>
+ <tr class="leftmenu"
style="height:80px">
+ <td colspan="2">
+ <h:form>
+ <gs:ul>
+ <ga:checkRole
roles="#{access.role.identities.user}">
+ <ga:checkRole
roles="#{access.role.identities.user.add}">
+ <gs:li>
+ <h:outputText
value="#{msgs['identities.action.adduser.beforelink']} "/>
+ <h:outputLink>
+ <f:param name="view"
value="adduser"/>
+ <h:outputText
value="#{msgs['identities.action.adduser.link']}"/>
+ </h:outputLink>
+ <h:outputText value="
#{msgs['identities.action.adduser.afterlink']}"/>
+ </gs:li>
+ </ga:checkRole>
+ </ga:checkRole>
+ <ga:checkRole
roles="#{access.role.identities.group}">
+ <ga:checkRole
roles="#{access.role.identities.group.add}">
+ <gs:li>
+ <h:outputText
value="#{msgs['identities.action.addgroup.beforelink']} "/>
+ <h:outputLink>
+ <f:param name="view"
value="addgroup"/>
+ <h:outputText
value="#{msgs['identities.action.addgroup.link']}"/>
+ </h:outputLink>
+ <h:outputText value="
#{msgs['identities.action.addgroup.afterlink']}"/>
+ </gs:li>
+ </ga:checkRole>
+ </ga:checkRole>
+ </gs:ul>
+ </h:form>
+ </td>
+ </tr>
+ <tr class="leftmenuheader">
+ <th colspan="2"
class="nf"><h:outputText
value="#{msgs['menu.heading.views']}"/></th>
+ </tr>
+ <tr class="leftmenu">
+ <td colspan="2">
+ <gs:ul>
+ <ga:checkRole
roles="#{access.role.identities.user}">
+ <gs:li>
+ <h:outputLink style="#{empty viewMode
or viewMode == 'users' ? 'font-weight:bold' : ''}">
+ <f:param name="view"
value="users"/>
+ <h:outputText
value="#{msgs['identities.view.users']}"/>
+ </h:outputLink>
+ </gs:li>
+ </ga:checkRole>
+ <ga:checkRole
roles="#{access.role.identities.group}">
+ <gs:li>
+ <h:outputLink style="#{viewMode ==
'groups' ? 'font-weight:bold' : ''}">
+ <f:param name="view"
value="groups"/>
+ <h:outputText
value="#{msgs['identities.view.groups']}"/>
+ </h:outputLink>
+ </gs:li>
+ </ga:checkRole>
+ </gs:ul>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </ga:checkRole>
+ </ui:define>
+
+ <ui:define name="body">
+ <ga:checkRole roles="#{access.role.identities}">
+ <ga:checkRole roles="#{access.role.identities.user}">
+ <gs:div>
+ <ga:attribute name="rendered" value="#{users !=
null}"/>
+ <table class="results">
+ <thead>
+ <tr>
+ <th colspan="6">
+ <ui:decorate
template="t_pager.xhtml">
+ <ui:define
name="pager_params">
+ <f:param name="view"
value="users"/>
+ <f:param name="name"
value="#{userName}"/>
+ <f:param name="email"
value="#{userEmail}"/>
+ </ui:define>
+ <ui:param name="pager"
value="#{users_pager}"/>
+ </ui:decorate>
+ <h:outputText value="Users"/>
+ </th>
+ </tr>
+ <tr>
+ <td>
+ <h:outputText
value="#{msgs['identities.users.heading.id']}"/>
+ </td>
+ <td style="width:100px;">
+ <h:outputText
value="#{msgs['identities.users.heading.name']}"/>
+ </td>
+ <td style="width:120px;">
+ <h:outputText
value="#{msgs['identities.users.heading.email']}"/>
+ </td>
+ <td style="width:260px;">
+ <h:outputText
value="#{msgs['identities.users.heading.memberships']}"/>
+ </td>
+ <td colspan="2">
+ <h:outputText
value="#{msgs['heading.actions']}"/>
+ </td>
+ </tr>
+ </thead>
+ <tbody class="filter">
+ <tr>
+ <td/>
+ <td>
+ <input name="name_i"
type="text" style="width:90px;" value="#{userName}"
onkeypress="keypress(event,'apply')"/>
+ </td>
+ <td>
+ <input name="email_i"
type="text" style="width:110px;" value="#{userEmail}"
onkeypress="keypress(event,'apply')"/>
+ </td>
+ <td/>
+ <td colspan="2"
style="width:150px;">
+ <form id="sf"
action="identities.jsf">
+ <input type="hidden"
name="view" value="users"/>
+ <input type="hidden"
name="name"/>
+ <input type="hidden"
name="email"/>
+ </form>
+ <a id="apply"
accesskey="a"
onclick="document.getElementsByName('name')[0].value=document.getElementsByName('name_i')[0].value;document.getElementsByName('email')[0].value=document.getElementsByName('email_i')[0].value;document.getElementById('sf').submit();return
false;"><h:outputText
value="#{msgs['filter.apply']}"/></a>
+ <h:outputLink
style="margin-left:10px">
+ <f:param name="view"
value="users"/>
+ <h:outputText
value="#{msgs['filter.clear']}"/>
+ </h:outputLink>
+ </td>
+ </tr>
+ </tbody>
+ <h:outputText>
+ <ga:attribute name="rendered"
value="#{! empty users}"/>
+ <tbody class="results">
+ <gd:repeat value="#{users}"
var="user" idVar="rid" first="#{users_pager.first}"
limit="#{users_pager.limit}">
+ <gs:tr styleClass="#{rid % 2 == 0 ?
'odd' : 'even'}">
+ <td>
+ <h:outputText
value="#{user.id}"/>
+ </td>
+ <td>
+ <h:outputText
value="#{user.name}"/>
+ </td>
+ <td>
+ <h:outputText
value="#{user.email}"/>
+ </td>
+ <td>
+ <ga:responseActions>
+ <gd:sort
source="#{user.memberships}" target="#{memberships}"
entryVar="e" argument="#{e.group.name}"/>
+ <gd:sort
source="#{memberships}" target="#{memberships}" entryVar="e"
argument="#{e.group.type}"/>
+ </ga:responseActions>
+ <gd:repeat
value="#{memberships}" var="membership">
+ <h:outputText value="Group
(#{membership.group.type}): #{membership.group.name}"/>
+ <h:outputText value=", Role:
#{membership.role}" rendered="#{! empty membership.role}"/>
+ <br/>
+ </gd:repeat>
+ </td>
+ <td>
+ <h:outputLink
value="user.jsf?id=#{user.id}">
+ <h:outputText
value="#{msgs['action.examine']}"/>
+ </h:outputLink>
+ </td>
+ <ga:checkRole
roles="#{access.role.identities.user.delete}">
+ <td>
+ <h:form>
+ <h:commandLink
value="Delete" onclick="return
confirm('#{msgs['identities.users.confirm.delete']}')">
+ <f:param
name="xid">
+ <ga:attribute
name="value" value="#{user.id}"/>
+ </f:param>
+ <ga:parameter
name="xid" target="#{xid}"/>
+ <id:loadUser
id="#{xid}" target="#{xuser}"/>
+ <id:deleteUser
user="#{xuser}"/>
+
<f:setPropertyActionListener value="#{null}"
target="#{xuser}"/>
+ <n:nav
outcome="success" redirect="true" storeMessages="true"/>
+ <n:nav
outcome="error" redirect="true" storeMessages="true"/>
+ </h:commandLink>
+ </h:form>
+ </td>
+ </ga:checkRole>
+ </gs:tr>
+ </gd:repeat>
+ </tbody>
+ </h:outputText>
+ </table>
+ </gs:div>
+ <ga:checkRole
roles="#{access.role.identities.user.add}">
+ <gs:div>
+ <ga:attribute name="rendered"
value="#{viewMode == 'adduser'}"/>
+ <h:form>
+ <table class="results">
+ <thead>
+ <tr>
+ <th colspan="2">
+ <h:outputText
value="#{msgs['identities.view.adduser']}"/>
+ </th>
+ </tr>
+ </thead>
+ <tbody class="results">
+ <tr>
+ <th><h:outputText
value="#{msgs['identities.adduser.prompt.name']}"/></th>
+ <td><h:inputText
value="#{createUserName}"/></td>
+ </tr>
+ <tr>
+ <th><h:outputText
value="#{msgs['identities.adduser.prompt.password']}"/></th>
+ <td><h:inputSecret
value="#{createUserPassword}"/></td>
+ </tr>
+ <tr>
+ <th><h:outputText
value="#{msgs['identities.adduser.prompt.passwordconfirm']}"/></th>
+ <td><h:inputSecret
value="#{createUserPasswordConfirm}"/></td>
+ </tr>
+ <tr>
+ <th><h:outputText
value="#{msgs['identities.adduser.prompt.email']}"/></th>
+ <td><h:inputText
value="#{createUserEmail}"/></td>
+ </tr>
+ <tr>
+ <th/>
+ <td
style="text-align:right;">
+ <h:commandButton
value="#{msgs['identities.adduser.button']}">
+ <id:createUser
+
userName="#{createUserName}"
+
password="#{createUserPassword}"
+
passwordConfirm="#{createUserPasswordConfirm}"
+
email="#{createUserEmail}"
+ />
+ <n:nav outcome="error"
redirect="true" storeMessages="true"/>
+ <n:nav outcome="success"
url="identities.jsf?view=users" storeMessages="true"/>
+ </h:commandButton>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </h:form>
+ </gs:div>
+ </ga:checkRole>
+ </ga:checkRole>
+ <ga:checkRole roles="#{access.role.identities.group}">
+ <gs:div>
+ <ga:attribute name="rendered" value="#{groups
!= null}"/>
+ <table class="results">
+ <thead>
+ <tr>
+ <th colspan="6">
+ <ui:decorate
template="t_pager.xhtml">
+ <ui:param name="pager"
value="#{groups_pager}"/>
+ <ui:define
name="pager_params">
+ <f:param name="view"
value="groups"/>
+ <f:param name="gname"
value="#{groupName}"/>
+ <f:param name="gtype"
value="#{groupType}"/>
+ <f:param name="gpname"
value="#{groupParentName}"/>
+ </ui:define>
+ </ui:decorate>
+ <h:outputText value="Groups"/>
+ </th>
+ </tr>
+ <tr>
+ <td>
+ <h:outputText
value="#{msgs['identities.groups.heading.id']}"/>
+ </td>
+ <td style="width:100px;">
+ <h:outputText
value="#{msgs['identities.groups.heading.name']}"/>
+ </td>
+ <td style="width:120px;">
+ <h:outputText
value="#{msgs['identities.groups.heading.type']}"/>
+ </td>
+ <td style="width:120px;">
+ <h:outputText
value="#{msgs['identities.groups.heading.parent']}"/>
+ </td>
+ <td colspan="2">
+ <h:outputText
value="#{msgs['heading.actions']}"/>
+ </td>
+ </tr>
+ </thead>
+ <tbody class="filter">
+ <tr>
+ <td/>
+ <td>
+ <input name="gname_i"
type="text" style="width:90px;" value="#{groupName}"
onkeypress="keypress(event,'gapply')"/>
+ </td>
+ <td>
+ <input name="gtype_i"
type="text" style="width:110px;" value="#{groupType}"
onkeypress="keypress(event,'gapply')"/>
+ </td>
+ <td>
+ <input name="gpname_i"
type="text" style="width:90px;" value="#{groupParentName}"
onkeypress="keypress(event,'gapply')"/>
+ </td>
+ <td colspan="2"
style="width:150px;">
+ <form id="gsf"
action="identities.jsf">
+ <input type="hidden"
name="view" value="groups"/>
+ <input type="hidden"
name="gname"/>
+ <input type="hidden"
name="gtype"/>
+ <input type="hidden"
name="gpname"/>
+ </form>
+ <a id="gapply"
accesskey="a"
onclick="document.getElementsByName('gname')[0].value=document.getElementsByName('gname_i')[0].value;document.getElementsByName('gpname')[0].value=document.getElementsByName('gpname_i')[0].value;document.getElementsByName('gtype')[0].value=document.getElementsByName('gtype_i')[0].value;document.getElementById('gsf').submit();return
false;"><h:outputText
value="#{msgs['filter.apply']}"/></a>
+ <h:outputLink
style="margin-left:10px">
+ <f:param name="view"
value="groups"/>
+ <h:outputText
value="#{msgs['filter.clear']}"/>
+ </h:outputLink>
+ </td>
+ </tr>
+ </tbody>
+ <h:outputText>
+ <ga:attribute name="rendered"
value="#{! empty groups}"/>
+ <tbody class="results">
+ <gd:repeat value="#{groups}"
var="group" idVar="rid" first="#{groups_pager.first}"
limit="#{groups_pager.limit}">
+ <gs:tr>
+ <ga:attribute name="styleClass"
value="#{rid % 2 == 0 ? 'odd' : 'even'}"/>
+ <td>
+ <h:outputText
value="#{group.id}"/>
+ </td>
+ <td>
+ <h:outputText
value="#{group.name}"/>
+ </td>
+ <td>
+ <h:outputText
value="#{group.type}"/>
+ </td>
+ <td>
+ <h:outputText
value="#{group.parent.name}"/>
+ </td>
+ <td>
+ <h:outputLink
value="group.jsf?id=#{group.id}">
+ <h:outputText
value="#{msgs['action.examine']}"/>
+ </h:outputLink>
+ </td>
+ <ga:checkRole
roles="#{access.role.identities.group.delete}">
+ <td>
+ <h:form>
+ <h:commandLink
value="Delete" onclick="return
confirm('#{msgs['identities.groups.confirm.delete']}')">
+ <f:param
name="xid">
+ <ga:attribute
name="value" value="#{group.id}"/>
+ </f:param>
+ <ga:parameter
name="xid" target="#{xid}"/>
+ <id:loadGroup
id="#{xid}" target="#{xgroup}"/>
+ <id:deleteGroup
group="#{xgroup}"/>
+
<f:setPropertyActionListener value="#{null}"
target="#{xgroup}"/>
+ <n:nav
outcome="success" redirect="true" storeMessages="true"/>
+ <n:nav
outcome="error" redirect="true" storeMessages="true"/>
+ </h:commandLink>
+ </h:form>
+ </td>
+ </ga:checkRole>
+ </gs:tr>
+ </gd:repeat>
+ </tbody>
+ </h:outputText>
+ </table>
+ </gs:div>
+ <ga:checkRole
roles="#{access.role.identities.group.add}">
+ <gs:div>
+ <ga:attribute name="rendered"
value="#{viewMode == 'addgroup'}"/>
+ <h:form>
+ <table class="results">
+ <thead>
+ <tr>
+ <th colspan="2">
+ <h:outputText
value="#{msgs['identities.view.addgroup']}"/>
+ </th>
+ </tr>
+ </thead>
+ <tbody class="results">
+ <tr>
+ <th><h:outputText
value="#{msgs['identities.addgroup.prompt.name']}"/></th>
+ <td><h:inputText
value="#{createGroupName}"/></td>
+ </tr>
+ <tr>
+ <th><h:outputText
value="#{msgs['identities.addgroup.prompt.type']}"/></th>
+ <td><h:inputText
value="#{createGroupType}"/></td>
+ </tr>
+ <tr>
+ <th><h:outputText
value="#{msgs['identities.addgroup.prompt.parent']}"/></th>
+ <td><h:inputText
value="#{createGroupParentName}"/></td>
+ </tr>
+ <tr>
+ <th/>
+ <td
style="text-align:right;">
+ <h:commandButton
value="#{msgs['identities.addgroup.button']}">
+ <id:loadGroupByName
+
groupName="#{createGroupParentName}"
+
target="#{parentGroup}"
+ unless="#{empty
createGroupParentName}"
+ />
+ <id:createGroup
+
groupName="#{createGroupName}"
+
type="#{createGroupType}"
+
parentGroup="#{parentGroup}"
+ />
+ <n:nav outcome="success"
url="identities.jsf?view=groups" storeMessages="true"/>
+ <n:nav outcome="error"
redirect="true" storeMessages="true"/>
+ </h:commandButton>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </h:form>
+ </gs:div>
+ </ga:checkRole>
+ </ga:checkRole>
+ </ga:checkRole>
+ </ui:define>
+ </ui:composition>
+
+
+</html>
\ No newline at end of file
Added:
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/sa/jobs.xhtml
===================================================================
--- projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/sa/jobs.xhtml
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/sa/jobs.xhtml 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,200 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:gd="http://gravel.jboss.org/jsf/1.0/data"
+
xmlns:ga="http://gravel.jboss.org/jsf/1.0/action"
+
xmlns:gs="http://gravel.jboss.org/jsf/1.0/simple"
+
xmlns:n="http://gravel.jboss.org/jsf/1.0/navigation"
+
xmlns:j4j="http://jbpm.org/jbpm4jsf/core"
+>
+<ui:composition template="t_loggedin.xhtml">
+ <ui:define name="menu">
+ <ga:checkRole roles="#{access.role.jobs}"
message="#{msgs.unauthorized}">
+ <table class="leftmenu">
+ <tbody>
+ <tr class="leftmenuheader">
+ <th colspan="2">Actions</th>
+ </tr>
+ <tr class="leftmenu" style="height:80px">
+ <td colspan="2">
+ <h:form>
+ </h:form>
+ </td>
+ </tr>
+ <tr class="leftmenuheader">
+ <th colspan="2"
class="nf">Views</th>
+ </tr>
+ <tr class="leftmenu">
+ <td colspan="2">
+ <gs:ul>
+ <gs:li>
+ <h:outputLink style="#{viewMode ==
'all' ? 'font-weight:bold' : ''}">
+ <f:param name="view"
value="all"/>
+ All Jobs
+ </h:outputLink>
+ </gs:li>
+ <gs:li>
+ <h:outputLink style="#{viewMode ==
'timers' ? 'font-weight:bold' : ''}">
+ <f:param name="view"
value="timers"/>
+ Timers
+ </h:outputLink>
+ </gs:li>
+ <gs:li>
+ <h:outputLink style="#{viewMode ==
'action' ? 'font-weight:bold' : ''}">
+ <f:param name="view"
value="action"/>
+ Execute Action Jobs
+ </h:outputLink>
+ </gs:li>
+ <gs:li>
+ <h:outputLink style="#{viewMode ==
'node' ? 'font-weight:bold' : ''}">
+ <f:param name="view"
value="node"/>
+ Execute Node Jobs
+ </h:outputLink>
+ </gs:li>
+ </gs:ul>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </ga:checkRole>
+
+ </ui:define>
+
+ <ui:define name="actions">
+ <ga:responseActions>
+ <ga:parameter name="view" target="#{viewMode}"
default="all"/>
+ <ga:parameter name="page" target="#{page}"
default="1"/>
+
+ <j4j:listJobs target="#{jobs}"/>
+ <f:setPropertyActionListener value="#{viewMode == 'timers' ?
12 : viewMode == 'action' ? 9 : viewMode == 'node' ? 9 : 10}"
target="#{colspan}"/>
+ <gd:filter if="#{viewMode == 'timers'}"
entryVar="e" source="#{jobs}" target="#{jobs}"
test="#{e.class.name == 'org.jbpm.job.Timer'}"/>
+ <gd:filter if="#{viewMode == 'action'}"
entryVar="e" source="#{jobs}" target="#{jobs}"
test="#{e.class.name == 'org.jbpm.job.ExecuteActionJob'}"/>
+ <gd:filter if="#{viewMode == 'node'}"
entryVar="e" source="#{jobs}" target="#{jobs}"
test="#{e.class.name == 'org.jbpm.job.ExecuteNodeJob'}"/>
+ <gd:pager target="#{pager}" value="#{jobs}"
page="#{page}"/>
+ </ga:responseActions>
+ </ui:define>
+
+ <ui:define name="body">
+ <table class="results">
+ <thead>
+ <tr>
+ <th colspan="#{colspan}">
+ <ui:decorate template="t_pager.xhtml">
+ </ui:decorate>
+ <h:outputText value="#{viewMode == 'timers' ?
'Timers' : viewMode == 'action' ? 'Execute Action Jobs' : viewMode
== 'node' ? 'Execute Node Jobs' : 'All Jobs'}"/>
+ </th>
+ </tr>
+ <tr>
+ <td>ID</td>
+ <h:outputText rendered="#{viewMode ==
'timers'}">
+ <td>Name</td>
+ <td>Repeat</td>
+ <td>Transition Name</td>
+ </h:outputText>
+ <h:outputText rendered="#{viewMode ==
'all'}">
+ <td>Type</td>
+ </h:outputText>
+ <td>Due</td>
+ <td>Status</td>
+ <td>Process Instance</td>
+ <td>Token</td>
+ <td>Task Instance</td>
+ <td>Exception</td>
+ <td>Retries</td>
+ <td>Actions</td>
+ </tr>
+ </thead>
+ <h:outputText>
+ <ga:attribute name="rendered" value="#{! empty
jobs}"/>
+ <tbody class="results">
+ <gd:repeat var="job" idVar="rid">
+ <ga:attribute name="value"
value="#{jobs}"/>
+ <gs:tr>
+ <ga:attribute name="styleClass"
value="#{rid % 2 == 0 ? 'odd' : 'even'}"/>
+ <td>
+ <h:outputText value="#{job.id}"/>
+ </td>
+ <h:outputText rendered="#{viewMode ==
'timers'}">
+ <td>
+ <h:outputText value="#{job.name}"/>
+ </td>
+ <td>
+ <h:outputText
value="#{job.repeat}"/>
+ </td>
+ <td>
+ <h:outputText
value="#{job.transitionName}"/>
+ </td>
+ </h:outputText>
+ <h:outputText rendered="#{viewMode ==
'all'}">
+ <td>
+ <h:outputText value="#{job.class.name ==
'org.jbpm.job.Timer' ? 'Timer' : job.class.name ==
'org.jbpm.job.ExecuteActionJob' ? 'Execute Action' : job.class.name ==
'org.jbpm.job.ExecuteNodeJob' ? 'Execute Node' :
job.class.name}"/>
+ </td>
+ </h:outputText>
+ <td>
+ <h:outputText value="#{job.dueDate}">
+ <f:convertDateTime type="both"/>
+ </h:outputText>
+ </td>
+ <td>
+ <h:outputText value="Running"
rendered="#{! job.suspended}" styleClass="statusRunning"/>
+ <h:outputText value="Suspended"
rendered="#{job.suspended}" styleClass="statusSuspended"/>
+ </td>
+ <td>
+ <h:outputLink value="procins.jsf"
rendered="#{job.processInstance != null}">
+ <f:param name="id"
value="#{job.processInstance.id}"/>
+ <gs:b>
+ <h:outputText
value="#{job.processInstance.processDefinition.name}"/>
+ </gs:b>
+ <h:outputText value=" ID
#{job.processInstance.id}"/>
+ </h:outputLink>
+ </td>
+ <td>
+ <h:outputLink value="token.jsf"
rendered="#{job.token != null}">
+ <f:param name="id"
value="#{job.token.id}"/>
+ <h:outputText value="#{job.token.name}"
rendered="#{! empty job.token.name}"/>
+ <h:outputText value="(Unnamed)"
rendered="#{empty job.token.name}"/>
+ <h:outputText value=" ID
#{job.token.id}"/>
+ </h:outputLink>
+ </td>
+ <td>
+ <h:outputLink value="task.jsf"
rendered="#{job.taskInstance != null}">
+ <f:param name="id"
value="#{job.taskInstance.id}"/>
+ <h:outputText
value="#{job.taskInstance.name}"/>
+ </h:outputLink>
+ </td>
+ <td>
+ <h:outputText value="#{job.exception}"/>
+ </td>
+ <td>
+ <h:outputText value="#{job.retries}"/>
+ </td>
+ <td>
+ <h:form>
+ <h:commandLink onclick="return
confirm('Are you sure you want to delete this job? The operation cannot be
undone.');">
+ <h:outputText value="Delete"/>
+ <j4j:loadJob id="#{job.id}"
target="#{xjob}"/>
+ <j4j:delete value="#{xjob}"/>
+ <n:nav outcome="success"
redirect="true" storeMessages="true"/>
+ <n:nav outcome="error"
redirect="true" storeMessages="true"/>
+ </h:commandLink>
+ </h:form>
+ </td>
+ </gs:tr>
+ </gd:repeat>
+ </tbody>
+ </h:outputText>
+ <h:outputText rendered="#{empty jobs}">
+ <tbody class="filter">
+ <tr>
+ <td colspan="#{colspan}"
style="text-align:center;">No results in view.</td>
+ </tr>
+ </tbody>
+ </h:outputText>
+ </table>
+ </ui:define>
+</ui:composition>
+
+</html>
\ No newline at end of file
Added:
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/sa/procdef.xhtml
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/sa/procdef.xhtml
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/sa/procdef.xhtml 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,182 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:gd="http://gravel.jboss.org/jsf/1.0/data"
+
xmlns:ga="http://gravel.jboss.org/jsf/1.0/action"
+
xmlns:gs="http://gravel.jboss.org/jsf/1.0/simple"
+
xmlns:n="http://gravel.jboss.org/jsf/1.0/navigation"
+
xmlns:j4j="http://jbpm.org/jbpm4jsf/core"
+ >
+<ui:composition template="t_loggedin.xhtml">
+<ui:define name="menu">
+<ga:responseActions>
+ <ga:parameter name="id" target="#{id}"
required="true">
+ <f:validateLongRange minimum="0"/>
+ <f:convertNumber integerOnly="true"
maxFractionDigits="0"/>
+ </ga:parameter>
+ <ga:parameter name="view" target="#{viewMode}"
default="ins"/>
+ <!-- process intsances parameters -->
+ <ga:parameter name="pi_key" target="#{pi_key}"
default="">
+ <f:converter converterId="gravel.StringWildcardFilter"/>
+ </ga:parameter>
+ <ga:parameter name="fr" target="#{filter_running}"
default="true"/>
+ <ga:parameter name="fs" target="#{filter_suspended}"
default="true"/>
+ <ga:parameter name="fe" target="#{filter_ended}"
default="false"/>
+ <!-- tasks parameters -->
+ <ga:parameter name="name" target="#{task_filter_name}"
default="">
+ <f:converter converterId="gravel.StringWildcardFilter"/>
+ </ga:parameter>
+ <ga:parameter name="actor" target="#{task_filter_actor}"
default="">
+ <f:converter converterId="gravel.StringWildcardFilter"/>
+ </ga:parameter>
+ <ga:parameter name="fn" target="#{task_filter_notstarted}"
default="true"/>
+ <ga:parameter name="fr" target="#{task_filter_running}"
default="true"/>
+ <ga:parameter name="fs" target="#{task_filter_suspended}"
default="true"/>
+ <ga:parameter name="fe" target="#{task_filter_ended}"
default="false"/>
+
+ <j4j:loadProcess id="#{id}" target="#{pd}"/>
+ <j4j:listTasksForProcess unless="#{viewMode != 'task'}"
process="#{pd}" target="#{tasks}"/>
+ <j4j:listProcessInstances unless="#{viewMode != 'ins'}"
target="#{piList}" processId="#{id}"/>
+ <gd:filter source="#{piList}" target="#{piList}"
entryVar="entry" test="#{filter_ended and entry.end != null or entry.end ==
null and (filter_suspended and entry.suspended or filter_running and !
entry.suspended)}"/>
+ <gd:filter if="#{! empty pi_key}" source="#{piList}"
target="#{piList}" entryVar="entry" filter="#{pi_key}"
filterArgument="#{entry.key == null ? '' : entry.key}"/>
+
+ <gd:filter source="#{tasks}" target="#{tasks}"
entryVar="entry" test="#{task_filter_notstarted and entry.start == null and
entry.end == null or task_filter_ended and entry.end != null or (entry.start != null and
entry.end == null) and (task_filter_suspended and entry.suspended or task_filter_running
and ! entry.suspended)}"/>
+ <gd:filter if="#{! empty task_filter_name}" entryVar="entry"
source="#{tasks}" target="#{tasks}"
filter="#{task_filter_name}" filterArgument="#{entry.name == null ?
'' : entry.name}"/>
+ <gd:filter if="#{! empty task_filter_actor}" entryVar="entry"
source="#{tasks}" target="#{tasks}"
filter="#{task_filter_actor}" filterArgument="#{entry.actorId == null ?
'' : entry.actorId}"/>
+</ga:responseActions>
+<gs:div style="padding:0;margin:0">
+ <ga:attribute name="rendered" value="#{pd != null}"/>
+ <table class="leftmenu">
+ <tbody>
+ <tr class="leftmenuheader">
+ <th colspan="2">Process Summary</th>
+ </tr>
+ <tr class="leftmenu">
+ <th>Process Link</th>
+ <td>
+ <h:outputLink value="procdef.jsf"
style="font-weight:bold">
+ <f:param name="id" value="#{id}"/>
+ <h:outputText value="ID #{id}"/>
+ </h:outputLink>
+ </td>
+ </tr>
+ <tr class="leftmenu">
+ <th>Name</th>
+ <td>
+ <h:outputText value="#{pd.name}"/>
+ </td>
+ </tr>
+ <tr class="leftmenu">
+ <th>Version</th>
+ <td>
+ <h:outputText value="#{pd.version}"/>
+ </td>
+ </tr>
+ <tr class="leftmenuheader">
+ <th colspan="2" class="nf">Views</th>
+ </tr>
+ <tr class="leftmenu">
+ <td colspan="2">
+ <gs:ul>
+ <gs:li>
+ <h:outputLink style="#{viewMode == 'ins' ?
'font-weight:bold' : ''}">
+ <f:param name="id"
value="#{id}"/>
+ <f:param name="view"
value="ins"/>
+ Process Instances
+ </h:outputLink>
+ </gs:li>
+ <gs:li>
+ <h:outputLink style="#{viewMode == 'task' ?
'font-weight:bold' : ''}">
+ <f:param name="id"
value="#{id}"/>
+ <f:param name="view"
value="task"/>
+ Tasks
+ </h:outputLink>
+ </gs:li>
+ <gs:li>
+ <h:outputLink style="#{viewMode == 'img' ?
'font-weight:bold' : ''}">
+ <f:param name="id"
value="#{id}"/>
+ <f:param name="view"
value="img"/>
+ Process Image
+ </h:outputLink>
+ </gs:li>
+ </gs:ul>
+ </td>
+ </tr>
+ <tr class="leftmenuheader">
+ <th colspan="2" class="nf">Actions</th>
+ </tr>
+ <tr class="leftmenu">
+ <td colspan="2">
+ <h:form>
+ <h:inputHidden value="#{id}"/>
+ <gs:ul>
+ <gs:li>
+ <h:commandLink value="Start">
+ <ga:parameter name="id"
target="#{id}">
+ <f:convertNumber integerOnly="true"
maxFractionDigits="0"/>
+ </ga:parameter>
+ <j4j:loadProcess id="#{id}"
target="#{pd}"/>
+ <j4j:startProcess process="#{pd}"
target="#{pi}"/>
+ <n:nav outcome="started"
url="procins.jsf?id=#{pi.id}" storeMessages="true"/>
+ </h:commandLink>
+ <h:outputText value=" a new instance of this
process"/>
+ </gs:li>
+ <gs:li>
+ <h:commandLink value="Delete"
onclick="return confirm('Are you sure you want to permanently delete this
process? This operation cannot be undone.')">
+ <ga:parameter name="id"
target="#{id}">
+ <f:convertNumber integerOnly="true"
maxFractionDigits="0"/>
+ </ga:parameter>
+ <j4j:loadProcess id="#{id}"
target="#{pd}"/>
+ <j4j:delete value="#{pd}"/>
+ <n:nav outcome="success"
url="processes.jsf" storeMessages="true"/>
+ </h:commandLink>
+ <h:outputText value=" this process"/>
+ </gs:li>
+ </gs:ul>
+ </h:form>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+
+</gs:div>
+</ui:define>
+
+<ui:define name="body">
+ <gs:div>
+ <ga:attribute name="rendered" value="#{pd != null}"/>
+ <h:outputText>
+ <ga:attribute name="rendered" value="#{viewMode ==
'ins'}"/>
+ <ui:decorate template="t_processinstances.xhtml">
+ <ui:define name="processinstances_title">
+ Process Instances <b>for "#{pd.name}"
v#{pd.version}</b>
+ </ui:define>
+ <ui:define name="params">
+ <f:param name="id" value="#{id}"/>
+ </ui:define>
+ </ui:decorate>
+ </h:outputText>
+ <h:outputText>
+ <ga:attribute name="rendered" value="#{viewMode ==
'task'}"/>
+ <ui:decorate template="t_tasks.xhtml">
+ <ui:define name="tasks_title">
+ Tasks <b>for "#{pd.name}" v#{pd.version}</b>
+ </ui:define>
+ <ui:define name="params">
+ <f:param name="id" value="#{id}"/>
+ <f:param name="view" value="#{viewMode}"/>
+ </ui:define>
+ </ui:decorate>
+ </h:outputText>
+ <h:outputText>
+ <ga:attribute name="rendered" value="#{viewMode ==
'img'}"/>
+ <img alt="[Process Image Not Available]"
src="pi/#{id}.jpg" style="margin-left:auto;margin-right:auto"/>
+ </h:outputText>
+ </gs:div>
+</ui:define>
+</ui:composition>
+
+</html>
\ No newline at end of file
Added:
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/sa/processes.xhtml
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/sa/processes.xhtml
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/sa/processes.xhtml 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,186 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:gd="http://gravel.jboss.org/jsf/1.0/data"
+
xmlns:ga="http://gravel.jboss.org/jsf/1.0/action"
+
xmlns:gs="http://gravel.jboss.org/jsf/1.0/simple"
+
xmlns:n="http://gravel.jboss.org/jsf/1.0/navigation"
+
xmlns:j4j="http://jbpm.org/jbpm4jsf/core"
+>
+ <ui:composition template="../sa/t_loggedin.xhtml">
+ <ui:define name="actions">
+ <ga:responseActions>
+ <j4j:listProcesses target="#{proclist}"/>
+ <ga:parameter name="page" target="#{page}"
default="1">
+ <f:convertNumber integerOnly="true"/>
+ </ga:parameter>
+ <ga:parameter name="name" target="#{name}"
default="">
+ <f:converter
converterId="gravel.StringWildcardFilter"/>
+ </ga:parameter>
+ <ga:parameter name="version" target="#{version}"
default="">
+ <f:converter converterId="gravel.RangeListFilter"/>
+ </ga:parameter>
+ <gd:filter source="#{proclist}"
target="#{proclist}" entryVar="entry" filter="#{name}"
filterArgument="#{entry.name}"/>
+ <gd:filter source="#{proclist}"
target="#{proclist}" entryVar="entry" filter="#{version}"
filterArgument="#{entry.version}"/>
+ <!-- calculate action column size -->
+ <f:setPropertyActionListener value="1"
target="#{actionColspan}"/>
+ <ga:checkRole roles="#{access.role.process.delete}">
+ <f:setPropertyActionListener value="#{actionColspan +
1}" target="#{actionColspan}"/>
+ </ga:checkRole>
+ <ga:checkRole roles="#{access.role.process.start}">
+ <f:setPropertyActionListener value="#{actionColspan +
1}" target="#{actionColspan}"/>
+ </ga:checkRole>
+ <gd:pager target="#{pager}" value="#{proclist}"
page="#{page}"/>
+ </ga:responseActions>
+ </ui:define>
+
+ <ui:define name="menu">
+ <table class="leftmenu">
+ <tbody>
+ <tr class="leftmenuheader">
+ <th colspan="#{actionColspan}">
+ <h:outputText
value="#{msgs['menu.heading.actions']}"/>
+ </th>
+ </tr>
+ <tr class="leftmenu">
+ <td colspan="#{actionColspan}">
+ <h:form>
+ <gs:ul>
+ <ga:checkRole
roles="#{access.role.process.deploy}">
+ <gs:li>
+ <h:outputText
value="#{msgs['processes.action.deploy.beforelink']} "/>
+ <h:outputLink
value="deployproc.jsf">
+ <h:outputText
value="#{msgs['processes.action.deploy.link']}"/>
+ </h:outputLink>
+ <h:outputText value="
#{msgs['processes.action.deploy.afterlink']}"/>
+ </gs:li>
+ </ga:checkRole>
+ </gs:ul>
+ </h:form>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </ui:define>
+
+ <ui:define name="body">
+ <gs:div>
+ <ga:attribute name="rendered" value="#{proclist !=
null}"/>
+ <table class="results">
+ <thead>
+ <tr>
+ <gs:th>
+ <ga:attribute name="colspan"
value="#{actionColspan + 3}" type="int"/>
+ <ui:decorate template="t_pager.xhtml">
+ <ui:define name="pager_params">
+ <f:param name="name"
value="#{name}"/>
+ <f:param name="version"
value="#{version}"/>
+ </ui:define>
+ </ui:decorate>
+ <h:outputText value="Processes"/>
+ </gs:th>
+ </tr>
+ <tr>
+ <td>
+ Process ID
+ </td>
+ <td style="width:120px;">
+ Process Name
+ </td>
+ <td style="width:50px;">
+ Version
+ </td>
+ <td colspan="#{actionColspan}">
+ Actions
+ </td>
+ </tr>
+ </thead>
+ <tbody class="filter">
+ <tr>
+ <td/>
+ <td>
+ <input name="name_i" type="text"
style="width:110px;" value="#{name}"
onkeypress="keypress(event,'apply')"/>
+ </td>
+ <td>
+ <input name="version_i"
type="text" style="width:40px;" value="#{version}"
onkeypress="keypress(event,'apply')"/>
+ </td>
+ <td colspan="#{actionColspan}"
style="width:150px;">
+ <form id="sf"
action="processes.jsf">
+ <input type="hidden"
name="name"/>
+ <input type="hidden"
name="version"/>
+ </form>
+ <a href="#" id="apply"
accesskey="a"
onclick="document.getElementsByName('name')[0].value=document.getElementsByName('name_i')[0].value;document.getElementsByName('version')[0].value=document.getElementsByName('version_i')[0].value;document.getElementById('sf').submit();return
false;">Apply Filter</a>
+ <a href="?"
style="margin-left:10px">Clear Filter</a>
+ </td>
+ </tr>
+ </tbody>
+ <h:outputText>
+ <ga:attribute name="rendered" value="#{! empty
proclist}"/>
+ <tbody class="results">
+ <gd:repeat value="#{proclist}"
var="pd" idVar="rid" first="#{pager.first}"
limit="#{pager.limit}">
+ <h:outputText rendered="#{false}">
+ <ga:attribute name="value"
value="#{rid}"/>
+ </h:outputText>
+ <gs:tr>
+ <ga:attribute name="styleClass"
value="#{rid % 2 == 0 ? 'odd' : 'even'}"/>
+ <td>
+ #{pd.id}
+ </td>
+ <td>
+ <h:outputText
value="#{pd.name}"/>
+ </td>
+ <td>
+ <h:outputText
value="#{pd.version}"/>
+ </td>
+ <td>
+ <h:outputLink
value="procdef.jsf?id=#{pd.id}">
+ Examine
+ </h:outputLink>
+ </td>
+ <ga:checkRole
roles="#{access.role.process.delete}">
+ <td>
+ <h:form>
+ <h:commandLink>Delete
+ <ga:attribute
name="onclick" value="return
confirm('#{msgs['confirm.process.delete']}')"/>
+ <f:param name="id"
value="#{pd.id}"/>
+ <ga:parameter name="id"
target="#{id}">
+ <f:convertNumber
integerOnly="true"/>
+ </ga:parameter>
+ <j4j:loadProcess
id="#{id}" target="#{pdx}"/>
+ <j4j:delete
value="#{pdx}"/>
+ <n:nav outcome="success"
redirect="true" storeMessages="true"/>
+ <n:nav outcome="error"
redirect="true" storeMessages="true"/>
+ </h:commandLink>
+ </h:form>
+ </td>
+ </ga:checkRole>
+ <ga:checkRole
roles="#{access.role.process.start}">
+ <td>
+ <h:form>
+ <h:commandLink>Start
+ <f:param name="id"
value="#{pd.id}"/>
+ <ga:parameter name="id"
target="#{id}">
+ <f:convertNumber
integerOnly="true"/>
+ </ga:parameter>
+ <j4j:loadProcess
id="#{id}" target="#{pdx}"/>
+ <j4j:startProcess
process="#{pdx}" target="#{pi}"/>
+ <n:nav outcome="started"
url="procins.jsf?id=#{pi.id}" storeMessages="true"/>
+ <n:nav outcome="error"
redirect="true" storeMessages="true"/>
+ </h:commandLink>
+ </h:form>
+ </td>
+ </ga:checkRole>
+ </gs:tr>
+ </gd:repeat>
+ </tbody>
+ </h:outputText>
+ </table>
+ </gs:div>
+ </ui:define>
+ </ui:composition>
+
+
+</html>
\ No newline at end of file
Added:
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/sa/procins.xhtml
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/sa/procins.xhtml
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/sa/procins.xhtml 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,304 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:gd="http://gravel.jboss.org/jsf/1.0/data"
+
xmlns:ga="http://gravel.jboss.org/jsf/1.0/action"
+
xmlns:gs="http://gravel.jboss.org/jsf/1.0/simple"
+
xmlns:n="http://gravel.jboss.org/jsf/1.0/navigation"
+
xmlns:j4j="http://jbpm.org/jbpm4jsf/core"
+ >
+<ui:composition template="t_loggedin.xhtml">
+
+<ui:define name="actions">
+ <ga:responseActions>
+ <ga:parameter name="id" target="#{id}"
required="true">
+ <f:validateLongRange minimum="0"/>
+ <f:convertNumber integerOnly="true"
maxFractionDigits="0"/>
+ </ga:parameter>
+ <ga:parameter name="view" target="#{viewMode}"
default="task"/>
+ <j4j:loadProcessInstance id="#{id}" target="#{pi}"/>
+ <gd:reverse source="#{pi.rootToken.comments}"
target="#{comments}"/>
+ <j4j:listTokens processInstance="#{pi}"
target="#{tokenList}"/>
+ <j4j:getDiagramInfo unless="#{viewMode != 'img'}"
process="#{pi.processDefinition}" target="#{diagramInfo}"/>
+ <j4j:listTasksForProcessInstance unless="#{viewMode !=
'task'}" target="#{tasks}" processInstance="#{pi}"/>
+ <gd:sort if="#{! empty tasks}" source="#{tasks}"
target="#{tasks}" entryVar="e" argument="#{e.id}"/>
+ <j4j:getVariableMap unless="#{viewMode != 'vars'}"
target="#{vars}" value="#{pi}"/>
+ <gd:sort if="#{! empty vars}" source="#{vars}"
target="#{vars}" entryVar="e" argument="#{e.key}"/>
+ <!-- tasks parameters -->
+ <ga:parameter name="name" target="#{task_filter_name}"
default="">
+ <f:converter converterId="gravel.StringWildcardFilter"/>
+ </ga:parameter>
+ <ga:parameter name="actor" target="#{task_filter_actor}"
default="">
+ <f:converter converterId="gravel.StringWildcardFilter"/>
+ </ga:parameter>
+ <ga:parameter name="fn" target="#{task_filter_notstarted}"
default="true"/>
+ <ga:parameter name="fr" target="#{task_filter_running}"
default="true"/>
+ <ga:parameter name="fs" target="#{task_filter_suspended}"
default="true"/>
+ <ga:parameter name="fe" target="#{task_filter_ended}"
default="false"/>
+
+ <gd:filter source="#{tasks}" target="#{tasks}"
entryVar="entry" test="#{task_filter_notstarted and entry.start == null and
entry.end == null or task_filter_ended and entry.end != null or (entry.start != null and
entry.end == null) and (task_filter_suspended and entry.suspended or task_filter_running
and ! entry.suspended)}"/>
+ <gd:filter if="#{! empty task_filter_name}"
entryVar="entry" source="#{tasks}" target="#{tasks}"
filter="#{task_filter_name}" filterArgument="#{entry.name == null ?
'' : entry.name}"/>
+ <gd:filter if="#{! empty task_filter_actor}"
entryVar="entry" source="#{tasks}" target="#{tasks}"
filter="#{task_filter_actor}" filterArgument="#{entry.actorId == null ?
'' : entry.actorId}"/>
+ </ga:responseActions>
+</ui:define>
+
+<ui:define name="menu">
+<gs:div style="padding:0;margin:0">
+ <ga:attribute name="rendered" value="#{pi != null}"/>
+ <table class="leftmenu">
+ <tbody>
+ <tr class="leftmenuheader">
+ <th colspan="2">Process Instance Summary</th>
+ </tr>
+ <tr class="leftmenu">
+ <th>Instance Link</th>
+ <td>
+ <h:outputLink style="font-weight:bold">
+ <f:param name="id" value="#{id}"/>
+ <h:outputText value="ID #{id}"/>
+ </h:outputLink>
+ </td>
+ </tr>
+ <tr class="leftmenu">
+ <th>Key</th>
+ <td>
+ <h:outputText value="#{pi.key}"/>
+ </td>
+ </tr>
+ <tr class="leftmenu">
+ <th>Process</th>
+ <td>
+ <h:outputLink value="procdef.jsf">
+ <f:param name="id"
value="#{pi.processDefinition.id}"/>
+ <h:outputText value="#{pi.processDefinition.name}
v#{pi.processDefinition.version}"/>
+ </h:outputLink>
+ </td>
+ </tr>
+ <tr class="leftmenu">
+ <th>Status</th>
+ <td>
+ <h:outputText value="Ended"
styleClass="statusEnded">
+ <ga:attribute name="rendered" value="#{pi.end
!= null}"/>
+ </h:outputText>
+ <h:outputText value=" (was suspended)"
style="font-style:italic">
+ <ga:attribute name="rendered" value="#{pi.end
!= null and pi.suspended}"/>
+ </h:outputText>
+ <h:outputText>
+ <ga:attribute name="rendered" value="#{pi.end
== null}"/>
+ <ga:attribute name="value"
value="#{pi.suspended ? 'Suspended' : 'Running'}"/>
+ <ga:attribute name="styleClass"
value="#{pi.suspended ? 'statusSuspended' :
'statusRunning'}"/>
+ </h:outputText>
+ </td>
+ </tr>
+ <tr class="leftmenu">
+ <th>Start Date</th>
+ <td>
+ <h:outputText value="#{pi.start}">
+ <f:convertDateTime type="both"/>
+ </h:outputText>
+ </td>
+ </tr>
+ <tr class="leftmenu">
+ <th>End Date</th>
+ <td>
+ <h:outputText value="#{pi.end}">
+ <f:convertDateTime type="both"/>
+ </h:outputText>
+ </td>
+ </tr>
+ <tr class="leftmenuheader">
+ <th colspan="2" class="nf">Views</th>
+ </tr>
+ <tr class="leftmenu">
+ <td colspan="2">
+ <gs:ul>
+ <gs:li>
+ <h:outputLink style="#{viewMode == 'task' ?
'font-weight:bold' : ''}">
+ <f:param name="id"
value="#{id}"/>
+ <f:param name="view"
value="task"/>
+ Tasks
+ </h:outputLink>
+ </gs:li>
+ <gs:li>
+ <h:outputLink style="#{viewMode == 'comments'
? 'font-weight:bold' : ''}">
+ <f:param name="id"
value="#{id}"/>
+ <f:param name="view"
value="comments"/>
+ Comments
+ </h:outputLink>
+ </gs:li>
+ <gs:li>
+ <h:outputLink style="#{viewMode == 'token' ?
'font-weight:bold' : ''}">
+ <f:param name="id"
value="#{id}"/>
+ <f:param name="view"
value="token"/>
+ Tokens
+ </h:outputLink>
+ </gs:li>
+ <gs:li>
+ <h:outputLink style="#{viewMode == 'img' ?
'font-weight:bold' : ''}">
+ <f:param name="id"
value="#{id}"/>
+ <f:param name="view"
value="img"/>
+ Process Image
+ </h:outputLink>
+ </gs:li>
+ <gs:li>
+ <h:outputLink style="#{viewMode == 'vars' ?
'font-weight:bold' : ''}">
+ <f:param name="id"
value="#{id}"/>
+ <f:param name="view"
value="vars"/>
+ Process Variables
+ </h:outputLink>
+ </gs:li>
+ </gs:ul>
+ </td>
+ </tr>
+ <tr class="leftmenuheader">
+ <th colspan="2" class="nf">Actions</th>
+ </tr>
+ <tr class="leftmenu">
+ <td colspan="2">
+ <h:form>
+ <h:inputHidden value="#{id}"/>
+ <gs:ul>
+ <gs:li rendered="#{pi.end == null}">
+ <h:commandLink value="Suspend">
+ <ga:attribute name="rendered"
value="#{! pi.suspended}"/>
+ <j4j:loadProcessInstance id="#{id}"
target="#{pi}"/>
+ <j4j:suspend value="#{pi}"/>
+ <n:nav outcome="success"
redirect="true" storeMessages="true"/>
+ <n:nav outcome="error"
redirect="true" storeMessages="true"/>
+ </h:commandLink>
+ <h:commandLink value="Resume">
+ <ga:attribute name="rendered"
value="#{pi.suspended}"/>
+ <j4j:loadProcessInstance id="#{id}"
target="#{pi}"/>
+ <j4j:resume value="#{pi}"/>
+ <n:nav outcome="success"
redirect="true" storeMessages="true"/>
+ <n:nav outcome="error"
redirect="true" storeMessages="true"/>
+ </h:commandLink>
+ <h:outputText value=" this process
instance"/>
+ </gs:li>
+ <gs:li>
+ <ga:attribute name="rendered"
value="#{pi.end == null}"/>
+ <h:commandLink value="End">
+ <j4j:loadProcessInstance id="#{id}"
target="#{pi}"/>
+ <j4j:cancel value="#{pi}"/>
+ <n:nav outcome="success"
redirect="true" storeMessages="true"/>
+ <n:nav outcome="error"
redirect="true" storeMessages="true"/>
+ </h:commandLink>
+ <h:outputText value=" this process
instance"/>
+ </gs:li>
+ <gs:li>
+ <h:commandLink value="Delete"
onclick="return confirm('Are you sure you want to permanently delete this process
instance? This operation cannot be undone.')">
+ <j4j:loadProcessInstance id="#{id}"
target="#{pi}" forUpdate="false"/>
+ <f:setPropertyActionListener
value="#{pi.processDefinition.id}" target="#{pdid}"/>
+ <j4j:delete value="#{pi}"/>
+ <f:setPropertyActionListener
value="#{null}" target="#{pi}"/>
+ <n:nav outcome="success"
url="procdef.jsf?id=#{pdid}" storeMessages="true"/>
+ <n:nav outcome="error"
redirect="true" storeMessages="true"/>
+ </h:commandLink>
+ <h:outputText value=" this process
instance"/>
+ </gs:li>
+ </gs:ul>
+ </h:form>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+
+</gs:div>
+</ui:define>
+
+<ui:define name="body">
+ <gs:div>
+ <ga:attribute name="rendered" value="#{pi != null}"/>
+ <h:outputText>
+ <ga:attribute name="rendered" value="#{viewMode ==
'comments'}"/>
+ <ui:decorate template="t_comments.xhtml">
+ <ui:define name="loadTarget">
+ <ga:parameter name="id" target="#{id}"
required="true">
+ <f:validateLongRange minimum="0"/>
+ <f:convertNumber integerOnly="true"
maxFractionDigits="0"/>
+ </ga:parameter>
+ <j4j:loadProcessInstance id="#{id}"
target="#{pi}"/>
+ <f:setPropertyActionListener value="#{pi.rootToken}"
target="#{target}"/>
+ </ui:define>
+ </ui:decorate>
+ </h:outputText>
+ <gs:div>
+ <ga:attribute name="style"
value="position:relative;height:#{diagramInfo.height}px;width:#{diagramInfo.width}px"/>
+ <ga:attribute name="rendered" value="#{viewMode ==
'img'}"/>
+ <img
+ alt=""
+ src="pi/#{pi.processDefinition.id}.jpg"
+ style="position:absolute;top:0;left:0"/>
+ <gd:repeat value="#{tokenList}" var="token">
+ <ui:fragment>
+ <ui:param name="node"
value="#{diagramInfo.nodeMap[token.node.name]}"/>
+ <gs:div>
+ <ga:attribute name="style" value="top:#{node.y
- 12}px;left:#{node.x + 2}px;width:#{node.width - 3}px;height:#{node.height +
11}px"/>
+ <ga:attribute name="styleClass"
value="#{token.end != null ? 'pboxs_e' : token.suspended ? 'pboxs_s'
: 'pboxs'}"/>
+ </gs:div>
+ <gs:div>
+ <ga:attribute name="style"
value="top:#{node.y}px;left:#{node.x}px;width:#{node.width -
3}px;height:#{node.height - 3}px"/>
+ <ga:attribute name="styleClass"
value="#{token.end != null ? 'pbox_e' : token.suspended ? 'pbox_s' :
'pbox'}"/>
+ </gs:div>
+ <gs:div>
+ <ga:attribute name="style" value="top:#{node.y
- 14}px;left:#{node.x}px;width:#{node.width - 1}px"/>
+ <ga:attribute name="styleClass"
value="pboxce"/>
+ <gs:div>
+ <ga:attribute name="styleClass"
value="#{token.end != null ? 'pboxc_e' : token.suspended ? 'pboxc_s'
: 'pboxc'}"/>
+ <h:outputLink value="token.jsf">
+ <f:param name="id"
value="#{token.id}"/>
+ <h:outputText value="Running"
rendered="#{token.end == null and ! token.suspended}"/>
+ <h:outputText value="Suspended"
rendered="#{token.end == null and token.suspended}"/>
+ <h:outputText value="Ended"
rendered="#{token.end != null}"/>
+ <h:outputText rendered="#{token.name !=
null}" value=" "#{token.name}""/>
+ </h:outputLink>
+ </gs:div>
+ </gs:div>
+ </ui:fragment>
+ </gd:repeat>
+ <gd:repeat value="#{diagramInfo.nodes}"
var="node">
+ </gd:repeat>
+ </gs:div>
+ <h:outputText>
+ <ga:attribute name="rendered" value="#{viewMode ==
'task'}"/>
+ <ui:decorate template="t_tasks.xhtml">
+ <ui:define name="params">
+ <f:param name="id" value="#{id}"/>
+ <f:param name="view" value="task"/>
+ </ui:define>
+ </ui:decorate>
+ </h:outputText>
+ <h:outputText>
+ <ga:attribute name="rendered" value="#{viewMode ==
'token'}"/>
+ <ui:decorate template="t_tokens.xhtml">
+ <ui:param name="tokens" value="#{tokenList}"/>
+ <ui:define name="params">
+ <f:param name="id" value="#{id}"/>
+ <f:param name="view" value="token"/>
+ </ui:define>
+ </ui:decorate>
+ </h:outputText>
+ <h:outputText>
+ <ga:attribute name="rendered" value="#{viewMode ==
'vars'}"/>
+ <ui:decorate template="t_vars.xhtml">
+ <ui:define name="loadEntity">
+ <ga:parameter name="id" target="#{id}"
required="true">
+ <f:validateLongRange minimum="0"/>
+ <f:convertNumber integerOnly="true"
maxFractionDigits="0"/>
+ </ga:parameter>
+ <j4j:loadProcessInstance id="#{id}"
target="#{entity}"/>
+ </ui:define>
+ <ui:define name="params">
+ <f:param name="id" value="#{id}"/>
+ <f:param name="view" value="vars"/>
+ </ui:define>
+ </ui:decorate>
+ </h:outputText>
+ </gs:div>
+</ui:define>
+</ui:composition>
+
+</html>
\ No newline at end of file
Added:
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/sa/t_comments.xhtml
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/sa/t_comments.xhtml
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/sa/t_comments.xhtml 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,77 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:gd="http://gravel.jboss.org/jsf/1.0/data"
+
xmlns:ga="http://gravel.jboss.org/jsf/1.0/action"
+
xmlns:gs="http://gravel.jboss.org/jsf/1.0/simple"
+
xmlns:n="http://gravel.jboss.org/jsf/1.0/navigation"
+
xmlns:j4j="http://jbpm.org/jbpm4jsf/core"
+ >
+<ui:component>
+ <h:outputText>
+ <ga:attribute name="rendered" value="#{! empty
comments}"/>
+ <table class="results" style="width:500px">
+ <thead>
+ <tr>
+ <th colspan="1">Comments</th>
+ </tr>
+ </thead>
+ <tbody class="results">
+ <gd:repeat value="#{comments}" var="comment"
idVar="rid">
+ <gs:tr>
+ <ga:attribute name="styleClass" value="#{rid %
2 == 0 ? 'odd' : 'even'}"/>
+ <td>
+ <gs:div>
+ <h:outputText value="Anonymous comment"
rendered="#{empty comment.actorId}"/>
+ <h:outputText value="Comment by "
rendered="#{! empty comment.actorId}"/>
+ <h:outputText value="#{comment.actorId}"
rendered="#{! empty comment.actorId}" style="font-weight:bold"/>
+ <h:outputText value=" relating to task
"" rendered="#{comment.taskInstance != null}"/>
+ <h:outputText
value="#{comment.taskInstance.name}" rendered="#{comment.taskInstance !=
null}" style="font-weight:bold"/>
+ <h:outputText value="""
rendered="#{comment.taskInstance != null}"/>
+ <h:outputText value=" on "/>
+ <h:outputText value="#{comment.time}"
style="white-space:nowrap">
+ <f:convertDateTime type="both"/>
+ </h:outputText>
+ </gs:div>
+ <h:outputText styleClass="comment"
value="#{comment.message}" escape="false">
+ <f:converter
converterId="gravel.BreakingEscape"/>
+ </h:outputText>
+ </td>
+ </gs:tr>
+ </gd:repeat>
+ </tbody>
+ </table>
+ <br/>
+ </h:outputText>
+ <h:form>
+ <table class="results" style="width:500px">
+ <thead>
+ <tr>
+ <th>Add a comment</th>
+ </tr>
+ </thead>
+ <tbody class="results">
+ <tr>
+ <td>
+ <h:inputTextarea styleClass="comment"
value="#{comment}"/>
+ </td>
+ </tr>
+ <tr>
+ <td style="text-align:right">
+ <h:commandButton value="Save">
+ <ui:insert name="loadTarget"/>
+ <j4j:addComment comment="#{comment}"
target="#{target}"/>
+ <n:nav outcome="success"
redirect="true" storeMessages="true"/>
+ <n:nav outcome="error" redirect="true"
storeMessages="true"/>
+ </h:commandButton>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </h:form>
+</ui:component>
+
+</html>
\ No newline at end of file
Added:
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/sa/t_loggedin.xhtml
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/sa/t_loggedin.xhtml
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/sa/t_loggedin.xhtml 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,54 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:gd="http://gravel.jboss.org/jsf/1.0/data"
+
xmlns:ga="http://gravel.jboss.org/jsf/1.0/action"
+
xmlns:gs="http://gravel.jboss.org/jsf/1.0/simple"
+
xmlns:n="http://gravel.jboss.org/jsf/1.0/navigation"
+
xmlns:j4j="http://jbpm.org/jbpm4jsf/core"
+>
+
+ <ui:composition template="../ua/t_base.xhtml">
+ <ui:define name="root_actions">
+ <gd:loadProperties path="access.properties"
var="access"/>
+ <ui:insert name="actions"/>
+ </ui:define>
+ <ui:define name="top">
+ <gs:span rendered="#{! empty request.remoteUser}"
style="float:right;vertical-align:bottom">
+ <h:form>
+ <h:outputFormat
value="#{msgs['top.loggedinas']}"
style="margin-right:20px">
+ <f:param value="#{request.remoteUser}"/>
+ </h:outputFormat>
+ <h:commandLink
value="#{msgs['top.logout']}">
+ <ga:logOut/>
+ <n:nav outcome="default"
redirect="true"/>
+ </h:commandLink>
+ </h:form>
+ </gs:span>
+ </ui:define>
+
+ <ui:define name="header">
+ <h:outputText value="#{msgs['topmenu.caption']}"
style="margin-left:30px;margin-right:10px"/>
+ <h:outputLink styleClass="headermenufirst"
value="processes.jsf" style="#{view.viewId == '/sa/processes.xhtml'
? 'font-weight:bold' : ''}">
+ <h:outputText
value="#{msgs['topmenu.processes']}"/>
+ </h:outputLink>
+ <h:outputLink styleClass="headermenu"
value="tasks.jsf" style="#{view.viewId == '/sa/tasks.xhtml' ?
'font-weight:bold' : ''}">
+ <h:outputText value="#{msgs['topmenu.tasks']}"/>
+ </h:outputLink>
+ <ga:checkRole roles="#{access.role.jobs}">
+ <h:outputLink styleClass="headermenu"
value="jobs.jsf" style="#{view.viewId == '/sa/jobs.xhtml' ?
'font-weight:bold' : ''}">
+ <h:outputText
value="#{msgs['topmenu.jobs']}"/>
+ </h:outputLink>
+ </ga:checkRole>
+ <ga:checkRole roles="#{access.role.identities}">
+ <h:outputLink styleClass="headermenu"
value="identities.jsf" style="#{view.viewId ==
'/sa/identities.xhtml' ? 'font-weight:bold' : ''}">
+ <h:outputText
value="#{msgs['topmenu.identities']}"/>
+ </h:outputLink>
+ </ga:checkRole>
+ </ui:define>
+ </ui:composition>
+
+</html>
\ No newline at end of file
Added:
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/sa/t_pager.xhtml
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/sa/t_pager.xhtml
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/sa/t_pager.xhtml 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,44 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:gd="http://gravel.jboss.org/jsf/1.0/data"
+
xmlns:ga="http://gravel.jboss.org/jsf/1.0/action"
+
xmlns:gs="http://gravel.jboss.org/jsf/1.0/simple"
+
xmlns:n="http://gravel.jboss.org/jsf/1.0/navigation"
+
xmlns:j4j="http://jbpm.org/jbpm4jsf/core"
+>
+<ui:component>
+ <span style="float:right">
+ <h:outputText value="Pager is null" rendered="#{pager ==
null}"/>
+ <h:outputText value="No results" rendered="#{pager != null and
pager.totalPages == 0}"/>
+ <h:outputText rendered="#{pager != null and pager.totalPages !=
0}">
+ <h:outputLink styleClass="pager"
disabled="#{pager.firstPage}">
+ <ui:insert name="pager_params"/>
+ <f:param name="page" value="1"/>
+ <h:outputText value="First"/>
+ </h:outputLink>
+ <h:outputText value=" "/>
+ <h:outputLink styleClass="pager"
disabled="#{pager.firstPage}">
+ <ui:insert name="pager_params"/>
+ <f:param name="page" value="#{pager.page -
1}"/>
+ <h:outputText value="Prev"/>
+ </h:outputLink>
+ <h:outputText value=" - Page #{pager.page} of #{pager.totalPages} -
"/>
+ <h:outputLink styleClass="pager"
disabled="#{pager.lastPage}">
+ <ui:insert name="pager_params"/>
+ <f:param name="page" value="#{pager.page +
1}"/>
+ <h:outputText value="Next"/>
+ </h:outputLink>
+ <h:outputText value=" "/>
+ <h:outputLink styleClass="pager"
disabled="#{pager.lastPage}">
+ <ui:insert name="pager_params"/>
+ <f:param name="page"
value="#{pager.totalPages}"/>
+ <h:outputText value="Last"/>
+ </h:outputLink>
+ </h:outputText>
+ </span>
+</ui:component>
+</html>
\ No newline at end of file
Added:
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/sa/t_processinstances.xhtml
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/sa/t_processinstances.xhtml
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/sa/t_processinstances.xhtml 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,201 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:gd="http://gravel.jboss.org/jsf/1.0/data"
+
xmlns:ga="http://gravel.jboss.org/jsf/1.0/action"
+
xmlns:gs="http://gravel.jboss.org/jsf/1.0/simple"
+
xmlns:n="http://gravel.jboss.org/jsf/1.0/navigation"
+
xmlns:j4j="http://jbpm.org/jbpm4jsf/core"
+ >
+<ui:component>
+
+<ga:responseActions>
+ <ga:parameter name="page" target="#{page}">
+ <f:convertNumber integerOnly="true"/>
+ </ga:parameter>
+ <gd:pager value="#{piList}" target="#{piList_pager}"
page="#{page}"/>
+</ga:responseActions>
+<table class="results">
+<thead>
+
+ <tr>
+ <th colspan="9">
+ <ui:decorate template="t_pager.xhtml">
+ <ui:define name="pager_params">
+ <ui:insert name="params"/>
+ <f:param name="pi_key" value="#{pi_key}"/>
+ <f:param name="fr"
value="#{filter_running}"/>
+ <f:param name="fs"
value="#{filter_suspended}"/>
+ <f:param name="fe"
value="#{filter_ended}"/>
+ </ui:define>
+ <ui:param name="pager"
value="#{piList_pager}"/>
+ </ui:decorate>
+ <ui:insert name="processinstances_title">Process
Instances</ui:insert>
+ </th>
+ </tr>
+ <tr>
+ <td>
+ Instance ID
+ </td>
+ <td style="width:120px;">
+ Key
+ </td>
+ <td style="width:110px;">
+ Status
+ </td>
+ <td style="width:150px;">
+ Start Date
+ </td>
+ <td style="width:150px;">
+ End Date
+ </td>
+ <td colspan="4">
+ Actions
+ </td>
+ </tr>
+</thead>
+<tbody class="filter">
+ <tr>
+ <td/>
+ <td>
+ <input name="key_i" type="text"
style="width:110px;" value="#{pi_key}"
+ onkeypress="keypress(event,'apply')"/>
+ </td>
+ <td style="white-space:nowrap;">
+ <h:selectBooleanCheckbox id="running_i"
value="#{filter_running}"/>
+ <gs:label forId="running_i"
styleClass="statusRunning">R</gs:label>
+ <h:selectBooleanCheckbox id="suspended_i"
value="#{filter_suspended}"/>
+ <gs:label forId="suspended_i"
styleClass="statusSuspended">S</gs:label>
+ <h:selectBooleanCheckbox id="ended_i"
value="#{filter_ended}"/>
+ <gs:label forId="ended_i"
styleClass="statusEnded">E</gs:label>
+ </td>
+ <td/>
+ <td/>
+ <td colspan="4" style="width:150px;">
+ <form id="sf" action="procdef.jsf">
+ <input type="hidden" name="id"
value="#{id}"/>
+ <input type="hidden" name="view"
value="#{viewMode}"/>
+ <input type="hidden" name="pi_key"/>
+ <input type="hidden" name="fr"/>
+ <input type="hidden" name="fs"/>
+ <input type="hidden" name="fe"/>
+ </form>
+ <a id="apply" accesskey="a"
+
onclick="document.getElementsByName('pi_key')[0].value=document.getElementsByName('key_i')[0].value;if(document.getElementById('running_i').checked)
document.getElementsByName('fr')[0].value='true';if(document.getElementById('suspended_i').checked)
document.getElementsByName('fs')[0].value='true';if(document.getElementById('ended_i').checked)
document.getElementsByName('fe')[0].value='true';document.getElementById('sf').submit();return
false;">Apply
+ Filter</a>
+ <h:outputLink style="margin-left:10px">
+ <h:outputText value="Clear Filter"/>
+ <ui:insert name="params"/>
+ </h:outputLink>
+ </td>
+ </tr>
+</tbody>
+<h:outputText>
+ <ga:attribute name="rendered" value="#{! empty piList}"/>
+ <tbody class="results">
+ <gd:repeat value="#{piList}" var="pi"
idVar="rid" first="#{piList_pager.first}"
limit="#{piList_pager.limit}">
+ <gs:tr>
+ <ga:attribute name="styleClass" value="#{rid % 2 == 0 ?
'odd' : 'even'}"/>
+ <td>
+ #{pi.id}
+ </td>
+ <td>
+ <h:outputText value="#{pi.key}"/>
+ </td>
+ <td>
+ <h:outputText value="Ended"
styleClass="statusEnded">
+ <ga:attribute name="rendered" value="#{pi.end
!= null}"/>
+ </h:outputText>
+ <h:outputText value=" (was suspended)"
style="font-style:italic">
+ <ga:attribute name="rendered" value="#{pi.end
!= null and pi.suspended}"/>
+ </h:outputText>
+ <h:outputText>
+ <ga:attribute name="rendered" value="#{pi.end
== null}"/>
+ <ga:attribute name="value"
value="#{pi.suspended ? 'Suspended' : 'Running'}"/>
+ <ga:attribute name="styleClass"
value="#{pi.suspended ? 'statusSuspended' :
'statusRunning'}"/>
+ </h:outputText>
+ </td>
+ <td>
+ <h:outputText value="#{pi.start}">
+ <f:convertDateTime type="both"/>
+ </h:outputText>
+ </td>
+ <td>
+ <h:outputText value="#{pi.end}">
+ <f:convertDateTime type="both"/>
+ </h:outputText>
+ </td>
+ <td>
+ <h:outputLink value="procins.jsf?id=#{pi.id}">
+ Examine
+ </h:outputLink>
+ </td>
+ <td>
+ <h:form>
+ <h:commandLink
+ onclick="return confirm('Are you sure you want
to permanently delete this process? This operation cannot be undone.')">
+ Delete
+ <f:param name="pix_id"
value="#{pi.id}"/>
+ <ga:parameter name="pix_id"
target="#{pix_id}">
+ <f:convertNumber integerOnly="true"/>
+ </ga:parameter>
+ <j4j:loadProcessInstance id="#{pix_id}"
target="#{pix}" forUpdate="false"/>
+ <j4j:delete value="#{pix}"/>
+ <f:setPropertyActionListener value="#{null}"
target="#{pix}"/>
+ <n:nav outcome="success"
redirect="true" storeMessages="true"/>
+ <n:nav outcome="error" redirect="true"
storeMessages="true"/>
+ </h:commandLink>
+ </h:form>
+ </td>
+ <td>
+ <h:form>
+ <h:commandLink onclick="return confirm('Are you sure
you want to end this process?')">End
+ <ga:attribute name="rendered"
value="#{pi.end == null}"/>
+ <f:param name="pix_id"
value="#{pi.id}"/>
+ <ga:parameter name="pix_id"
target="#{pix_id}">
+ <f:convertNumber integerOnly="true"/>
+ </ga:parameter>
+ <j4j:loadProcessInstance id="#{pix_id}"
target="#{pix}"/>
+ <j4j:cancel value="#{pix}"/>
+ <n:nav outcome="success"
redirect="true" storeMessages="true"/>
+ <n:nav outcome="error" redirect="true"
storeMessages="true"/>
+ </h:commandLink>
+ </h:form>
+ </td>
+ <td>
+ <h:form>
+ <h:commandLink>Suspend
+ <ga:attribute name="rendered"
value="#{pi.end == null and ! pi.suspended}"/>
+ <f:param name="pix_id"
value="#{pi.id}"/>
+ <ga:parameter name="pix_id"
target="#{pix_id}">
+ <f:convertNumber integerOnly="true"/>
+ </ga:parameter>
+ <j4j:loadProcessInstance id="#{pix_id}"
target="#{pix}"/>
+ <j4j:suspend value="#{pix}"/>
+ <n:nav outcome="success"
redirect="true" storeMessages="true"/>
+ <n:nav outcome="error" redirect="true"
storeMessages="true"/>
+ </h:commandLink>
+ <h:commandLink>Resume
+ <ga:attribute name="rendered"
value="#{pi.end == null and pi.suspended}"/>
+ <f:param name="pix_id"
value="#{pi.id}"/>
+ <ga:parameter name="pix_id"
target="#{pix_id}">
+ <f:convertNumber integerOnly="true"/>
+ </ga:parameter>
+ <j4j:loadProcessInstance id="#{pix_id}"
target="#{pix}"/>
+ <j4j:resume value="#{pix}"/>
+ <n:nav outcome="success"
redirect="true" storeMessages="true"/>
+ <n:nav outcome="error" redirect="true"
storeMessages="true"/>
+ </h:commandLink>
+ </h:form>
+ </td>
+ </gs:tr>
+ </gd:repeat>
+ </tbody>
+</h:outputText>
+</table>
+</ui:component>
+
+</html>
\ No newline at end of file
Added:
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/sa/t_tasks.xhtml
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/sa/t_tasks.xhtml
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/sa/t_tasks.xhtml 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,241 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:gd="http://gravel.jboss.org/jsf/1.0/data"
+
xmlns:ga="http://gravel.jboss.org/jsf/1.0/action"
+
xmlns:gs="http://gravel.jboss.org/jsf/1.0/simple"
+
xmlns:n="http://gravel.jboss.org/jsf/1.0/navigation"
+
xmlns:j4j="http://jbpm.org/jbpm4jsf/core"
+>
+<ui:component>
+ <ga:checkRole roles="#{access.role.tasks}">
+ <ga:responseActions>
+ <ga:parameter name="page" target="#{page}">
+ <f:convertNumber integerOnly="true"/>
+ </ga:parameter>
+ <gd:pager value="#{tasks}" target="#{tasks_pager}"
page="#{page}"/>
+ </ga:responseActions>
+ <table class="results">
+ <thead>
+ <tr>
+ <th colspan="10">
+ <ui:decorate template="t_pager.xhtml">
+ <ui:param name="pager"
value="#{tasks_pager}"/>
+ <ui:define name="pager_params">
+ <ui:insert name="params"/>
+ </ui:define>
+ </ui:decorate>
+ <ui:insert name="tasks_title">Tasks</ui:insert>
+ </th>
+ </tr>
+ <tr>
+ <td>
+ <h:outputText value="ID"/>
+ </td>
+ <td>
+ <h:outputText value="Name"/>
+ </td>
+ <td>
+ <h:outputText value="Pooled Actors"/>
+ </td>
+ <td>
+ <h:outputText value="Assigned To"/>
+ </td>
+ <td>
+ <h:outputText value="Status"/>
+ </td>
+ <td>
+ <h:outputText value="Start Date"/>
+ </td>
+ <td>
+ <h:outputText value="End Date"/>
+ </td>
+ <td colspan="3">
+ <h:outputText value="Actions"/>
+ </td>
+ </tr>
+ </thead>
+ <tbody class="filter">
+ <tr>
+ <td/>
+ <td>
+ <input name="name_i" type="text"
style="width:150px;" value="#{task_filter_name}"
onkeypress="keypress(event,'apply')"/>
+ </td>
+ <td/>
+ <td>
+ <input name="actor_i" type="text"
style="width:80px;" value="#{task_filter_actor}"
onkeypress="keypress(event,'apply')"/>
+ </td>
+ <td style="width:120px;white-space:nowrap">
+ <h:selectBooleanCheckbox id="task_notstarted_i"
value="#{task_filter_notstarted}"/>
+ <gs:label forId="task_notstarted_i"
styleClass="statusNotstarted">N</gs:label>
+ <h:selectBooleanCheckbox id="task_running_i"
value="#{task_filter_running}"/>
+ <gs:label forId="task_running_i"
styleClass="statusRunning">R</gs:label>
+ <h:selectBooleanCheckbox id="task_suspended_i"
value="#{task_filter_suspended}"/>
+ <gs:label forId="task_suspended_i"
styleClass="statusSuspended">S</gs:label>
+ <h:selectBooleanCheckbox id="task_ended_i"
value="#{task_filter_ended}"/>
+ <gs:label forId="task_ended_i"
styleClass="statusEnded">E</gs:label>
+ </td>
+ <td/>
+ <td/>
+ <td colspan="3">
+ <gs:form id="tsf">
+ <h:outputText rendered="#{id != null}">
+ <input type="hidden" name="id"
value="#{id}"/>
+ </h:outputText>
+ <h:outputText rendered="#{view != null}">
+ <input type="hidden" name="view"
value="#{viewMode}"/>
+ </h:outputText>
+ <input type="hidden" name="name"/>
+ <input type="hidden" name="actor"/>
+ <input type="hidden" name="fn"/>
+ <input type="hidden" name="fr"/>
+ <input type="hidden" name="fs"/>
+ <input type="hidden" name="fe"/>
+ </gs:form>
+ <a id="apply" accesskey="a"
+
onclick="copycheck('task_notstarted_i','fn');copycheck('task_running_i','fr');copycheck('task_suspended_i','fs');copycheck('task_ended_i','fe');copyinput('name_i','name');copyinput('actor_i','actor');document.getElementById('tsf').submit();return
false;">Apply
+ Filter</a>
+ <h:outputLink style="margin-left:10px">Clear Filter
+ <f:param name="id" value="#{id}"/>
+ <f:param name="view" value="#{viewMode}"/>
+ </h:outputLink>
+ </td>
+ </tr>
+ </tbody>
+ <h:outputText>
+ <ga:attribute name="rendered" value="#{! empty tasks}"/>
+ <tbody class="results">
+ <gd:repeat value="#{tasks}" var="task" idVar="rid"
first="#{tasks_pager.first}" limit="#{tasks_pager.limit}">
+ <gs:tr>
+ <ga:attribute name="styleClass" value="#{rid % 2 == 0 ?
'odd' : 'even'}"/>
+ <td>
+ <h:outputText value="#{task.id}"/>
+ </td>
+ <td>
+ <h:outputText value="#{task.name}"/>
+ </td>
+ <td>
+ <ga:responseActions>
+ <gd:sort source="#{task.pooledActors}"
target="#{taskActors}" entryVar="e"
argument="#{e.actorId}"/>
+ </ga:responseActions>
+ <h:form>
+ <gd:repeat>
+ <ga:attribute name="value"
value="#{taskActors}"/>
+ <ga:attribute name="var" value="actor"/>
+ <ga:attribute name="rendered" value="#{! empty
task.pooledActors}"/>
+ <h:outputText value="#{actor.actorId}"/>
+ <ga:checkRole roles="#{access.role.task.assign}">
+ <h:outputText value=" - " rendered="#{task.end ==
null and task.actorId != actor.actorId}"/>
+ <h:commandLink rendered="#{task.end == null and task.actorId
!= actor.actorId}">
+ <f:param name="xtaskId"
value="#{task.id}"/>
+ <f:param name="xactorId"
value="#{actor.actorId}"/>
+ <ga:parameter name="xtaskId"
target="#{xtaskId}"/>
+ <ga:parameter name="xactorId"
target="#{xactorId}"/>
+ <ga:attribute name="value"
value="#{task.actorId == null ? 'Assign' : 'Reassign'}"/>
+ <j4j:loadTask id="#{xtaskId}"
target="#{xtask}"/>
+ <j4j:assignTask task="#{xtask}"
actorId="#{xactorId}"/>
+ <n:nav outcome="success" redirect="true"
storeMessages="true"/>
+ <n:nav outcome="error" redirect="true"
storeMessages="true"/>
+ </h:commandLink>
+ </ga:checkRole>
+ <br/>
+ </gd:repeat>
+ </h:form>
+ </td>
+ <td>
+ <h:outputText value="#{task.actorId}"/>
+ </td>
+ <td>
+ <h:outputText value="Ended" styleClass="statusEnded">
+ <ga:attribute name="rendered" value="#{task.end !=
null}"/>
+ </h:outputText>
+ <h:outputText value=" (was suspended)"
style="font-style:italic">
+ <ga:attribute name="rendered" value="#{task.end != null and
task.suspended}"/>
+ </h:outputText>
+ <h:outputText value="Not Started"
styleClass="statusNotstarted">
+ <ga:attribute name="rendered" value="#{task.end == null and
task.start == null}"/>
+ </h:outputText>
+ <h:outputText value=" (suspended)"
style="font-style:italic">
+ <ga:attribute name="rendered" value="#{task.start == null
and task.suspended}"/>
+ </h:outputText>
+ <h:outputText>
+ <ga:attribute name="rendered" value="#{task.end == null and
task.start != null}"/>
+ <ga:attribute name="value" value="#{task.suspended ?
'Suspended' : 'Running'}"/>
+ <ga:attribute name="styleClass" value="#{task.suspended ?
'statusSuspended' : 'statusRunning'}"/>
+ </h:outputText>
+ </td>
+ <td>
+ <h:outputText value="#{task.start}">
+ <f:convertDateTime type="both"/>
+ </h:outputText>
+ </td>
+ <td>
+ <h:outputText value="#{task.end}">
+ <f:convertDateTime type="both"/>
+ </h:outputText>
+ </td>
+ <td>
+ <h:outputLink value="task.jsf">
+ <h:outputText value="Examine"/>
+ <f:param name="id" value="#{task.id}"/>
+ </h:outputLink>
+ </td>
+ <td style="width:50px">
+ <h:form>
+ <h:commandLink value="Suspend">
+ <ga:attribute name="rendered" value="#{! task.suspended
and task.end == null}"/>
+ <j4j:loadTask id="#{task.id}"
target="#{xtask}"/>
+ <j4j:suspend value="#{xtask}"/>
+ <n:nav outcome="success" redirect="true"
storeMessages="true"/>
+ <n:nav outcome="error" redirect="true"
storeMessages="true"/>
+ </h:commandLink>
+ <h:commandLink value="Resume">
+ <ga:attribute name="rendered" value="#{task.suspended
and task.end == null}"/>
+ <j4j:loadTask id="#{task.id}"
target="#{xtask}"/>
+ <j4j:resume value="#{xtask}"/>
+ <n:nav outcome="success" redirect="true"
storeMessages="true"/>
+ <n:nav outcome="error" redirect="true"
storeMessages="true"/>
+ </h:commandLink>
+ </h:form>
+ </td>
+ <td style="width:90px">
+ <h:form>
+ <h:commandLink value="Start">
+ <ga:attribute name="rendered" value="#{task.start ==
null and task.end == null}"/>
+ <j4j:loadTask id="#{task.id}"
target="#{xtask}"/>
+ <j4j:startTask task="#{xtask}"/>
+ <n:nav outcome="success" redirect="true"
storeMessages="true"/>
+ <n:nav outcome="error" redirect="true"
storeMessages="true"/>
+ </h:commandLink>
+ <ga:responseActions>
+ <gd:sort source="#{task.availableTransitions}"
target="#{transitions}" entryVar="e"
argument="#{e.name}"/>
+ </ga:responseActions>
+ <gd:repeat value="#{transitions}"
var="transition">
+ <ga:attribute name="rendered" value="#{task.start !=
null and task.end == null and ! task.suspended}"/>
+ <h:commandLink>
+ <h:outputText value="End"/>
+ <h:outputText value=": " rendered="#{! empty
transition.name}"/>
+ <gs:b>
+ <ga:attribute name="rendered" value="#{! empty
transition.name}"/>
+ <h:outputText value="#{transition.name}"/>
+ </gs:b>
+ <j4j:loadTask id="#{task.id}"
target="#{xtask}"/>
+ <j4j:completeTask task="#{xtask}"
transition="#{transition.name}"/>
+ <n:nav outcome="success" redirect="true"
storeMessages="true"/>
+ <n:nav outcome="error" redirect="true"
storeMessages="true"/>
+ </h:commandLink><br/>
+ </gd:repeat>
+ </h:form>
+ </td>
+ </gs:tr>
+ </gd:repeat>
+ </tbody>
+ </h:outputText>
+ </table>
+ </ga:checkRole>
+</ui:component>
+
+</html>
\ No newline at end of file
Added:
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/sa/t_tokens.xhtml
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/sa/t_tokens.xhtml
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/sa/t_tokens.xhtml 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,177 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:gd="http://gravel.jboss.org/jsf/1.0/data"
+
xmlns:ga="http://gravel.jboss.org/jsf/1.0/action"
+
xmlns:gs="http://gravel.jboss.org/jsf/1.0/simple"
+
xmlns:n="http://gravel.jboss.org/jsf/1.0/navigation"
+
xmlns:j4j="http://jbpm.org/jbpm4jsf/core"
+ >
+<ui:component>
+
+<ga:responseActions>
+ <ga:parameter name="page" target="#{page}">
+ <f:convertNumber integerOnly="true"/>
+ </ga:parameter>
+ <gd:pager value="#{tokens}" target="#{tokens_pager}"
page="#{page}"/>
+</ga:responseActions>
+
+<table class="results">
+<thead>
+
+ <tr>
+ <th colspan="10">
+ <ui:decorate template="t_pager.xhtml">
+ <ui:param name="pager"
value="#{tokens_pager}"/>
+ <ui:define name="pager_params">
+ <ui:insert name="params"/>
+ </ui:define>
+ </ui:decorate>
+ <ui:insert name="tokens_title">
+ <h:outputText value="Tokens"/>
+ </ui:insert>
+ </th>
+ </tr>
+ <tr>
+ <td>
+ Token ID
+ </td>
+ <td>
+ Parent
+ </td>
+ <td>
+ Node
+ </td>
+ <td style="width:110px;">
+ Status
+ </td>
+ <td style="width:150px;">
+ Start Date
+ </td>
+ <td style="width:150px;">
+ End Date
+ </td>
+ <td colspan="4">
+ Actions
+ </td>
+ </tr>
+</thead>
+<h:outputText>
+ <ga:attribute name="rendered" value="#{! empty tokens}"/>
+ <tbody class="results">
+ <gd:repeat value="#{tokens}" var="token"
idVar="rid" first="#{tokens_pager.first}"
limit="#{tokens_pager.limit}">
+ <gs:tr>
+ <ga:attribute name="styleClass" value="#{rid % 2 == 0 ?
'odd' : 'even'}"/>
+ <td>
+ <h:outputText value="#{token.id}"/>
+ </td>
+ <td>
+ <h:outputText value="(no parent)"
style="font-style:italic" rendered="#{token.parent == null}"/>
+ <h:outputText value="#{token.parent.name} (ID
#{token.parent.id})" rendered="#{token.parent != null and ! empty
token.parent.name}"/>
+ <h:outputText value="ID #{token.parent.id}"
rendered="#{token.parent != null and empty token.parent.name}"/>
+ </td>
+ <td>
+ <h:outputText value="#{token.node.name}"/>
+ </td>
+ <td>
+ <h:outputText value="Ended"
styleClass="statusEnded">
+ <ga:attribute name="rendered"
value="#{token.end != null}"/>
+ </h:outputText>
+ <h:outputText value=" (was suspended)"
style="font-style:italic">
+ <ga:attribute name="rendered"
value="#{token.end != null and token.suspended}"/>
+ </h:outputText>
+ <h:outputText>
+ <ga:attribute name="rendered"
value="#{token.end == null}"/>
+ <ga:attribute name="value"
value="#{token.suspended ? 'Suspended' : 'Running'}"/>
+ <ga:attribute name="styleClass"
value="#{token.suspended ? 'statusSuspended' :
'statusRunning'}"/>
+ </h:outputText>
+ </td>
+ <td>
+ <h:outputText value="#{token.start}">
+ <f:convertDateTime type="both"/>
+ </h:outputText>
+ </td>
+ <td>
+ <h:outputText value="#{token.end}">
+ <f:convertDateTime type="both"/>
+ </h:outputText>
+ </td>
+ <td width="60">
+ <h:outputLink value="token.jsf?id=#{token.id}">
+ Examine
+ </h:outputLink>
+ </td>
+ <td width="40">
+ <h:form>
+ <ga:attribute name="rendered"
value="#{token.end == null}"/>
+ <h:commandLink onclick="return confirm('Are you sure
you want to end this token?')">End
+ <f:param name="xtoken_id"
value="#{token.id}"/>
+ <ga:parameter name="xtoken_id"
target="#{xtoken_id}">
+ <f:convertNumber integerOnly="true"/>
+ </ga:parameter>
+ <j4j:loadToken id="#{xtoken_id}"
target="#{xtoken}"/>
+ <j4j:cancel value="#{xtoken}"/>
+ <n:nav outcome="success"
redirect="true" storeMessages="true"/>
+ <n:nav outcome="error" redirect="true"
storeMessages="true"/>
+ </h:commandLink>
+ </h:form>
+ </td>
+ <td width="60">
+ <h:form>
+ <ga:attribute name="rendered"
value="#{token.end == null}"/>
+ <h:commandLink>Suspend
+ <ga:attribute name="rendered" value="#{!
token.suspended}"/>
+ <f:param name="xtoken_id"
value="#{token.id}"/>
+ <ga:parameter name="xtoken_id"
target="#{xtoken_id}">
+ <f:convertNumber integerOnly="true"/>
+ </ga:parameter>
+ <j4j:loadToken id="#{xtoken_id}"
target="#{xtoken}"/>
+ <j4j:suspend value="#{xtoken}"/>
+ <n:nav outcome="success"
redirect="true" storeMessages="true"/>
+ <n:nav outcome="error" redirect="true"
storeMessages="true"/>
+ </h:commandLink>
+ <h:commandLink>Resume
+ <ga:attribute name="rendered"
value="#{token.suspended}"/>
+ <f:param name="xtoken_id"
value="#{token.id}"/>
+ <ga:parameter name="xtoken_id"
target="#{xtoken_id}">
+ <f:convertNumber integerOnly="true"/>
+ </ga:parameter>
+ <j4j:loadToken id="#{xtoken_id}"
target="#{xtoken}"/>
+ <j4j:resume value="#{xtoken}"/>
+ <n:nav outcome="success"
redirect="true" storeMessages="true"/>
+ <n:nav outcome="error" redirect="true"
storeMessages="true"/>
+ </h:commandLink>
+ </h:form>
+ </td>
+ <td width="130">
+ <h:form>
+ <ga:attribute name="rendered"
value="#{token.end == null and ! token.suspended}"/>
+ <ga:responseActions>
+ <gd:sort source="#{token.availableTransitions}"
target="#{transitions}" entryVar="e"
argument="#{e.name}"/>
+ </ga:responseActions>
+ <gd:repeat value="#{transitions}"
var="transition">
+ <h:commandLink>
+ <h:outputText value="Signal"
rendered="#{empty transition.name}"/>
+ <h:outputText value="Signal: "
rendered="#{! empty transition.name}"/>
+ <gs:b rendered="#{! empty
transition.name}">
+ <h:outputText
value="#{transition.name}"/>
+ </gs:b>
+ <j4j:loadToken id="#{token.id}"
target="#{xtoken}"/>
+ <j4j:signal value="#{xtoken}"
transition="#{transition.name}"/>
+ <n:nav outcome="success"
redirect="true" storeMessages="true"/>
+ <n:nav outcome="error"
redirect="true" storeMessages="true"/>
+ </h:commandLink><br/>
+ </gd:repeat>
+ </h:form>
+ </td>
+ </gs:tr>
+ </gd:repeat>
+ </tbody>
+</h:outputText>
+</table>
+</ui:component>
+
+</html>
\ No newline at end of file
Added:
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/sa/t_vars.xhtml
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/sa/t_vars.xhtml
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/sa/t_vars.xhtml 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,78 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:gd="http://gravel.jboss.org/jsf/1.0/data"
+
xmlns:ga="http://gravel.jboss.org/jsf/1.0/action"
+
xmlns:gs="http://gravel.jboss.org/jsf/1.0/simple"
+
xmlns:n="http://gravel.jboss.org/jsf/1.0/navigation"
+
xmlns:j4j="http://jbpm.org/jbpm4jsf/core"
+>
+<ui:component>
+ <ga:checkRole roles="#{access.role.vars}">
+ <ga:responseActions>
+ <ga:parameter name="page" target="#{page}">
+ <f:convertNumber integerOnly="true"/>
+ </ga:parameter>
+ <gd:pager value="#{vars}" target="#{vars_pager}"
page="#{page}"/>
+ </ga:responseActions>
+ <table class="results">
+ <thead>
+ <tr>
+ <th colspan="3">
+ <ui:decorate template="t_pager.xhtml">
+ <ui:param name="pager"
value="#{vars_pager}"/>
+ <ui:define name="pager_params">
+ <ui:insert name="params"/>
+ </ui:define>
+ </ui:decorate>
+ <ui:insert name="vars_title">
+ <h:outputText value="Variables"/>
+ </ui:insert>
+ </th>
+ </tr>
+ <tr>
+ <td style="width:150px">
+ <h:outputText value="Name"/>
+ </td>
+ <td style="width:180px">
+ <h:outputText value="Value"/>
+ </td>
+ <td colspan="1" style="width:90px">
+ <h:outputText value="Actions"/>
+ </td>
+ </tr>
+ </thead>
+ <h:outputText>
+ <ga:attribute name="rendered" value="#{! empty vars}"/>
+ <tbody class="results">
+ <gd:repeat value="#{vars}" var="var"
idVar="rid">
+ <gs:tr styleClass="#{rid % 2 == 0 ? 'odd' :
'even'}">
+ <td>
+ <h:outputText value="#{var.key}"/>
+ </td>
+ <td>
+ <h:outputText value="#{var.value}"/>
+ </td>
+ <td>
+ <h:form>
+ <h:commandLink>
+ <h:outputText value="Remove"/>
+ <ui:insert name="loadEntity"/>
+ <j4j:removeVariable name="#{var.key}"
entity="#{entity}"/>
+ <n:nav outcome="error"
redirect="true" storeMessages="true"/>
+ <n:nav outcome="success"
redirect="true" storeMessages="true"/>
+ </h:commandLink>
+ </h:form>
+ </td>
+ </gs:tr>
+ </gd:repeat>
+ </tbody>
+ </h:outputText>
+ </table>
+ </ga:checkRole>
+</ui:component>
+
+</html>
\ No newline at end of file
Added:
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/sa/task.xhtml
===================================================================
--- projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/sa/task.xhtml
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/sa/task.xhtml 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,395 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:gd="http://gravel.jboss.org/jsf/1.0/data"
+
xmlns:ga="http://gravel.jboss.org/jsf/1.0/action"
+
xmlns:gs="http://gravel.jboss.org/jsf/1.0/simple"
+
xmlns:n="http://gravel.jboss.org/jsf/1.0/navigation"
+
xmlns:j4j="http://jbpm.org/jbpm4jsf/core"
+>
+
+ <ui:composition template="t_loggedin.xhtml">
+ <ui:define name="actions">
+ <ga:responseActions>
+ <ga:parameter name="id" target="#{id}"/>
+ <j4j:loadTask id="#{id}" target="#{task}"/>
+ <ga:parameter name="view" target="#{viewMode}"
default="#{task.end != null ? 'comments' : 'form'}"/>
+ <gd:reverse source="#{task.comments}"
target="#{comments}"/>
+ <gd:sort if="#{! empty task.availableTransitions}"
source="#{task.availableTransitions}" target="#{transitions}"
entryVar="e" argument="#{e.name == null ? '' : e.name}"/>
+ <j4j:getVariableMap target="#{taskVariableMap}"
value="#{task}"/>
+ <j4j:getTaskFormInfo
process="#{task.processInstance.processDefinition}"
target="#{taskForms}"/>
+ <gd:sort if="#{! empty task.pooledActors}"
source="#{task.pooledActors}" target="#{taskActors}"
entryVar="e" argument="#{e.actorId}"/>
+ <gd:filter if="#{! empty taskActors and ! empty
task.actorId}" entryVar="e" source="#{taskActors}"
target="#{taskActors}" test="#{e.actorId != task.actorId}"/>
+ </ga:responseActions>
+ <ga:keepAlive value="#{taskVariableMap}"/>
+ </ui:define>
+
+ <ui:define name="menu">
+ <gs:div style="padding:0;margin:0">
+ <ga:attribute name="rendered" value="#{task !=
null}"/>
+ <table class="leftmenu">
+ <tbody>
+ <tr class="leftmenuheader">
+ <th colspan="2">Task Summary</th>
+ </tr>
+ <tr class="leftmenu">
+ <th>Task Link</th>
+ <td>
+ <h:outputLink value="task.jsf"
style="font-weight:bold">
+ <f:param name="id"
value="#{id}"/>
+ <h:outputText value="ID #{id}"/>
+ </h:outputLink>
+ </td>
+ </tr>
+ <gs:tr styleClass="leftmenu" rendered="#{!
empty task.name}">
+ <th>Name</th>
+ <td>
+ <h:outputText value="#{task.name}"/>
+ </td>
+ </gs:tr>
+ <tr class="leftmenu">
+ <th>Status</th>
+ <td>
+ <h:outputText value="Ended"
styleClass="statusEnded">
+ <ga:attribute name="rendered"
value="#{task.end != null}"/>
+ </h:outputText>
+ <h:outputText value=" (was suspended)"
style="font-style:italic">
+ <ga:attribute name="rendered"
value="#{task.end != null and task.suspended}"/>
+ </h:outputText>
+ <h:outputText value="Not Started"
styleClass="statusNotstarted">
+ <ga:attribute name="rendered"
value="#{task.end == null and task.start == null}"/>
+ </h:outputText>
+ <h:outputText value=" (suspended)"
style="font-style:italic">
+ <ga:attribute name="rendered"
value="#{task.start == null and task.suspended}"/>
+ </h:outputText>
+ <h:outputText>
+ <ga:attribute name="rendered"
value="#{task.end == null and task.start != null}"/>
+ <ga:attribute name="value"
value="#{task.suspended ? 'Suspended' : 'Running'}"/>
+ <ga:attribute name="styleClass"
value="#{task.suspended ? 'statusSuspended' :
'statusRunning'}"/>
+ </h:outputText>
+ </td>
+ </tr>
+ <gs:tr styleClass="leftmenu" rendered="#{!
empty task.actorId}">
+ <th>Assigned To</th>
+ <td>
+ <h:outputText value="#{task.actorId}"/>
+ </td>
+ </gs:tr>
+ <gs:tr styleClass="leftmenu"
rendered="#{task.token != null}">
+ <th>Token</th>
+ <td>
+ <h:outputLink value="token.jsf">
+ <f:param name="id"
value="#{task.token.id}"/>
+ <gs:b>
+ <h:outputText value="ID
#{task.token.id}"/>
+ </gs:b>
+ <h:outputText value="
"#{task.token.name}"" rendered="#{! empty
task.token.name}"/>
+ </h:outputLink>
+ </td>
+ </gs:tr>
+ <tr class="leftmenu">
+ <th>Process Instance</th>
+ <td>
+ <h:outputLink value="procins.jsf">
+ <f:param name="id"
value="#{task.processInstance.id}"/>
+ <b><h:outputText value=" ID
#{task.processInstance.id}"/></b>
+ </h:outputLink>
+ </td>
+ </tr>
+ <tr class="leftmenu">
+ <th>Process</th>
+ <td>
+ <h:outputLink value="procdef.jsf">
+ <f:param name="id"
value="#{task.processInstance.processDefinition.id}"/>
+ <h:outputText
value="#{task.processInstance.processDefinition.name}
v#{task.processInstance.processDefinition.version}"/>
+ </h:outputLink>
+ </td>
+ </tr>
+ <gs:tr styleClass="leftmenu"
rendered="#{task.create != null}">
+ <th>Created Date</th>
+ <td>
+ <h:outputText value="#{task.create}">
+ <f:convertDateTime type="both"/>
+ </h:outputText>
+ </td>
+ </gs:tr>
+ <gs:tr styleClass="leftmenu"
rendered="#{task.start != null}">
+ <th>Start Date</th>
+ <td>
+ <h:outputText value="#{task.start}">
+ <f:convertDateTime type="both"/>
+ </h:outputText>
+ </td>
+ </gs:tr>
+ <gs:tr styleClass="leftmenu"
rendered="#{task.end != null}">
+ <th>End Date</th>
+ <td>
+ <h:outputText value="#{task.end}">
+ <f:convertDateTime type="both"/>
+ </h:outputText>
+ </td>
+ </gs:tr>
+ <tr class="leftmenuheader">
+ <th colspan="2"
class="nf">Views</th>
+ </tr>
+ <tr class="leftmenu">
+ <td colspan="2">
+ <ul>
+ <gs:li>
+ <ga:attribute name="rendered"
value="#{task.end == null}"/>
+ <h:outputLink style="#{viewMode ==
'form' ? 'font-weight:bold' : ''}">
+ <f:param name="id"
value="#{id}"/>
+ <f:param name="view"
value="form"/>
+ <gs:b writeTag="#{viewMode ==
'form'}">
+ <h:outputText value="Task
Form"/>
+ </gs:b>
+ </h:outputLink>
+ </gs:li>
+ <li>
+ <h:outputLink style="#{viewMode ==
'comments' ? 'font-weight:bold' : ''}">
+ <f:param name="id"
value="#{id}"/>
+ <f:param name="view"
value="comments"/>
+ <gs:b writeTag="#{viewMode ==
'comments'}">
+ <h:outputText
value="Comments"/>
+ </gs:b>
+ </h:outputLink>
+ </li>
+ <li>
+ <h:outputLink>
+ <f:param name="id"
value="#{id}"/>
+ <f:param name="view"
value="vars"/>
+ <gs:b writeTag="#{viewMode ==
'vars'}">
+ <h:outputText
value="Variables"/>
+ </gs:b>
+ </h:outputLink>
+ </li>
+ <gs:li>
+ <ga:attribute name="rendered"
value="#{! empty transitions and task.end == null}"/>
+ <h:outputLink>
+ <f:param name="id"
value="#{id}"/>
+ <f:param name="view"
value="tran"/>
+ <gs:b writeTag="#{viewMode ==
'tran'}">
+ <h:outputText
value="Transitions"/>
+ </gs:b>
+ </h:outputLink>
+ </gs:li>
+ </ul>
+ </td>
+ </tr>
+ <gs:tr styleClass="leftmenuheader">
+ <ga:attribute name="rendered"
value="#{task.end == null}"/>
+ <th colspan="2"
class="nf">Actions</th>
+ </gs:tr>
+ <gs:tr styleClass="leftmenu">
+ <ga:attribute name="rendered"
value="#{task.end == null}"/>
+ <td colspan="2">
+ <ul>
+ <li>
+ <h:form>
+ <h:commandLink
value="Suspend">
+ <ga:attribute
name="rendered" value="#{! task.suspended}"/>
+ <f:param name="id"
value="#{id}"/>
+ <ga:parameter name="id"
target="#{id}">
+ <f:convertNumber
integerOnly="true"/>
+ </ga:parameter>
+ <j4j:loadTask id="#{id}"
target="#{xtask}"/>
+ <j4j:suspend
value="#{xtask}"/>
+ <n:nav outcome="success"
redirect="true" storeMessages="true"/>
+ <n:nav outcome="error"
redirect="true" storeMessages="true"/>
+ </h:commandLink>
+ <h:commandLink
value="Resume">
+ <ga:attribute
name="rendered" value="#{task.suspended}"/>
+ <f:param name="id"
value="#{id}"/>
+ <ga:parameter name="id"
target="#{id}">
+ <f:convertNumber
integerOnly="true"/>
+ </ga:parameter>
+ <j4j:loadTask id="#{id}"
target="#{xtask}"/>
+ <j4j:resume
value="#{xtask}"/>
+ <n:nav outcome="success"
redirect="true" storeMessages="true"/>
+ <n:nav outcome="error"
redirect="true" storeMessages="true"/>
+ </h:commandLink>
+ <h:outputText value=" this
task"/>
+ </h:form>
+ </li>
+ <gs:li>
+ <ga:attribute name="rendered"
value="#{task.start == null}"/>
+ <h:form>
+ <h:commandLink>
+ <h:outputText
value="Start"/>
+ <f:param name="id"
value="#{id}"/>
+ <ga:parameter name="id"
target="#{id}">
+ <f:convertNumber
integerOnly="true"/>
+ </ga:parameter>
+ <j4j:loadTask id="#{id}"
target="#{xtask}"/>
+ <j4j:startTask
task="#{xtask}"/>
+ <n:nav outcome="success"
redirect="true" storeMessages="true"/>
+ <n:nav outcome="error"
redirect="true" storeMessages="true"/>
+ </h:commandLink>
+ <h:outputText value=" this
task"/>
+ </h:form>
+ </gs:li>
+ <gs:li>
+ <ga:attribute name="rendered"
value="#{task.end == null}"/>
+ <h:outputText>
+ <ga:attribute name="value"
value="#{task.actorId == null ? 'Assign' : 'Reassign'} this task
to:"/>
+ </h:outputText>
+ <ul>
+ <gd:repeat value="#{taskActors}"
var="actor" rendered="#{! empty taskActors}">
+ <li>
+ <h:form>
+ <h:commandLink>
+ <ga:attribute
name="value" value="#{actor.actorId}"/>
+ <f:param
name="actorId" value="#{actor.actorId}"/>
+ <ga:parameter
name="id" target="#{id}"/>
+ <ga:parameter
name="actorId" target="#{xactorId}"/>
+ <j4j:loadTask
id="#{id}" target="#{xtask}"/>
+ <j4j:assignTask
task="#{xtask}" actorId="#{xactorId}"/>
+ <n:nav
outcome="success" redirect="true" storeMessages="true"/>
+ <n:nav
outcome="error" redirect="true" storeMessages="true"/>
+ </h:commandLink>
+ </h:form>
+ </li>
+ </gd:repeat>
+ <li>
+ <h:form>
+ <h:inputText
value="#{actorId}" required="true" requiredMessage="No actor name
specified"/>
+ <h:commandButton
value="Save" style="margin-left:5px">
+ <ga:parameter
name="id" target="#{id}"/>
+ <j4j:loadTask
id="#{id}" target="#{xtask}"/>
+ <j4j:assignTask
task="#{xtask}" actorId="#{actorId}"/>
+ <n:nav
outcome="default" redirect="true" storeMessages="true"/>
+ </h:commandButton>
+ </h:form>
+ </li>
+ </ul>
+ </gs:li>
+ </ul>
+ </td>
+ </gs:tr>
+ </tbody>
+ </table>
+ </gs:div>
+ </ui:define>
+
+ <ui:define name="body">
+ <h:outputText>
+ <ga:attribute name="rendered" value="#{task !=
null}"/>
+ <h:outputText>
+ <ga:attribute name="rendered" value="#{viewMode ==
'comments'}"/>
+ <ui:decorate template="t_comments.xhtml">
+ <ui:define name="loadTarget">
+ <ga:parameter name="id" target="#{id}"
required="true">
+ <f:validateLongRange minimum="0"/>
+ <f:convertNumber integerOnly="true"
maxFractionDigits="0"/>
+ </ga:parameter>
+ <j4j:loadTask id="#{id}"
target="#{task}"/>
+ <f:setPropertyActionListener value="#{task}"
target="#{target}"/>
+ </ui:define>
+ </ui:decorate>
+ </h:outputText>
+ <h:outputText>
+ <ga:attribute name="rendered" value="#{viewMode ==
'tran' and ! empty transitions and task.end == null}"/>
+ <table class="results">
+ <thead>
+ <tr>
+ <th colspan="4">Transitions</th>
+ </tr>
+ <tr>
+ <td style="width:40px">
+ <h:outputText value="ID"/>
+ </td>
+ <td style="width:100px">
+ <h:outputText value="Name"/>
+ </td>
+ <td style="width:160px">
+ <h:outputText value="Target Node"/>
+ </td>
+ <td style="width:90px">
+ <h:outputText value="Actions"/>
+ </td>
+ </tr>
+ </thead>
+ <h:outputText>
+ <tbody class="results">
+ <gd:repeat value="#{transitions}"
var="transition" idVar="rid">
+ <gs:tr styleClass="#{rid % 2 == 0 ?
'odd' : 'even'}">
+ <td>
+ <h:outputText
value="#{transition.id}"/>
+ </td>
+ <td>
+ <h:outputText
value="#{transition.name}" rendered="#{! empty transition.name}"/>
+ <gs:i rendered="#{empty
transition.name}">
+ <h:outputText
value="(unnamed)"/>
+ </gs:i>
+ </td>
+ <td>
+ <h:outputText
value="#{transition.to.name}"/>
+ </td>
+ <td>
+ <h:form>
+ <h:commandLink>
+ <h:outputText value="End
Task"/>
+ <ga:attribute
name="rendered" value="#{! task.suspended}"/>
+ <f:param name="id"
value="#{id}"/>
+ <ga:parameter name="id"
target="#{id}">
+ <f:convertNumber
integerOnly="true"/>
+ </ga:parameter>
+ <j4j:loadTask id="#{id}"
target="#{task}"/>
+ <j4j:completeTask
task="#{task}" transition="#{transition.name}"/>
+ <n:nav outcome="success"
url="procins.jsf?id=#{task.processInstance.id}"
storeMessages="true"/>
+ <n:nav outcome="error"
redirect="true" storeMessages="true"/>
+ </h:commandLink>
+ </h:form>
+ </td>
+ </gs:tr>
+ </gd:repeat>
+ </tbody>
+ </h:outputText>
+ </table>
+ </h:outputText>
+ <h:outputText>
+ <ga:attribute name="rendered" value="#{viewMode ==
'form'}"/>
+ <h:form>
+ <j4j:taskForm transitionTarget="#{transition}"
buttonTarget="#{button}">
+ <ga:parameter name="id" target="#{id}"
required="true">
+ <f:validateLongRange minimum="0"/>
+ <f:convertNumber integerOnly="true"
maxFractionDigits="0"/>
+ </ga:parameter>
+ <j4j:loadTask id="#{id}"
target="#{xtask}" navigate="false" unless="#{button ==
'cancel'}"/>
+ <j4j:applyVariableMap target="#{xtask}"
variableMap="#{taskVariableMap}" navigate="false"
unless="#{button == 'cancel'}"/>
+ <j4j:addComment comment="#{comment}"
target="#{xtask}" unless="#{empty comment or button ==
'cancel'}" navigate="false"/>
+ <j4j:completeTask task="#{xtask}"
transition="#{transition}" unless="#{button != 'transition'}"
navigate="false"/>
+ <n:nav outcome="error" redirect="true"
storeMessages="true"/>
+ <n:nav outcome="save" redirect="true"
storeMessages="true"/>
+ <n:nav outcome="cancel"
redirect="true" storeMessages="true"/>
+ <n:nav outcome="transition"
redirect="true" storeMessages="true"/>
+ <j4j:includeProcessFile
file="#{taskForms[task.name]}"
process="#{task.processInstance.processDefinition}">
+ <ui:param name="var"
value="#{taskVariableMap}"/>
+ <ui:param name="comment"
value="#{comment}"/>
+ <ui:param name="taskName"
value="#{task.name}"/>
+ </j4j:includeProcessFile>
+ </j4j:taskForm>
+ </h:form>
+ </h:outputText>
+ <h:outputText>
+ <ga:attribute name="rendered" value="#{viewMode ==
'vars'}"/>
+ <ui:decorate template="t_vars.xhtml">
+ <ui:param name="vars"
value="#{taskVariableMap}"/>
+ <ui:define name="loadEntity">
+ <ga:parameter name="id" target="#{id}"
required="true">
+ <f:validateLongRange minimum="0"/>
+ <f:convertNumber integerOnly="true"
maxFractionDigits="0"/>
+ </ga:parameter>
+ <j4j:loadTask id="#{id}"
target="#{xtask}"/>
+ <f:setPropertyActionListener
value="#{xtask.token}" target="#{entity}"/>
+ </ui:define>
+ </ui:decorate>
+ </h:outputText>
+ </h:outputText>
+ </ui:define>
+ </ui:composition>
+
+</html>
\ No newline at end of file
Added:
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/sa/tasks.xhtml
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/sa/tasks.xhtml
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/sa/tasks.xhtml 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,48 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:gd="http://gravel.jboss.org/jsf/1.0/data"
+
xmlns:ga="http://gravel.jboss.org/jsf/1.0/action"
+
xmlns:gs="http://gravel.jboss.org/jsf/1.0/simple"
+
xmlns:n="http://gravel.jboss.org/jsf/1.0/navigation"
+
xmlns:j4j="http://jbpm.org/jbpm4jsf/core"
+>
+ <ui:composition template="../sa/t_loggedin.xhtml">
+ <ui:define name="actions">
+ <ga:responseActions>
+ <j4j:listTasks includeEnded="true"
target="#{tasks}"/>
+
+ <!-- tasks parameters -->
+ <ga:parameter name="name"
target="#{task_filter_name}" default="">
+ <f:converter
converterId="gravel.StringWildcardFilter"/>
+ </ga:parameter>
+ <ga:parameter name="actor"
target="#{task_filter_actor}" default="">
+ <f:converter
converterId="gravel.StringWildcardFilter"/>
+ </ga:parameter>
+ <ga:parameter name="fn"
target="#{task_filter_notstarted}" default="true"/>
+ <ga:parameter name="fr"
target="#{task_filter_running}" default="true"/>
+ <ga:parameter name="fs"
target="#{task_filter_suspended}" default="true"/>
+ <ga:parameter name="fe"
target="#{task_filter_ended}" default="false"/>
+
+ <gd:filter source="#{tasks}" target="#{tasks}"
entryVar="entry" test="#{task_filter_notstarted and entry.start == null and
entry.end == null or task_filter_ended and entry.end != null or (entry.start != null and
entry.end == null) and (task_filter_suspended and entry.suspended or task_filter_running
and ! entry.suspended)}"/>
+ <gd:filter if="#{! empty task_filter_name}"
entryVar="entry" source="#{tasks}" target="#{tasks}"
filter="#{task_filter_name}" filterArgument="#{entry.name == null ?
'' : entry.name}"/>
+ <gd:filter if="#{! empty task_filter_actor}"
entryVar="entry" source="#{tasks}" target="#{tasks}"
filter="#{task_filter_actor}" filterArgument="#{entry.actorId == null ?
'' : entry.actorId}"/>
+
+ </ga:responseActions>
+ </ui:define>
+
+ <ui:define name="menu">
+ </ui:define>
+
+ <ui:define name="body">
+ <gs:div>
+ <ui:decorate template="t_tasks.xhtml"/>
+ </gs:div>
+ </ui:define>
+ </ui:composition>
+
+
+</html>
\ No newline at end of file
Added:
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/sa/token.xhtml
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/sa/token.xhtml
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/sa/token.xhtml 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,301 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:gd="http://gravel.jboss.org/jsf/1.0/data"
+
xmlns:ga="http://gravel.jboss.org/jsf/1.0/action"
+
xmlns:gs="http://gravel.jboss.org/jsf/1.0/simple"
+
xmlns:n="http://gravel.jboss.org/jsf/1.0/navigation"
+
xmlns:j4j="http://jbpm.org/jbpm4jsf/core"
+>
+
+ <ui:composition template="t_loggedin.xhtml">
+ <ui:define name="actions">
+ <ga:responseActions>
+ <ga:parameter name="id" target="#{id}"/>
+ <ga:parameter name="view" target="#{viewMode}"
default="tran"/>
+ <j4j:loadToken id="#{id}" target="#{token}"/>
+ <gd:sort if="#{! empty token.availableTransitions}"
source="#{token.availableTransitions}" target="#{transitions}"
entryVar="e" argument="#{e.name == null ? '' : e.name}"/>
+ </ga:responseActions>
+ </ui:define>
+
+ <ui:define name="menu">
+ <gs:div style="padding:0;margin:0">
+ <ga:attribute name="rendered" value="#{token !=
null}"/>
+ <table class="leftmenu">
+ <tbody>
+ <tr class="leftmenuheader">
+ <th colspan="2">Token Summary</th>
+ </tr>
+ <tr class="leftmenu">
+ <th>Token Link</th>
+ <td>
+ <h:outputLink value="token.jsf"
style="font-weight:bold">
+ <f:param name="id"
value="#{id}"/>
+ <h:outputText value="ID #{id}"/>
+ </h:outputLink>
+ </td>
+ </tr>
+ <gs:tr styleClass="leftmenu" rendered="#{!
empty token.name}">
+ <th>Name</th>
+ <td>
+ <h:outputText value="#{token.name}"/>
+ </td>
+ </gs:tr>
+ <tr class="leftmenu">
+ <th>Current Node</th>
+ <td>
+ <h:outputText
value="#{token.node.name}"/>
+ </td>
+ </tr>
+ <gs:tr styleClass="leftmenu"
rendered="#{token.parent != null}">
+ <th>Parent Token</th>
+ <td>
+ <h:outputLink value="token.jsf">
+ <f:param name="id"
value="#{token.parent.id}"/>
+ <gs:b>
+ <h:outputText value="ID
#{token.parent.id}"/>
+ </gs:b>
+ <h:outputText value="
"#{token.parent.name}"" rendered="#{! empty
token.parent.name}"/>
+ </h:outputLink>
+ </td>
+ </gs:tr>
+ <tr class="leftmenu">
+ <th>Process Instance</th>
+ <td>
+ <h:outputLink value="procins.jsf">
+ <f:param name="id"
value="#{token.processInstance.id}"/>
+ <b><h:outputText value="ID
#{token.processInstance.id}"/></b>
+ </h:outputLink>
+ </td>
+ </tr>
+ <tr class="leftmenu">
+ <th>Process</th>
+ <td>
+ <h:outputLink value="procdef.jsf">
+ <f:param name="id"
value="#{token.processInstance.processDefinition.id}"/>
+ <h:outputText
value="#{token.processInstance.processDefinition.name}
v#{token.processInstance.processDefinition.version}"/>
+ </h:outputLink>
+ </td>
+ </tr>
+ <tr class="leftmenu">
+ <th>Status</th>
+ <td>
+ <h:outputText value="Ended"
styleClass="statusEnded">
+ <ga:attribute name="rendered"
value="#{token.end != null}"/>
+ </h:outputText>
+ <h:outputText value=" (was suspended)"
style="font-style:italic">
+ <ga:attribute name="rendered"
value="#{token.end != null and token.suspended}"/>
+ </h:outputText>
+ <h:outputText>
+ <ga:attribute name="rendered"
value="#{token.end == null}"/>
+ <ga:attribute name="value"
value="#{token.suspended ? 'Suspended' : 'Running'}"/>
+ <ga:attribute name="styleClass"
value="#{token.suspended ? 'statusSuspended' :
'statusRunning'}"/>
+ </h:outputText>
+ </td>
+ </tr>
+ <gs:tr styleClass="leftmenu"
rendered="#{token.start != null}">
+ <th>Start Date</th>
+ <td>
+ <h:outputText value="#{token.start}">
+ <f:convertDateTime type="both"/>
+ </h:outputText>
+ </td>
+ </gs:tr>
+ <gs:tr styleClass="leftmenu"
rendered="#{token.end != null}">
+ <th>End Date</th>
+ <td>
+ <h:outputText value="#{token.end}">
+ <f:convertDateTime type="both"/>
+ </h:outputText>
+ </td>
+ </gs:tr>
+ <tr class="leftmenuheader">
+ <th colspan="2"
class="nf">Views</th>
+ </tr>
+ <tr class="leftmenu">
+ <td colspan="2">
+ <gs:ul>
+ <gs:li>
+ <h:outputLink style="#{viewMode ==
'tran' ? 'font-weight:bold' : ''}">
+ <f:param name="id"
value="#{id}"/>
+ <f:param name="view"
value="tran"/>
+ Transitions
+ </h:outputLink>
+ </gs:li>
+ <gs:li>
+ <h:outputLink style="#{viewMode ==
'node' ? 'font-weight:bold' : ''}">
+ <f:param name="id"
value="#{id}"/>
+ <f:param name="view"
value="node"/>
+ Nodes
+ </h:outputLink>
+ </gs:li>
+ </gs:ul>
+ </td>
+ </tr>
+ <h:outputText>
+ <ga:attribute name="rendered"
value="#{token.end == null}"/>
+ <tr class="leftmenuheader">
+ <th colspan="2"
class="nf">Actions</th>
+ </tr>
+ <tr class="leftmenu">
+ <td colspan="2">
+ <h:form>
+ <h:inputHidden value="#{id}"/>
+ <gs:ul>
+ <gs:li>
+ <h:commandLink
value="Suspend">
+ <ga:attribute
name="rendered" value="#{! token.suspended}"/>
+ <j4j:loadToken
id="#{id}" target="#{token}"/>
+ <j4j:suspend
value="#{token}"/>
+ <n:nav outcome="success"
redirect="true" storeMessages="true"/>
+ <n:nav outcome="error"
redirect="true" storeMessages="true"/>
+ </h:commandLink>
+ <h:commandLink
value="Resume">
+ <ga:attribute
name="rendered" value="#{token.suspended}"/>
+ <j4j:loadToken
id="#{id}" target="#{token}"/>
+ <j4j:resume
value="#{token}"/>
+ <n:nav outcome="success"
redirect="true" storeMessages="true"/>
+ <n:nav outcome="error"
redirect="true" storeMessages="true"/>
+ </h:commandLink>
+ <h:outputText value=" this
token"/>
+ </gs:li>
+ <gs:li>
+ <ga:attribute
name="rendered" value="#{token.end == null}"/>
+ <h:commandLink
value="End">
+ <j4j:loadToken
id="#{id}" target="#{token}"/>
+ <j4j:cancel
value="#{token}"/>
+ <n:nav outcome="success"
redirect="true" storeMessages="true"/>
+ <n:nav outcome="error"
redirect="true" storeMessages="true"/>
+ </h:commandLink>
+ <h:outputText value=" this
token"/>
+ </gs:li>
+ </gs:ul>
+ </h:form>
+ </td>
+ </tr>
+ </h:outputText>
+ </tbody>
+ </table>
+ </gs:div>
+ </ui:define>
+
+ <ui:define name="body">
+ <gs:div>
+ <ga:attribute name="rendered" value="#{token !=
null}"/>
+ <h:outputText>
+ <ga:attribute name="rendered" value="#{viewMode ==
'tran'}"/>
+ <table class="results">
+ <thead>
+ <tr>
+ <th colspan="4">Transitions</th>
+ </tr>
+ <tr>
+ <td style="width:40px">
+ <h:outputText value="ID"/>
+ </td>
+ <td style="width:100px">
+ <h:outputText value="Name"/>
+ </td>
+ <td style="width:160px">
+ <h:outputText value="Target Node"/>
+ </td>
+ <td style="width:90px">
+ <h:outputText value="Actions"/>
+ </td>
+ </tr>
+ </thead>
+ <h:outputText>
+ <ga:attribute name="rendered" value="#{!
empty transitions}"/>
+ <tbody class="results">
+ <gd:repeat value="#{transitions}"
var="transition" idVar="rid">
+ <gs:tr styleClass="#{rid % 2 == 0 ?
'odd' : 'even'}">
+ <td>
+ <h:outputText
value="#{transition.id}"/>
+ </td>
+ <td>
+ <h:outputText
value="#{transition.name}" rendered="#{! empty transition.name}"/>
+ <gs:i rendered="#{empty
transition.name}">
+ <h:outputText
value="(unnamed)"/>
+ </gs:i>
+ </td>
+ <td>
+ <h:outputText
value="#{transition.to.name}"/>
+ </td>
+ <td>
+ <h:form>
+ <h:commandLink>
+ <h:outputText
value="Signal"/>
+ <ga:attribute
name="rendered" value="#{! token.suspended}"/>
+ <f:param name="id"
value="#{id}"/>
+ <ga:parameter name="id"
target="#{id}">
+ <f:convertNumber
integerOnly="true"/>
+ </ga:parameter>
+ <j4j:loadToken
id="#{id}" target="#{token}"/>
+ <j4j:signal
value="#{token}" transition="#{transition.name}"/>
+ <n:nav outcome="success"
redirect="true" storeMessages="true"/>
+ <n:nav outcome="error"
redirect="true" storeMessages="true"/>
+ </h:commandLink>
+ </h:form>
+ </td>
+ </gs:tr>
+ </gd:repeat>
+ </tbody>
+ </h:outputText>
+ </table>
+ </h:outputText>
+ <h:outputText>
+ <ga:attribute name="rendered" value="#{viewMode ==
'node'}"/>
+ <table class="results">
+ <thead>
+ <tr>
+ <th colspan="4">Nodes</th>
+ </tr>
+ <tr>
+ <td style="width:200px">
+ <h:outputText value="Name"/>
+ </td>
+ <td style="width:200px">
+ <h:outputText value="Actions"/>
+ </td>
+ </tr>
+ </thead>
+ <h:outputText>
+ <ga:attribute name="rendered" value="#{!
empty token.processInstance.processDefinition.nodes}"/>
+ <tbody class="results">
+ <gd:repeat
value="#{token.processInstance.processDefinition.nodes}" var="node"
idVar="rid">
+ <gs:tr styleClass="#{rid % 2 == 0 ?
'odd' : 'even'}">
+ <td>
+ <h:outputText
value="#{node.name}" style="#{token.node.id == node.id ?
'font-weight:bold;' : ''}"/>
+ </td>
+ <td>
+ <h:form>
+ <ga:attribute
name="rendered" value="#{token.node.id != node.id}"/>
+ <h:commandLink>
+ <ga:attribute
name="onclick" value="return
confirm('#{msgs['confirm.token.move']}')"/>
+ <h:outputText value="Move to
this node"/>
+ <ga:attribute
name="rendered" value="#{! token.suspended}"/>
+ <f:param name="id"
value="#{id}"/>
+ <ga:parameter name="id"
target="#{id}">
+ <f:convertNumber
integerOnly="true"/>
+ </ga:parameter>
+ <j4j:loadToken
id="#{id}" target="#{token}"/>
+ <f:setPropertyActionListener
value="#{node}" target="#{token.node}"/>
+ <n:nav outcome="success"
redirect="true" storeMessages="true"/>
+ <n:nav outcome="error"
redirect="true" storeMessages="true"/>
+ </h:commandLink>
+ </h:form>
+ </td>
+ </gs:tr>
+ </gd:repeat>
+ </tbody>
+ </h:outputText>
+ </table>
+ </h:outputText>
+ </gs:div>
+ </ui:define>
+ </ui:composition>
+
+</html>
\ No newline at end of file
Added:
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/sa/user.xhtml
===================================================================
--- projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/sa/user.xhtml
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/sa/user.xhtml 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,281 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:gd="http://gravel.jboss.org/jsf/1.0/data"
+
xmlns:ga="http://gravel.jboss.org/jsf/1.0/action"
+
xmlns:gs="http://gravel.jboss.org/jsf/1.0/simple"
+
xmlns:n="http://gravel.jboss.org/jsf/1.0/navigation"
+
xmlns:j4j="http://jbpm.org/jbpm4jsf/core"
+
xmlns:id="http://jbpm.org/jbpm4jsf/identity"
+>
+<ui:composition template="t_loggedin.xhtml">
+<ui:define name="menu">
+<ga:responseActions>
+ <ga:checkRole roles="#{access.role.identities}">
+ <ga:checkRole roles="#{access.role.identities.user}">
+ <ga:parameter name="id" target="#{id}"
required="true">
+ <f:validateLongRange minimum="0"/>
+ <f:convertNumber integerOnly="true"
maxFractionDigits="0"/>
+ </ga:parameter>
+ <ga:parameter name="page" target="#{page}"
default="1">
+ <f:convertNumber integerOnly="true"/>
+ </ga:parameter>
+ <ga:parameter name="view" target="#{viewMode}"
default="memberships"/>
+ <ga:parameter name="gname" target="#{groupName}"
default="">
+ <f:converter converterId="gravel.StringWildcardFilter"/>
+ </ga:parameter>
+ <ga:parameter name="gtype" target="#{groupType}"
default="">
+ <f:converter converterId="gravel.StringWildcardFilter"/>
+ </ga:parameter>
+ <ga:parameter name="role" target="#{roleName}"
default="">
+ <f:converter converterId="gravel.StringWildcardFilter"/>
+ </ga:parameter>
+ <id:loadUser id="#{id}" target="#{user}"/>
+ <gd:filter source="#{user.memberships}"
target="#{memberships}" entryVar="e" filter="#{groupName}"
filterArgument="#{e.group.name}"/>
+ <gd:filter source="#{memberships}"
target="#{memberships}" entryVar="e" filter="#{groupType}"
filterArgument="#{e.group.type}"/>
+ <gd:filter source="#{memberships}"
target="#{memberships}" entryVar="e" filter="#{roleName}"
filterArgument="#{e.role}"/>
+ <gd:sort source="#{memberships}"
target="#{memberships}" entryVar="e"
argument="#{e.group.name}"/>
+ <gd:sort source="#{memberships}"
target="#{memberships}" entryVar="e"
argument="#{e.group.type}"/>
+ <gd:pager target="#{memberships_pager}"
value="#{memberships}" page="#{page}"/>
+ <ga:checkRole roles="#{access.role.tasks}">
+ <j4j:listTasksForActor unless="#{viewMode !=
'tasks'}" actorId="#{user.name}" target="#{tasks}"/>
+ <!-- tasks parameters -->
+ <ga:parameter name="name"
target="#{task_filter_name}" default="">
+ <f:converter
converterId="gravel.StringWildcardFilter"/>
+ </ga:parameter>
+ <ga:parameter name="actor"
target="#{task_filter_actor}" default="">
+ <f:converter
converterId="gravel.StringWildcardFilter"/>
+ </ga:parameter>
+ <ga:parameter name="fn"
target="#{task_filter_notstarted}" default="true"/>
+ <ga:parameter name="fr"
target="#{task_filter_running}" default="true"/>
+ <ga:parameter name="fs"
target="#{task_filter_suspended}" default="true"/>
+ <ga:parameter name="fe"
target="#{task_filter_ended}" default="false"/>
+
+ <gd:filter source="#{tasks}" target="#{tasks}"
entryVar="entry" test="#{task_filter_notstarted and entry.start == null and
entry.end == null or task_filter_ended and entry.end != null or (entry.start != null and
entry.end == null) and (task_filter_suspended and entry.suspended or task_filter_running
and ! entry.suspended)}"/>
+ <gd:filter if="#{! empty task_filter_name}"
entryVar="entry" source="#{tasks}" target="#{tasks}"
filter="#{task_filter_name}" filterArgument="#{entry.name == null ?
'' : entry.name}"/>
+ <gd:filter if="#{! empty task_filter_actor}"
entryVar="entry" source="#{tasks}" target="#{tasks}"
filter="#{task_filter_actor}" filterArgument="#{entry.actorId == null ?
'' : entry.actorId}"/>
+ </ga:checkRole>
+ </ga:checkRole>
+ </ga:checkRole>
+</ga:responseActions>
+<gs:div style="padding:0;margin:0">
+ <ga:attribute name="rendered" value="#{user != null}"/>
+ <table class="leftmenu">
+ <tbody>
+ <tr class="leftmenuheader">
+ <th colspan="2">User Summary</th>
+ </tr>
+ <tr class="leftmenu">
+ <th>User Link</th>
+ <td>
+ <h:outputLink style="font-weight:bold">
+ <f:param name="id" value="#{id}"/>
+ <h:outputText value="#{user.name} (ID #{id})"/>
+ </h:outputLink>
+ </td>
+ </tr>
+ <tr class="leftmenu">
+ <th>Email</th>
+ <td>
+ <h:outputText value="#{user.email}"/>
+ </td>
+ </tr>
+ <tr class="leftmenuheader">
+ <th colspan="2" class="nf">Views</th>
+ </tr>
+ <tr class="leftmenu">
+ <td colspan="2">
+ <gs:ul>
+ <gs:li>
+ <h:outputLink style="#{viewMode ==
'memberships' ? 'font-weight:bold' : ''}">
+ <f:param name="id"
value="#{id}"/>
+ <f:param name="view"
value="memberships"/>
+ Memberships
+ </h:outputLink>
+ </gs:li>
+ <gs:li>
+ <h:outputLink style="#{viewMode == 'tasks' ?
'font-weight:bold' : ''}">
+ <f:param name="id"
value="#{id}"/>
+ <f:param name="view"
value="tasks"/>
+ Tasks
+ </h:outputLink>
+ </gs:li>
+ </gs:ul>
+ </td>
+ </tr>
+ <tr class="leftmenuheader">
+ <th colspan="2" class="nf">Actions</th>
+ </tr>
+ <tr class="leftmenu">
+ <td colspan="2">
+ <h:form>
+ <h:inputHidden value="#{id}"/>
+ <gs:ul>
+ <gs:li>
+ <h:commandLink value="Delete"
onclick="return confirm('Are you sure you want to delete this user? This
operation cannot be undone.')">
+ <f:param name="xid">
+ <ga:attribute name="value"
value="#{user.id}"/>
+ </f:param>
+ <ga:parameter name="xid"
target="#{xid}"/>
+ <id:loadUser id="#{xid}"
target="#{xuser}"/>
+ <id:deleteUser user="#{xuser}"/>
+ <f:setPropertyActionListener
value="#{null}" target="#{xuser}"/>
+ <n:nav outcome="success"
url="identities.jsf?view=users" storeMessages="true"/>
+ <n:nav outcome="error"
redirect="true" storeMessages="true"/>
+ </h:commandLink>
+ <h:outputText value=" this user"/>
+ </gs:li>
+ </gs:ul>
+ </h:form>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+
+</gs:div>
+</ui:define>
+
+<ui:define name="body">
+ <gs:div>
+ <ga:attribute name="rendered" value="#{user !=
null}"/>
+ <h:outputText>
+ <ga:attribute name="rendered" value="#{viewMode ==
'memberships'}"/>
+ <ga:checkRole roles="#{access.role.identities.group}">
+ <table class="results">
+ <thead>
+ <tr>
+ <th colspan="4">
+ <ui:decorate template="t_pager.xhtml">
+ <ui:param name="pager"
value="#{memberships_pager}"/>
+ <ui:define name="pager_params">
+ <f:param name="id">
+ <ga:attribute name="value"
value="#{id}"/>
+ </f:param>
+ </ui:define>
+ </ui:decorate>
+ <h:outputText value="Memberships"/>
+ </th>
+ </tr>
+ <tr>
+ <td>Group Name</td>
+ <td>Group Type</td>
+ <td>Role in Group</td>
+ <td>Actions</td>
+ </tr>
+ </thead>
+ <tbody class="filter">
+ <tr>
+ <td>
+ <input name="gname_i" type="text"
value="#{groupName}"
onkeypress="keypress(event,'apply')"/>
+ </td>
+ <td>
+ <input name="gtype_i" type="text"
value="#{groupType}"
onkeypress="keypress(event,'apply')"/>
+ </td>
+ <td>
+ <input name="role_i" type="text"
value="#{roleName}" onkeypress="keypress(event,'apply')"/>
+ </td>
+ <td>
+ <form id="sf" action="user.jsf">
+ <input type="hidden" name="id"
value="#{id}"/>
+ <input type="hidden"
name="gname"/>
+ <input type="hidden"
name="gtype"/>
+ <input type="hidden"
name="role"/>
+ </form>
+ <a id="apply" accesskey="a"
onclick="copyinput('gname_i','gname');copyinput('gtype_i','gtype');copyinput('role_i','role');document.getElementById('sf').submit();return
false;">Apply Filter</a>
+ <h:outputLink style="margin-left:10px">
+ <f:param name="id"
value="#{id}"/>Clear Filter
+ </h:outputLink>
+ </td>
+ </tr>
+ </tbody>
+ <gs:tbody styleClass="results">
+ <ga:attribute name="rendered" value="#{! empty
memberships}"/>
+ <gd:repeat value="#{memberships}"
var="membership" idVar="rid">
+ <gs:tr>
+ <ga:attribute name="styleClass"
value="#{rid % 2 == 0 ? 'odd' : 'even'}"/>
+ <td>
+ <h:outputLink value="group.jsf">
+ <h:outputText
value="#{membership.group.name}"/>
+ <f:param name="id">
+ <ga:attribute name="value"
value="#{membership.group.id}"/>
+ </f:param>
+ </h:outputLink>
+ </td>
+ <td>
+ <h:outputText
value="#{membership.group.type}"/>
+ </td>
+ <td>
+ <h:outputText
value="#{membership.role}"/>
+ </td>
+ <td>
+ <h:form>
+ <h:commandLink value="Remove">
+ <f:param name="xuid"
value="#{id}"/>
+ <f:param name="xmid"
value="#{membership.id}"/>
+ <ga:parameter name="xuid"
target="#{xuid}"/>
+ <ga:parameter name="xmid"
target="#{xmid}"/>
+ <id:loadUser id="#{xuid}"
target="#{xuser}"/>
+ <id:deleteMembership user="#{xuser}"
membershipId="#{xmid}"/>
+ <f:setPropertyActionListener
value="#{null}" target="#{xuser}"/>
+ <n:nav outcome="success"
redirect="true" storeMessages="true"/>
+ <n:nav outcome="error"
redirect="true" storeMessages="true"/>
+ </h:commandLink>
+ </h:form>
+ </td>
+ </gs:tr>
+ </gd:repeat>
+ </gs:tbody>
+ </table>
+ <ga:checkRole roles="#{access.role.identities.user.modify}">
+ <h:form>
+ <table class="results"
style="margin-top:10px">
+ <thead>
+ <tr>
+ <th colspan="3">Add a
Membership</th>
+ </tr>
+ <tr>
+ <td>Group Name</td>
+ <td>Role in Group (optional)</td>
+ <td/>
+ </tr>
+ </thead>
+ <tbody class="filter">
+ <tr>
+ <td>
+ <h:inputText
value="#{newGroupName}">
+ <f:validateLength minimum="1"/>
+ </h:inputText>
+ </td>
+ <td><h:inputText
value="#{newRole}"/></td>
+ <td style="text-align:right">
+ <h:inputHidden value="#{id}"/>
+ <h:commandButton value="Add
Membership">
+ <id:loadUser id="#{id}"
target="#{user}"/>
+ <id:loadGroupByName
groupName="#{newGroupName}" target="#{newGroup}"/>
+ <id:addMembership user="#{user}"
group="#{newGroup}" role="#{newRole}"/>
+ <n:nav outcome="success"
redirect="true" storeMessages="true"/>
+ </h:commandButton>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </h:form>
+ </ga:checkRole>
+ </ga:checkRole>
+ </h:outputText>
+ <h:outputText>
+ <ga:attribute name="rendered" value="#{viewMode ==
'tasks'}"/>
+ <ui:decorate template="t_tasks.xhtml">
+ <ui:define name="tasks_title">
+ Tasks <b>for user "#{user.name}"</b>
+ </ui:define>
+ </ui:decorate>
+ </h:outputText>
+ </gs:div>
+</ui:define>
+</ui:composition>
+
+</html>
\ No newline at end of file
Added:
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/ua/jbpm.css
===================================================================
--- projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/ua/jbpm.css
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/ua/jbpm.css 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,567 @@
+/**********************************************************
+ General styles
+***********************************************************/
+body {
+ font-weight:normal;
+ font-family:verdana,sans-serif;
+ font-size:10pt;
+ background-repeat:no-repeat;
+ margin:0;
+ border-width:0;
+ padding:0;
+}
+
+html {
+ background-attachment:scroll;
+ background-repeat:no-repeat;
+ margin:0;
+ padding:0;
+ border-width:0;
+}
+
+button, input, select, option, textarea {
+ font-family:arial,helvetica,sans-serif;
+ font-weight:normal;
+ font-size:10pt;
+ line-height:normal;
+}
+
+select {
+ vertical-align:top;
+}
+
+form {
+ display:inline;
+}
+
+h1, h2, h3, h4, h5, h6 {
+ display:inline;
+}
+
+h1 {
+ font-size:16pt;
+}
+
+h2 {
+ font-size:14pt;
+}
+
+h3 {
+ font-size:12pt;
+}
+
+h4 {
+ font-size:10pt;
+}
+
+h5 {
+ font-size:8pt;
+}
+
+h6 {
+ font-size:6pt;
+}
+
+a {
+ cursor: pointer;
+ color: rgb(110, 110, 170);
+ text-decoration: underline;
+}
+
+a:hover {
+ color: rgb(160, 160, 255);
+}
+
+div.hr {
+ border-style:none;
+ border-width:0;
+ background:#c0c0c0;
+ margin-left:3px;
+ margin-right:3px;
+ height:2px;
+ font-size:0;
+ margin-top:6px;
+ margin-bottom:10px;
+}
+
+b {
+ font-weight:bold;
+}
+
+table.layout {
+ margin:0;
+ padding:0;
+ border-collapse:collapse;
+}
+
+table.layout td {
+ margin:0;
+ padding:0;
+}
+
+table.layout td.layoutmenu {
+ vertical-align:top;
+ margin:0;
+ padding:0;
+ width:240px;
+ background:#dddddd;
+ border-right-width:1px;
+ border-right-style:solid;
+ border-right-color:#000000;
+ border-top-width:1px;
+ border-top-style:solid;
+ border-top-color:#000000;
+ border-bottom-width:1px;
+ border-bottom-style:solid;
+ border-bottom-color:#000000;
+ border-collapse:collapse;
+}
+
+table.layout td.layoutbody {
+ vertical-align:top;
+ padding:10px;
+ background:#ffffff;
+ width:100%;
+ border-top-width:1px;
+ border-top-style:solid;
+ border-top-color:#000000;
+ border-bottom-width:1px;
+ border-bottom-style:solid;
+ border-bottom-color:#000000;
+ border-collapse:collapse;
+}
+
+table.layout td.layoutheader {
+ background:#dddddd;
+ border-top-width:1px;
+ border-top-style:solid;
+ border-top-color:#000000;
+ border-bottom-width:1px;
+ border-bottom-style:solid;
+ border-bottom-color:#000000;
+ border-collapse:collapse;
+}
+
+table.layout td.layoutfooter {
+ text-align:center;
+ font-size:10px;
+ background:#dddddd;
+ border-top-width:1px;
+ border-top-style:solid;
+ border-top-color:#000000;
+ border-bottom-width:1px;
+ border-bottom-style:solid;
+ border-bottom-color:#000000;
+ border-collapse:collapse;
+}
+
+table.leftmenu {
+ border-width:0;
+ border-bottom-width:1px;
+ border-collapse:collapse;
+ border-color:#000000;
+ width:200px;
+}
+
+tr.leftmenuheader th.nf {
+ border-top-width:1px;
+ border-top-style:solid;
+ border-top-color:#000000;
+}
+
+tr.leftmenuheader th {
+ padding-left:3px;
+ padding-right:3px;
+ background-color:#990000;
+ color:#ffff99;
+ font-size:12px;
+ border-bottom-width:1px;
+ border-bottom-style:solid;
+ border-bottom-color:#000000;
+}
+
+tr.leftmenu th {
+ vertical-align:top;
+ padding:3px;
+ text-align:left;
+ text-decoration:none;
+ font-size:11px;
+ white-space:nowrap;
+ background:#444444;
+ color:#ffffff;
+}
+
+tr.leftmenu td {
+ vertical-align:top;
+ padding:3px;
+ text-align:left;
+ text-decoration:none;
+ font-size:12px;
+ white-space:nowrap;
+ background:#dddddd;
+}
+
+tr.leftmenu td ul {
+ /*list-style-position:inside;*/
+ margin:0;
+ padding:0;
+ padding-left:16px;
+ vertical-align:bottom;
+ list-style-image:url( "../images/bullet.gif" );
+}
+
+.statusSuspended {
+ color:#aa6600;
+ font-weight:bold;
+}
+
+.statusRunning {
+ color:#00cc00;
+ font-weight:bold;
+}
+
+.statusEnded {
+ color:#cc0000;
+ font-weight:bold;
+}
+
+.statusNotstarted {
+ color:#0066aa;
+ font-weight:bold;
+}
+
+a.headermenu {
+ padding-left:8px;
+ padding-right:8px;
+ text-decoration:none;
+ color:#cc0000;
+ border-left-width:1px;
+ border-left-style:solid;
+ border-left-color:#888888;
+}
+
+a.headermenufirst {
+ padding-left:8px;
+ padding-right:8px;
+ text-decoration:none;
+ color:#cc0000;
+}
+
+a.headermenu:hover, a.headermenufirst:hover {
+ background:#ffffff;
+ color:#cc0000;
+}
+
+table.results {
+ border-width:1px;
+ border-style:solid;
+ border-color:#000000;
+ border-collapse:collapse;
+ margin-left:auto;
+ margin-right:auto;
+}
+
+table.results td, table.results th {
+ padding:3px;
+ font-size:11px;
+}
+
+table.results thead tr {
+ cursor:default;
+}
+
+table.results thead tr th {
+ text-align:left;
+ background-color:#990000;
+ color:#ffff99;
+ font-size:12px;
+ border-bottom-style:solid;
+ border-bottom-width:1px;
+ border-bottom-color:#000000;
+}
+
+table.results thead tr th b {
+ font-weight:normal;
+}
+
+table.results thead tr td {
+ text-align:left;
+ background-color:#dddddd;
+ color:#990000;
+ font-weight:bold;
+ border-bottom-style:solid;
+ border-bottom-width:1px;
+ border-bottom-color:#000000;
+}
+
+table.results tbody.results tr {
+ background-color:#dddddd;
+}
+
+table.results tbody.results tr.even {
+ background-color:#ddddbb;
+}
+
+table.results tbody.results tr.odd {
+ background-color:#ffffdd;
+}
+
+table.results tbody.filter td {
+ text-align:left;
+ font-size:10px;
+ padding-bottom:1px;
+ padding-top:1px;
+ font-weight:normal;
+ background-color:#cccccc;
+ border-bottom-style:solid;
+ border-bottom-width:1px;
+ border-bottom-color:#000000;
+}
+
+table.results td {
+ border-right-width:1px;
+ border-right-style:solid;
+ border-right-color:#000000;
+}
+
+table.results tbody.results th {
+ padding:3px;
+ text-align:left;
+ text-decoration:none;
+ font-size:11px;
+ white-space:nowrap;
+ background:#444444;
+ color:#ffffff;
+}
+
+table.results tbody.action tr {
+ background-color:#dddddd;
+}
+
+table.results tbody.action tr td {
+ border-top-color:#000000;
+ border-top-style:solid;
+ border-top-width:1px;
+}
+
+table.msgs {
+ margin-left:auto;
+ margin-right:auto;
+ margin-bottom:15px;
+ border-width:1px;
+ border-style:solid;
+ border-collapse:collapse;
+ border-color:#000000;
+ font-size:10px;
+ width:400px;
+}
+
+table.msgs td {
+ padding-left:8px;
+ padding-right:8px;
+ border-bottom-width:1px;
+ border-bottom-color:#000000;
+ border-bottom-style:dotted;
+}
+
+table.msgs thead th {
+ font-size:11px;
+}
+
+table.error thead th {
+ background-color:#cc0000;
+ color:#ffffff;
+}
+
+table.fatal thead th {
+ background-color:#cc0000;
+ color:#ffffff;
+}
+
+table.warn thead th {
+ background-color:#cccc00;
+ color:#ffffff;
+}
+
+table.info thead th {
+ background-color:#0000cc;
+ color:#ffffff;
+}
+
+.hidden {
+ display:none;
+}
+
+div.pbox, div.pbox_s, div.pbox_e {
+ position:absolute;
+ border-width:1px;
+ border-style:solid;
+}
+
+div.pbox {
+ border-color:#0000ff;
+}
+
+div.pbox_s {
+ border-color:#aa6600;
+}
+
+div.pbox_e {
+ border-color:#cc0000;
+}
+
+div.pboxs, div.pboxs_s, div.pboxs_e {
+ position:absolute;
+ border-right-width:1px;
+ border-right-style:solid;
+ border-bottom-width:1px;
+ border-bottom-style:solid;
+}
+
+div.pboxs {
+ border-right-color:#9999ff;
+ border-bottom-color:#9999ff;
+}
+
+div.pboxs_s {
+ border-right-color:#ffaa99;
+ border-bottom-color:#ffaa99;
+}
+
+div.pboxs_e {
+ border-right-color:#660000;
+ border-bottom-color:#660000;
+}
+
+div.pboxce {
+ position:absolute;
+ overflow:hidden;
+}
+
+div.pboxc, div.pboxc_s, div.pboxc_e {
+ cursor:default;
+ font-size:10px;
+ white-space:nowrap;
+ color:#ffffff;
+ padding-left:3px;
+ padding-right:3px;
+ border-width:1px;
+ border-style:solid;
+}
+
+div.pboxc {
+ border-color:#0000ff;
+ background-color:#0000ff;
+}
+
+div.pboxc_s {
+ border-color:#aa6600;
+ background-color:#aa6600;
+}
+
+div.pboxc_e {
+ border-color:#cc0000;
+ background-color:#cc0000;
+}
+
+div.pboxc a, div.pboxc_s a, div.pboxc_e a {
+ color:#ffffff;
+ text-decoration:none;
+}
+
+div.pboxc a:hover, div.pboxc_s a:hover, div.pboxc_e a:hover {
+ text-decoration:underline;
+}
+
+span.comment {
+ display:block;
+ padding-top:3px;
+ padding-bottom:3px;
+ padding-left:4px;
+ padding-right:4px;
+ border-width:1px;
+ border-color:#990000;
+ border-style:solid;
+ border-collapse:collapse;
+ margin-left:5px;
+ margin-right:5px;
+ background-color:#ffffff;
+ font-family:arial,helvetica,sans-serif;
+ margin-top:4px;
+ margin-bottom:4px;
+ overflow:auto;
+}
+
+textarea.comment {
+ width:480px;
+ height:80px;
+}
+
+/* task forms */
+
+table.dataform {
+ border-style:solid;
+ border-width:1px;
+ border-collapse:collapse;
+ border-color:#000000;
+ margin-left:auto;
+ margin-right:auto;
+}
+
+table.dataform td, table.dataform th {
+ padding-top:3px;
+ padding-bottom:3px;
+ padding-left:5px;
+ padding-right:5px;
+}
+
+table.dataform thead tr th {
+ text-align:left;
+ background-color:#990000;
+ color:#ffff99;
+ font-weight:bold;
+ border-bottom-style:solid;
+ border-bottom-width:1px;
+ border-bottom-color:#000000;
+}
+
+table.dataform tbody th {
+ text-align:left;
+ text-decoration:none;
+ font-size:11px;
+ white-space:nowrap;
+ background:#444444;
+ color:#ffffff;
+ border-bottom-style:solid;
+ border-bottom-width:1px;
+ border-bottom-color:#000000;
+ border-collapse:collapse;
+ width:130px;
+}
+
+table.dataform tbody td {
+ text-align:left;
+ text-decoration:none;
+ font-size:11px;
+ white-space:nowrap;
+ background:#dddddd;
+ color:#000000;
+ border-bottom-style:solid;
+ border-bottom-width:1px;
+ border-bottom-color:#000000;
+ border-collapse:collapse;
+ width:260px;
+}
+
+a.pager {
+ color:#aaaaff;
+}
+
+a.pager:hover {
+ color:#ffffff;
+}
+
+span.pager {
+ font-weight:normal;
+ color:#999999;
+}
\ No newline at end of file
Added:
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/ua/login-example.xhtml
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/ua/login-example.xhtml
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/ua/login-example.xhtml 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,119 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:gd="http://gravel.jboss.org/jsf/1.0/data"
+
xmlns:ga="http://gravel.jboss.org/jsf/1.0/action"
+
xmlns:gs="http://gravel.jboss.org/jsf/1.0/simple"
+
xmlns:n="http://gravel.jboss.org/jsf/1.0/navigation"
+
xmlns:j4j="http://jbpm.org/jbpm4jsf/core"
+>
+
+ <ui:composition template="t_base.xhtml">
+ <ui:define name="header">
+ <h:outputText value="Welcome to the jBPM Console"
style="margin-left:30px;margin-right:10px"/>
+ </ui:define>
+
+ <ui:define name="menu">
+ <ga:responseActions>
+ <ga:parameter name="error" target="#{error}"/>
+ </ga:responseActions>
+ <gs:div style="padding:0;margin:0">
+ <form name="loginform" method="post"
action="j_security_check">
+ <table class="leftmenu" style="border-bottom:1px
black solid">
+ <tbody>
+ <tr class="leftmenuheader">
+ <th colspan="2">Log In</th>
+ </tr>
+ <tr class="leftmenu">
+ <th>User Name</th>
+ <td>
+ <input name="j_username"
type="text"/>
+ </td>
+ </tr>
+ <tr class="leftmenu">
+ <th>Password</th>
+ <td>
+ <input name="j_password"
type="password"/>
+ </td>
+ </tr>
+ <tr class="leftmenu">
+ <th/>
+ <td>
+ <input type="submit" value="Log
In"/>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </form>
+ </gs:div>
+ </ui:define>
+
+ <ui:define name="body">
+ <gs:div rendered="#{error}">
+ <table class="msgs error">
+ <thead>
+ <tr>
+ <th>Error</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <h:outputText value="Login failed. Invalid user
name or password."/>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </gs:div>
+ <table class="results">
+ <thead>
+ <tr>
+ <th colspan="3">Log In as an Example
User</th>
+ </tr>
+ </thead>
+ <tbody class="results">
+ <tr
style="border-bottom-width:1px;border-bottom-style:solid">
+ <td colspan="3">
+ Choose an example user from the list to log in as:
+ </td>
+ </tr>
+ <tr>
+ <th width="180"><b><u>User
Name</u></b></th>
+ <th
width="180"><b><u>Password</u></b></th>
+ <th
width="180"><b><u>Group(s)</u></b></th>
+ </tr>
+ <tr class="odd">
+ <td>manager</td>
+ <td>manager</td>
+ <td>user<br/>manager<br/>admin</td>
+ </tr>
+ <tr class="even">
+ <td>user</td>
+ <td>user</td>
+ <td>user</td>
+ </tr>
+ <tr class="odd">
+ <td>shipper</td>
+ <td>shipper</td>
+ <td>user</td>
+ </tr>
+ <tr class="even">
+ <td>admin</td>
+ <td>admin</td>
+ <td>user<br/>admin</td>
+ </tr>
+ </tbody>
+ </table>
+ <div style="margin-top:20px;margin-bottom:20px">
+ <p align="center">
+ To remove this login name list, edit the
<code>web.xml</code> file and locate the section
+ entitled "Example Login page".
+ </p>
+ </div>
+ </ui:define>
+ </ui:composition>
+
+</html>
\ No newline at end of file
Added:
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/ua/login.xhtml
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/ua/login.xhtml
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/ua/login.xhtml 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,74 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:gd="http://gravel.jboss.org/jsf/1.0/data"
+
xmlns:ga="http://gravel.jboss.org/jsf/1.0/action"
+
xmlns:gs="http://gravel.jboss.org/jsf/1.0/simple"
+
xmlns:n="http://gravel.jboss.org/jsf/1.0/navigation"
+
xmlns:j4j="http://jbpm.org/jbpm4jsf/core"
+>
+
+ <ui:composition template="t_base.xhtml">
+ <ui:define name="header">
+ <h:outputText value="Welcome to the jBPM Console"
style="margin-left:30px;margin-right:10px"/>
+ </ui:define>
+
+ <ui:define name="menu">
+ <ga:responseActions>
+ <ga:parameter name="error" target="#{error}"/>
+ </ga:responseActions>
+ <gs:div style="padding:0;margin:0">
+ <form name="loginform" method="post"
action="j_security_check">
+ <table class="leftmenu">
+ <tbody>
+ <tr class="leftmenuheader">
+ <th colspan="2">Log In</th>
+ </tr>
+ <tr class="leftmenu">
+ <th>User Name</th>
+ <td>
+ <input name="j_username"
type="text"/>
+ </td>
+ </tr>
+ <tr class="leftmenu">
+ <th>Password</th>
+ <td>
+ <input name="j_password"
type="password"/>
+ </td>
+ </tr>
+ <tr class="leftmenu">
+ <th/>
+ <td>
+ <input type="submit" value="Log
In"/>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </form>
+ </gs:div>
+ </ui:define>
+
+ <ui:define name="body">
+ <gs:div rendered="#{error}">
+ <table class="msgs error">
+ <thead>
+ <tr>
+ <th>Error</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>
+ <h:outputText value="Login failed. Invalid user
name or password."/>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </gs:div>
+ </ui:define>
+ </ui:composition>
+
+</html>
\ No newline at end of file
Added:
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/ua/t_base.xhtml
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/ua/t_base.xhtml
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/console/src/main/webapp/ua/t_base.xhtml 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,174 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:gd="http://gravel.jboss.org/jsf/1.0/data"
+
xmlns:ga="http://gravel.jboss.org/jsf/1.0/action"
+
xmlns:gs="http://gravel.jboss.org/jsf/1.0/simple"
+
xmlns:n="http://gravel.jboss.org/jsf/1.0/navigation"
+
xmlns:j4j="http://jbpm.org/jbpm4jsf/core"
+>
+
+<f:loadBundle var="msgs" basename="messages"/>
+
+<head>
+ <title><h:outputText
value="#{msgs['title']}"/></title>
+ <link rel="stylesheet" type="text/css"
href="../ua/jbpm.css" />
+ <!--[if lt IE 7]>
+ <style type="text/css">
+ select {
+ position:relative;
+ top:-2px;
+ }
+ </style>
+ <![endif]-->
+</head>
+
+<body>
+<script type="text/javascript">//<![CDATA[
+
+function onload() {
+}
+
+function keypress(event,cid) {
+ if (event.keyCode != null) {
+ if (event.keyCode == 13) {
+ if (cid != null) {
+ var elem = document.getElementById(cid);
+ if (elem != null) {
+ elem.onclick();
+ }
+ }
+ }
+ }
+}
+
+function copyinput(src,dst) {
+ document.getElementsByName(dst)[0].value=document.getElementsByName(src)[0].value;
+}
+
+function copycheck(src,dst) {
+
document.getElementsByName(dst)[0].value=document.getElementById(src).checked?'true':'false';
+}
+
+//]]></script>
+
+<ui:insert name="root_actions"/>
+
+<ui:insert name="javascript">
+</ui:insert>
+
+ <table class="layout">
+ <tbody>
+ <tr>
+ <td colspan="2" class="layouttop">
+ <ui:insert name="top"/>
+ <img src="../images/background.gif" alt=""/>
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2"
class="layoutheader"><ui:insert name="header"/></td>
+ </tr>
+ <tr>
+ <td class="layoutmenu">
+ <ui:insert name="menu" />
+ </td>
+ <td class="layoutbody">
+ <ga:responseActions>
+ <ga:message target="#{msgs_fatal}"
severity="fatal"/>
+ <ga:message target="#{msgs_error}"
severity="error"/>
+ <ga:message target="#{msgs_warn}"
severity="warn"/>
+ <ga:message target="#{msgs_info}"
severity="info"/>
+ </ga:responseActions>
+ <h:outputText>
+ <ga:attribute name="rendered" value="#{! empty
msgs_fatal}"/>
+ <table class="msgs fatal">
+ <thead>
+ <tr>
+ <th><h:outputText
value="#{msgs['msg.fatal']}"/></th>
+ </tr>
+ </thead>
+ <tbody>
+ <gd:repeat value="#{msgs_fatal}"
var="msg">
+ <tr>
+ <td>
+ <h:outputText
value="#{msg.summary}"/>
+ <h:outputText rendered="#{msg.detail
!= null and msg.detail != msg.summary}" value=": #{msg.detail}"/>
+ </td>
+ </tr>
+ </gd:repeat>
+ </tbody>
+ </table>
+ </h:outputText>
+ <h:outputText>
+ <ga:attribute name="rendered" value="#{! empty
msgs_error}"/>
+ <table class="msgs error">
+ <thead>
+ <tr>
+ <th><h:outputText
value="#{msgs['msg.error']}"/></th>
+ </tr>
+ </thead>
+ <tbody>
+ <gd:repeat value="#{msgs_error}"
var="msg">
+ <tr>
+ <td>
+ <h:outputText
value="#{msg.summary}"/>
+ <h:outputText rendered="#{msg.detail
!= null and msg.detail != msg.summary}" value=": #{msg.detail}"/>
+ </td>
+ </tr>
+ </gd:repeat>
+ </tbody>
+ </table>
+ </h:outputText>
+ <h:outputText>
+ <ga:attribute name="rendered" value="#{! empty
msgs_warn}"/>
+ <table class="msgs warn">
+ <thead>
+ <tr>
+ <th><h:outputText
value="#{msgs['msg.warn']}"/></th>
+ </tr>
+ </thead>
+ <tbody>
+ <gd:repeat value="#{msgs_warn}"
var="msg">
+ <tr>
+ <td>
+ <h:outputText
value="#{msg.summary}"/>
+ <h:outputText rendered="#{msg.detail
!= null and msg.detail != msg.summary}" value=": #{msg.detail}"/>
+ </td>
+ </tr>
+ </gd:repeat>
+ </tbody>
+ </table>
+ </h:outputText>
+ <h:outputText>
+ <ga:attribute name="rendered" value="#{! empty
msgs_info}"/>
+ <table class="msgs info">
+ <thead>
+ <tr>
+ <th><h:outputText
value="#{msgs['msg.info']}"/></th>
+ </tr>
+ </thead>
+ <tbody>
+ <gd:repeat value="#{msgs_info}"
var="msg">
+ <tr>
+ <td>
+ <h:outputText
value="#{msg.summary}"/>
+ <h:outputText rendered="#{msg.detail
!= null and msg.detail != msg.summary}" value=": #{msg.detail}"/>
+ </td>
+ </tr>
+ </gd:repeat>
+ </tbody>
+ </table>
+ </h:outputText>
+ <ui:insert name="body" />
+ </td>
+ </tr>
+ <tr>
+ <td colspan="2"
class="layoutfooter"><h:outputText
value="#{msgs['title']}"/></td>
+ </tr>
+ </tbody>
+ </table>
+</body>
+</html>
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/JbpmActionListener.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/JbpmActionListener.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/JbpmActionListener.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,19 @@
+package org.jbpm.jsf;
+
+import javax.faces.event.ActionEvent;
+
+/**
+ *
+ */
+public interface JbpmActionListener {
+ /**
+ * Get the name of this action. This name may be used
+ * by the navigation handler to choose an appropriate navigation
+ * outcome.
+ *
+ * @return the name
+ */
+ String getName();
+
+ void handleAction(JbpmJsfContext context, ActionEvent event);
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/JbpmJsfContext.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/JbpmJsfContext.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/JbpmJsfContext.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,40 @@
+package org.jbpm.jsf;
+
+import org.jbpm.JbpmContext;
+import org.jbpm.identity.hibernate.IdentitySession;
+
+import javax.faces.application.FacesMessage;
+
+/**
+ *
+ */
+public interface JbpmJsfContext {
+ JbpmContext getJbpmContext();
+
+ IdentitySession getIdentitySession();
+
+ void addSuccessMessage(String message);
+
+ void addSuccessMessage(String message, String detail);
+
+ void addSuccessMessage(FacesMessage.Severity severity, String message, String
detail);
+
+ /**
+ * Choose an outcome. The last outcome selected will be the one returned to
+ * the navigation layer, unless an error occurs, in which case,
+ * the outcome will be set to "error".
+ *
+ * @param outcomeName the outcome name
+ */
+ void selectOutcome(String outcomeName);
+
+ String getOutcome();
+
+ boolean isError();
+
+ void setError(String message);
+
+ void setError(String message, String detail);
+
+ void setError(String message, Throwable cause);
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/CoreLibrary.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/CoreLibrary.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/CoreLibrary.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,111 @@
+package org.jbpm.jsf.core;
+
+import org.jbpm.jsf.core.handler.AddCommentHandler;
+import org.jbpm.jsf.core.handler.AssignTaskHandler;
+import org.jbpm.jsf.core.handler.CancelHandler;
+import org.jbpm.jsf.core.handler.CompleteTaskHandler;
+import org.jbpm.jsf.core.handler.DeleteHandler;
+import org.jbpm.jsf.core.handler.DeployProcessHandler;
+import org.jbpm.jsf.core.handler.GetDiagramInfoHandler;
+import org.jbpm.jsf.core.handler.GetProcessLogsHandler;
+import org.jbpm.jsf.core.handler.GetVariableHandler;
+import org.jbpm.jsf.core.handler.JbpmActionListenerHandler;
+import org.jbpm.jsf.core.handler.ListJobsHandler;
+import org.jbpm.jsf.core.handler.ListProcessInstancesHandler;
+import org.jbpm.jsf.core.handler.ListProcessesHandler;
+import org.jbpm.jsf.core.handler.ListTasksForProcessInstanceHandler;
+import org.jbpm.jsf.core.handler.ListTasksHandler;
+import org.jbpm.jsf.core.handler.ListTokensHandler;
+import org.jbpm.jsf.core.handler.LoadJobHandler;
+import org.jbpm.jsf.core.handler.LoadProcessHandler;
+import org.jbpm.jsf.core.handler.LoadProcessInstanceHandler;
+import org.jbpm.jsf.core.handler.LoadTaskHandler;
+import org.jbpm.jsf.core.handler.LoadTokenHandler;
+import org.jbpm.jsf.core.handler.MoveTokenHandler;
+import org.jbpm.jsf.core.handler.RemoveVariableHandler;
+import org.jbpm.jsf.core.handler.ResumeHandler;
+import org.jbpm.jsf.core.handler.SignalHandler;
+import org.jbpm.jsf.core.handler.StartProcessHandler;
+import org.jbpm.jsf.core.handler.StartTaskHandler;
+import org.jbpm.jsf.core.handler.SuspendHandler;
+import org.jbpm.jsf.core.handler.UpdateTaskStartHandler;
+import org.jbpm.jsf.core.handler.UpdateVariableHandler;
+import org.jbpm.jsf.core.handler.ListTasksForActorHandler;
+import org.jbpm.jsf.core.handler.GetVariableMapHandler;
+import org.jbpm.jsf.core.handler.ListTasksForProcessHandler;
+import org.jbpm.jsf.core.handler.IncludeProcessFileHandler;
+import org.jbpm.jsf.core.handler.ApplyVariableMapHandler;
+import org.jbpm.jsf.core.handler.GetTaskFormInfoHandler;
+import org.jbpm.jsf.core.handler.TaskFormHandler;
+import org.jbpm.jsf.core.ui.UITaskForm;
+
+import com.sun.facelets.tag.AbstractTagLibrary;
+
+import javax.faces.context.FacesContext;
+import javax.faces.application.Application;
+
+/**
+ *
+ */
+public final class CoreLibrary extends AbstractTagLibrary {
+ public CoreLibrary() {
+
super("http://jbpm.org/jbpm4jsf/core");
+
+ final FacesContext facesContext = FacesContext.getCurrentInstance();
+ final Application application = facesContext.getApplication();
+
+ // Actions
+
+ addTagHandler("listProcesses", ListProcessesHandler.class);
+ addTagHandler("listProcessInstances",
ListProcessInstancesHandler.class);
+ addTagHandler("listTokens", ListTokensHandler.class);
+ addTagHandler("listJobs", ListJobsHandler.class);
+ addTagHandler("listTasks", ListTasksHandler.class);
+ addTagHandler("listTasksForActor", ListTasksForActorHandler.class);
+ addTagHandler("listTasksForProcess",
ListTasksForProcessHandler.class);
+ addTagHandler("listTasksForProcessInstance",
ListTasksForProcessInstanceHandler.class);
+
+ addTagHandler("loadProcess", LoadProcessHandler.class);
+ addTagHandler("loadTask", LoadTaskHandler.class);
+ addTagHandler("loadProcessInstance",
LoadProcessInstanceHandler.class);
+ addTagHandler("loadToken", LoadTokenHandler.class);
+ addTagHandler("loadJob", LoadJobHandler.class);
+
+ addTagHandler("cancel", CancelHandler.class);
+ addTagHandler("delete", DeleteHandler.class);
+ addTagHandler("suspend", SuspendHandler.class);
+ addTagHandler("resume", ResumeHandler.class);
+
+ addTagHandler("signal", SignalHandler.class);
+
+ addTagHandler("addComment", AddCommentHandler.class);
+
+ addTagHandler("assignTask", AssignTaskHandler.class);
+
+ addTagHandler("startProcess", StartProcessHandler.class);
+ addTagHandler("deployProcess", DeployProcessHandler.class);
+ addTagHandler("getDiagramInfo", GetDiagramInfoHandler.class);
+
+ addTagHandler("startTask", StartTaskHandler.class);
+ addTagHandler("completeTask", CompleteTaskHandler.class);
+ addTagHandler("updateTaskStart", UpdateTaskStartHandler.class);
+ addTagHandler("getTaskFormInfo", GetTaskFormInfoHandler.class);
+
+ addTagHandler("moveToken", MoveTokenHandler.class);
+
+ addTagHandler("updateVariable", UpdateVariableHandler.class);
+ addTagHandler("removeVariable", RemoveVariableHandler.class);
+ addTagHandler("getVariable", GetVariableHandler.class);
+ addTagHandler("getVariableMap", GetVariableMapHandler.class);
+ addTagHandler("applyVariableMap", ApplyVariableMapHandler.class);
+
+ addTagHandler("getProcessLogs", GetProcessLogsHandler.class);
+
+ addTagHandler("includeProcessFile", IncludeProcessFileHandler.class);
+
+ addTagHandler("jbpmActionListener", JbpmActionListenerHandler.class);
+
+ application.addComponent(UITaskForm.COMPONENT_TYPE, UITaskForm.class.getName());
+ addComponent("taskForm", UITaskForm.COMPONENT_TYPE,
UITaskForm.RENDERER_TYPE, TaskFormHandler.class);
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/AddCommentActionListener.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/AddCommentActionListener.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/AddCommentActionListener.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,60 @@
+package org.jbpm.jsf.core.action;
+
+import org.jbpm.graph.exe.Token;
+import org.jbpm.jsf.JbpmActionListener;
+import org.jbpm.jsf.JbpmJsfContext;
+import org.jbpm.taskmgmt.exe.TaskInstance;
+
+import javax.el.ELContext;
+import javax.el.ValueExpression;
+import javax.faces.context.FacesContext;
+import javax.faces.event.ActionEvent;
+
+/**
+ *
+ */
+public final class AddCommentActionListener implements JbpmActionListener {
+
+ private final ValueExpression comment;
+ private final ValueExpression target;
+
+ public AddCommentActionListener(final ValueExpression comment, final ValueExpression
target) {
+ this.comment = comment;
+ this.target = target;
+ }
+
+ public String getName() {
+ return "addComment";
+ }
+
+ public void handleAction(JbpmJsfContext context, ActionEvent event) {
+ try {
+ final FacesContext facesContext = FacesContext.getCurrentInstance();
+ final ELContext elContext = facesContext.getELContext();
+ final Object commentValue = comment.getValue(elContext);
+ if (commentValue != null) {
+ final String commentAsString = commentValue.toString();
+ if (commentAsString != null) {
+ final String commentText = commentAsString.trim();
+ if (!"".equals(commentText)) {
+ final Object targetValue = target.getValue(elContext);
+ if (targetValue instanceof Token) {
+ ((Token) targetValue).addComment(commentText);
+ } else if (targetValue instanceof TaskInstance) {
+ ((TaskInstance) targetValue).addComment(commentText);
+ } else {
+ context.setError("Failed to add comment", "The
addComment action target refers to an invalid type");
+ return;
+ }
+ context.addSuccessMessage("Comment added
successfully");
+ context.selectOutcome("success");
+ }
+ }
+ }
+ context.getJbpmContext().getSession().flush();
+ } catch (Exception ex) {
+ context.setError("Failed to add comment", ex);
+ return;
+ }
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/ApplyVariableMapActionListener.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/ApplyVariableMapActionListener.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/ApplyVariableMapActionListener.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,91 @@
+package org.jbpm.jsf.core.action;
+
+import org.jbpm.jsf.JbpmActionListener;
+import org.jbpm.jsf.JbpmJsfContext;
+import org.jbpm.jsf.core.impl.UpdatesHashMap;
+import org.jbpm.context.exe.ContextInstance;
+import org.jbpm.taskmgmt.exe.TaskInstance;
+import org.jbpm.graph.exe.ProcessInstance;
+import org.jbpm.graph.exe.Token;
+
+import javax.faces.event.ActionEvent;
+import javax.faces.context.FacesContext;
+import javax.el.ValueExpression;
+import javax.el.ELContext;
+
+import java.util.Set;
+
+/**
+ *
+ */
+public final class ApplyVariableMapActionListener implements JbpmActionListener {
+ private final ValueExpression variableMapExpression;
+ private final ValueExpression targetExpression;
+
+ public ApplyVariableMapActionListener(final ValueExpression variableMapExpression,
final ValueExpression targetExpression) {
+ this.variableMapExpression = variableMapExpression;
+ this.targetExpression = targetExpression;
+ }
+
+ public String getName() {
+ return "applyVariableMap";
+ }
+
+ public void handleAction(JbpmJsfContext context, ActionEvent event) {
+ try {
+ final FacesContext facesContext = FacesContext.getCurrentInstance();
+ final ELContext elContext = facesContext.getELContext();
+ final UpdatesHashMap updatesHashMap = (UpdatesHashMap)
variableMapExpression.getValue(elContext);
+ final Set<String> deletes = updatesHashMap.deletesSet();
+ final Set<String> updates = updatesHashMap.updatesSet();
+ boolean updated = false;
+
+ final Object targetValue = targetExpression.getValue(elContext);
+ if (targetValue instanceof ProcessInstance) {
+ final ProcessInstance processInstance = (ProcessInstance) targetValue;
+ final ContextInstance contextInstance =
processInstance.getContextInstance();
+ for (String name : deletes) {
+ contextInstance.deleteVariable(name);
+ updated = true;
+ }
+ for (String name : updates) {
+ contextInstance.setVariable(name, updatesHashMap.get(name));
+ updated = true;
+ }
+ } else if (targetValue instanceof Token) {
+ final Token token = (Token) targetValue;
+ final ProcessInstance processInstance = token.getProcessInstance();
+ final ContextInstance contextInstance =
processInstance.getContextInstance();
+ for (String name : deletes) {
+ contextInstance.deleteVariable(name, token);
+ updated = true;
+ }
+ for (String name : updates) {
+ contextInstance.setVariable(name, updatesHashMap.get(name), token);
+ updated = true;
+ }
+ } else if (targetValue instanceof TaskInstance) {
+ final TaskInstance task = (TaskInstance) targetValue;
+ for (String name : deletes) {
+ task.deleteVariable(name);
+ updated = true;
+ }
+ for (String name : updates) {
+ task.setVariable(name, updatesHashMap.get(name));
+ updated = true;
+ }
+ } else if (targetValue == null) {
+ context.setError("Error updating variable map", "The
target value was given as null");
+ return;
+ } else {
+ context.setError("Error updating variable map", "The
target value is not a recognized type");
+ return;
+ }
+ if (updated) {
+ context.addSuccessMessage("Variables updated");
+ }
+ } catch (Exception ex) {
+ context.setError("Error updating variable map", ex);
+ }
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/AssignTaskActionListener.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/AssignTaskActionListener.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/AssignTaskActionListener.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,79 @@
+package org.jbpm.jsf.core.action;
+
+import org.jbpm.jsf.JbpmActionListener;
+import org.jbpm.jsf.JbpmJsfContext;
+import org.jbpm.taskmgmt.exe.TaskInstance;
+
+import javax.el.ELContext;
+import javax.el.ValueExpression;
+import javax.faces.context.FacesContext;
+import javax.faces.event.ActionEvent;
+
+/**
+ *
+ */
+public final class AssignTaskActionListener implements JbpmActionListener {
+
+ private final ValueExpression taskInstanceExpression;
+ private final ValueExpression actorIdExpression;
+ private final ValueExpression overwriteSwimlaneExpression;
+
+ public AssignTaskActionListener(final ValueExpression taskInstanceExpression, final
ValueExpression actorIdExpression, final ValueExpression overwriteSwimlaneExpression) {
+ this.taskInstanceExpression = taskInstanceExpression;
+ this.actorIdExpression = actorIdExpression;
+ this.overwriteSwimlaneExpression = overwriteSwimlaneExpression;
+ }
+
+ public String getName() {
+ return "assignTask";
+ }
+
+ public void handleAction(JbpmJsfContext context, ActionEvent event) {
+ try {
+ final FacesContext facesContext = FacesContext.getCurrentInstance();
+ final ELContext elContext = facesContext.getELContext();
+ final Object taskInstanceValue = taskInstanceExpression.getValue(elContext);
+ if (taskInstanceValue == null) {
+ context.setError("Error assigning task", "The task
instance value is null");
+ return;
+ }
+ if (!(taskInstanceValue instanceof TaskInstance)) {
+ context.setError("Error assigning task", "Attempted to
assigning something other than a task instance");
+ return;
+ }
+ final TaskInstance taskInstance = (TaskInstance) taskInstanceValue;
+ if (actorIdExpression == null) {
+ context.setError("Error assigning task", "Actor ID
expression is null");
+ return;
+ }
+ final Object actorIdValue = actorIdExpression.getValue(elContext);
+ if (actorIdValue == null) {
+ context.setError("Error assigning task", "Actor ID
expression resolved to null");
+ return;
+ }
+ final String actorId = actorIdValue.toString();
+ if (overwriteSwimlaneExpression != null) {
+ final Object overwriteSwimlaneValue =
overwriteSwimlaneExpression.getValue(elContext);
+ if (overwriteSwimlaneValue == null) {
+ context.setError("Error assigning task", "Overwrite
swimlane expression resolved to null");
+ return;
+ }
+ final Boolean overwriteSwimlane;
+ if (overwriteSwimlaneValue instanceof Boolean) {
+ overwriteSwimlane = (Boolean) overwriteSwimlaneValue;
+ } else {
+ overwriteSwimlane =
Boolean.valueOf(overwriteSwimlaneValue.toString());
+ }
+ taskInstance.setActorId(actorId, overwriteSwimlane.booleanValue());
+ } else {
+ taskInstance.setActorId(actorId);
+ }
+ context.addSuccessMessage("Task assigned");
+ context.getJbpmContext().getSession().flush();
+ context.selectOutcome("success");
+ } catch (Exception ex) {
+ context.setError("Error assigning task", ex);
+ return;
+ }
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/CancelActionListener.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/CancelActionListener.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/CancelActionListener.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,70 @@
+package org.jbpm.jsf.core.action;
+
+import java.util.Collection;
+import org.jbpm.graph.exe.ProcessInstance;
+import org.jbpm.graph.exe.Token;
+import org.jbpm.jsf.JbpmActionListener;
+import org.jbpm.jsf.JbpmJsfContext;
+import org.jbpm.taskmgmt.exe.TaskInstance;
+
+import javax.el.ELContext;
+import javax.el.ValueExpression;
+import javax.faces.context.FacesContext;
+import javax.faces.event.ActionEvent;
+
+/**
+ *
+ */
+public final class CancelActionListener implements JbpmActionListener {
+
+ private final ValueExpression valueExpression;
+
+ public CancelActionListener(final ValueExpression valueExpression) {
+ this.valueExpression = valueExpression;
+ }
+
+ public String getName() {
+ return "cancel";
+ }
+
+ @SuppressWarnings ({"unchecked"})
+ public void handleAction(JbpmJsfContext context, ActionEvent event) {
+ try {
+ final FacesContext facesContext = FacesContext.getCurrentInstance();
+ final ELContext elContext = facesContext.getELContext();
+ final Object value = valueExpression.getValue(elContext);
+ if (value == null) {
+ context.setError("Cancel failed", "The value is
null");
+ return;
+ }
+ if (value instanceof TaskInstance) {
+ ((TaskInstance)value).setSignalling(false);
+ ((TaskInstance)value).cancel();
+ context.addSuccessMessage("Task instance cancelled");
+ } else if (value instanceof Token) {
+ final Token token = ((Token) value);
+ token.end();
+ for (TaskInstance task : (Collection<TaskInstance>)
token.getProcessInstance().getTaskMgmtInstance().getUnfinishedTasks(token)) {
+ task.cancel();
+ }
+ context.addSuccessMessage("Token ended");
+ } else if (value instanceof ProcessInstance) {
+ final ProcessInstance processInstance = ((ProcessInstance) value);
+ processInstance.end();
+ for (TaskInstance task : (Collection<TaskInstance>)
processInstance.getTaskMgmtInstance().getUnfinishedTasks(processInstance.getRootToken()))
{
+ task.setSignalling(false);
+ task.cancel();
+ }
+ context.addSuccessMessage("Process instance cancelled");
+ } else {
+ context.setError("Cancel failed", "The value is not a
recognized type");
+ return;
+ }
+ context.getJbpmContext().getSession().flush();
+ context.selectOutcome("success");
+ } catch (Exception ex) {
+ context.setError("Cancel failed", ex);
+ return;
+ }
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/CompleteTaskActionListener.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/CompleteTaskActionListener.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/CompleteTaskActionListener.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,65 @@
+package org.jbpm.jsf.core.action;
+
+import org.jbpm.graph.def.Transition;
+import org.jbpm.jsf.JbpmActionListener;
+import org.jbpm.jsf.JbpmJsfContext;
+import org.jbpm.taskmgmt.exe.TaskInstance;
+
+import javax.el.ELContext;
+import javax.el.ValueExpression;
+import javax.faces.context.FacesContext;
+import javax.faces.event.ActionEvent;
+
+/**
+ *
+ */
+public final class CompleteTaskActionListener implements JbpmActionListener {
+
+ private final ValueExpression taskInstanceExpression;
+ private final ValueExpression transitionExpression;
+
+ public CompleteTaskActionListener(final ValueExpression taskInstanceExpression, final
ValueExpression transitionExpression) {
+ this.taskInstanceExpression = taskInstanceExpression;
+ this.transitionExpression = transitionExpression;
+ }
+
+ public String getName() {
+ return "completeTask";
+ }
+
+ public void handleAction(JbpmJsfContext context, ActionEvent event) {
+ try {
+ final FacesContext facesContext = FacesContext.getCurrentInstance();
+ final ELContext elContext = facesContext.getELContext();
+ final Object taskInstanceValue = taskInstanceExpression.getValue(elContext);
+ if (taskInstanceValue == null) {
+ context.setError("Error completing task", "The task
instance value is null");
+ return;
+ }
+ if (!(taskInstanceValue instanceof TaskInstance)) {
+ context.setError("Error completing task", "Attempted to
complete something other than a task instance");
+ return;
+ }
+ final TaskInstance taskInstance = (TaskInstance) taskInstanceValue;
+ if (transitionExpression != null) {
+ final Object transitionValue = transitionExpression.getValue(elContext);
+ if (transitionValue == null) {
+ taskInstance.end();
+ } else if (transitionValue instanceof Transition) {
+ taskInstance.end((Transition)transitionValue);
+ } else {
+ final String transitionName = transitionValue.toString();
+ taskInstance.end(transitionName);
+ }
+ } else {
+ taskInstance.end();
+ }
+ context.addSuccessMessage("Task completed");
+ context.getJbpmContext().getSession().flush();
+ context.selectOutcome("success");
+ } catch (Exception ex) {
+ context.setError("Error completing task", ex);
+ return;
+ }
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/DeleteActionListener.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/DeleteActionListener.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/DeleteActionListener.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,57 @@
+package org.jbpm.jsf.core.action;
+
+import org.jbpm.graph.def.ProcessDefinition;
+import org.jbpm.graph.exe.ProcessInstance;
+import org.jbpm.job.Job;
+import org.jbpm.jsf.JbpmActionListener;
+import org.jbpm.jsf.JbpmJsfContext;
+
+import javax.el.ELContext;
+import javax.el.ValueExpression;
+import javax.faces.context.FacesContext;
+import javax.faces.event.ActionEvent;
+
+/**
+ *
+ */
+public final class DeleteActionListener implements JbpmActionListener {
+ private final ValueExpression valueExpression;
+
+ public DeleteActionListener(final ValueExpression valueExpression) {
+ this.valueExpression = valueExpression;
+ }
+
+ public String getName() {
+ return "delete";
+ }
+
+ public void handleAction(JbpmJsfContext context, ActionEvent event) {
+ try {
+ final FacesContext facesContext = FacesContext.getCurrentInstance();
+ final ELContext elContext = facesContext.getELContext();
+ final Object value = valueExpression.getValue(elContext);
+ if (value == null) {
+ context.setError("Delete failed", "The value is
null");
+ return;
+ }
+ if (value instanceof ProcessDefinition) {
+
context.getJbpmContext().getGraphSession().deleteProcessDefinition((ProcessDefinition)
value);
+ context.addSuccessMessage("Process deleted");
+ } else if (value instanceof ProcessInstance) {
+
context.getJbpmContext().getGraphSession().deleteProcessInstance((ProcessInstance)
value);
+ context.addSuccessMessage("Process instance deleted");
+ } else if (value instanceof Job) {
+ context.getJbpmContext().getJobSession().deleteJob((Job) value);
+ context.addSuccessMessage("Job deleted");
+ } else {
+ context.setError("Delete failed", "Value type is not
recognized");
+ return;
+ }
+ context.getJbpmContext().getSession().flush();
+ context.selectOutcome("success");
+ } catch (Exception ex) {
+ context.setError("Delete failed", ex);
+ return;
+ }
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/DeployProcessActionListener.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/DeployProcessActionListener.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/DeployProcessActionListener.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,88 @@
+package org.jbpm.jsf.core.action;
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.zip.ZipInputStream;
+import org.jbpm.JbpmContext;
+import org.jbpm.graph.def.ProcessDefinition;
+import org.jbpm.jsf.JbpmActionListener;
+import org.jbpm.jsf.JbpmJsfContext;
+
+import javax.el.ELContext;
+import javax.el.ValueExpression;
+import javax.faces.context.FacesContext;
+import javax.faces.event.ActionEvent;
+
+import java.util.logging.Logger;
+
+/**
+ *
+ */
+public final class DeployProcessActionListener implements JbpmActionListener {
+ private final ValueExpression archiveExpression;
+ private final ValueExpression targetExpression;
+
+ public DeployProcessActionListener(final ValueExpression archiveExpression, final
ValueExpression targetExpression) {
+ this.archiveExpression = archiveExpression;
+ this.targetExpression = targetExpression;
+ }
+
+ public String getName() {
+ return "deployProcess";
+ }
+
+ public void handleAction(JbpmJsfContext context, ActionEvent event) {
+ try {
+ final FacesContext facesContext = FacesContext.getCurrentInstance();
+ final ELContext elContext = facesContext.getELContext();
+ final InputStream inputStream;
+ final Object archiveValue = archiveExpression.getValue(elContext);
+ if (archiveValue == null) {
+ context.setError("Error deploying process", "Archive is
null");
+ return;
+ }
+ if (archiveValue instanceof InputStream) {
+ inputStream = (InputStream) archiveValue;
+ } else if (archiveValue instanceof byte[]) {
+ final byte[] bytes = (byte[]) archiveValue;
+ inputStream = new ByteArrayInputStream(bytes);
+ } else {
+ context.setError("Error deploying process", "Type of
'archive' attribute is not recognized");
+ return;
+ }
+ final ProcessDefinition processDefinition;
+ try {
+ ZipInputStream zis = new ZipInputStream(inputStream);
+ try {
+ processDefinition = ProcessDefinition.parseParZipInputStream(zis);
+ final JbpmContext jbpmContext = context.getJbpmContext();
+ jbpmContext.deployProcessDefinition(processDefinition);
+ } finally {
+ try {
+ zis.close();
+ } catch (IOException e) {
+ log.warning("Error closing zip Ninput stream after deploy:
" + e.getMessage());
+ }
+ }
+ } finally {
+ try {
+ inputStream.close();
+ } catch (IOException e) {
+ log.warning("Error closing input stream after deploy: " +
e.getMessage());
+ }
+ }
+ context.addSuccessMessage("New process deployed");
+ context.getJbpmContext().getSession().flush();
+ if (targetExpression != null) {
+ targetExpression.setValue(elContext, processDefinition);
+ }
+ context.selectOutcome("success");
+ } catch (Exception ex) {
+ context.setError("Error deploying process", ex);
+ return;
+ }
+ }
+
+ private static final Logger log =
Logger.getLogger("org.jbpm.jsf.core.handler.DeployProcessActionHandler");
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/GetDiagramInfoActionListener.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/GetDiagramInfoActionListener.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/GetDiagramInfoActionListener.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,169 @@
+package org.jbpm.jsf.core.action;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import org.jbpm.file.def.FileDefinition;
+import org.jbpm.graph.def.ProcessDefinition;
+import org.jbpm.jsf.JbpmActionListener;
+import org.jbpm.jsf.JbpmJsfContext;
+import org.jbpm.util.XmlUtil;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+import javax.el.ELContext;
+import javax.el.ValueExpression;
+import javax.faces.context.FacesContext;
+import javax.faces.event.ActionEvent;
+
+/**
+ *
+ */
+public final class GetDiagramInfoActionListener implements JbpmActionListener {
+ private final ValueExpression processExpression;
+ private final ValueExpression targetExpression;
+
+ public GetDiagramInfoActionListener(final ValueExpression processExpression, final
ValueExpression targetExpression) {
+ this.processExpression = processExpression;
+ this.targetExpression = targetExpression;
+ }
+
+ public String getName() {
+ return "getDiagramInfo";
+ }
+
+ public void handleAction(JbpmJsfContext context, ActionEvent event) {
+ try {
+ final FacesContext facesContext = FacesContext.getCurrentInstance();
+ final ELContext elContext = facesContext.getELContext();
+ final Object processValue = processExpression.getValue(elContext);
+ if (processValue == null) {
+ context.setError("Error getting diagram info", "The
process value is null");
+ return;
+ }
+ if (!(processValue instanceof ProcessDefinition)) {
+ context.setError("Error getting diagram info", "The
process value is not of type ProcessDefinition");
+ }
+ final ProcessDefinition processDefinition = (ProcessDefinition)
processValue;
+ final FileDefinition fileDefinition = processDefinition.getFileDefinition();
+ if (! fileDefinition.hasFile("gpd.xml")) {
+ targetExpression.setValue(elContext, null);
+ context.selectOutcome("success");
+ return;
+ }
+ Document document =
XmlUtil.parseXmlInputStream(fileDefinition.getInputStream("gpd.xml"));
+ Element processDiagramElement = document.getDocumentElement();
+ final String widthString =
processDiagramElement.getAttribute("width");
+ final String heightString =
processDiagramElement.getAttribute("height");
+ final List<DiagramNodeInfo> diagramNodeInfoList = new
ArrayList<DiagramNodeInfo>();
+ final NodeList nodeNodeList =
processDiagramElement.getElementsByTagName("node");
+ final int nodeNodeListLength = nodeNodeList.getLength();
+ for (int i = 0; i < nodeNodeListLength; i ++) {
+ final Node nodeNode = nodeNodeList.item(i);
+ if (nodeNode instanceof Node && nodeNode.getParentNode() ==
processDiagramElement) {
+ final Element nodeElement = (Element) nodeNode;
+ final String nodeName = nodeElement.getAttribute("name");
+ final String nodeXString = nodeElement.getAttribute("x");
+ final String nodeYString = nodeElement.getAttribute("y");
+ final String nodeWidthString =
nodeElement.getAttribute("width");
+ final String nodeHeightString =
nodeElement.getAttribute("height");
+ final DiagramNodeInfo nodeInfo = new DiagramNodeInfo(
+ nodeName,
+ Integer.parseInt(nodeXString),
+ Integer.parseInt(nodeYString),
+ Integer.parseInt(nodeWidthString),
+ Integer.parseInt(nodeHeightString)
+ );
+ diagramNodeInfoList.add(nodeInfo);
+ }
+ }
+ final DiagramInfo diagramInfo = new DiagramInfo(
+ Integer.parseInt(heightString),
+ Integer.parseInt(widthString),
+ diagramNodeInfoList
+ );
+ targetExpression.setValue(elContext, diagramInfo);
+ context.selectOutcome("success");
+ } catch (Exception ex) {
+ context.setError("Error getting diagram info", ex);
+ return;
+ }
+ }
+
+ public static final class DiagramInfo implements Serializable {
+ private static final long serialVersionUID = 1L;
+
+ private final int width;
+ private final int height;
+ private final Map<String,DiagramNodeInfo> nodeMap;
+
+ public DiagramInfo(final int height, final int width, final
List<DiagramNodeInfo> nodeList) {
+ this.height = height;
+ this.width = width;
+ final LinkedHashMap<String, DiagramNodeInfo> map = new
LinkedHashMap<String, DiagramNodeInfo>();
+ for (DiagramNodeInfo nodeInfo : nodeList) {
+ map.put(nodeInfo.getName(), nodeInfo);
+ }
+ nodeMap = Collections.unmodifiableMap(map);
+ }
+
+ public int getHeight() {
+ return height;
+ }
+
+ public Map<String, DiagramNodeInfo> getNodeMap() {
+ return nodeMap;
+ }
+
+ public List<DiagramNodeInfo> getNodes() {
+ return Collections.unmodifiableList(new
ArrayList<DiagramNodeInfo>(nodeMap.values()));
+ }
+
+ public int getWidth() {
+ return width;
+ }
+ }
+
+ public static final class DiagramNodeInfo implements Serializable {
+ private static final long serialVersionUID = 1L;
+
+ private final String name;
+ private final int x;
+ private final int y;
+ private final int width;
+ private final int height;
+
+ public DiagramNodeInfo(final String name, final int x, final int y, final int
width, final int height) {
+ this.height = height;
+ this.name = name;
+ this.width = width;
+ this.x = x;
+ this.y = y;
+ }
+
+ public int getHeight() {
+ return height;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public int getWidth() {
+ return width;
+ }
+
+ public int getX() {
+ return x;
+ }
+
+ public int getY() {
+ return y;
+ }
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/GetProcessLogsActionListener.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/GetProcessLogsActionListener.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/GetProcessLogsActionListener.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,149 @@
+package org.jbpm.jsf.core.action;
+
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import org.jbpm.context.log.VariableCreateLog;
+import org.jbpm.context.log.VariableDeleteLog;
+import org.jbpm.context.log.VariableLog;
+import org.jbpm.context.log.VariableUpdateLog;
+import org.jbpm.graph.exe.ProcessInstance;
+import org.jbpm.graph.log.ActionLog;
+import org.jbpm.graph.log.NodeLog;
+import org.jbpm.graph.log.ProcessInstanceCreateLog;
+import org.jbpm.graph.log.ProcessInstanceEndLog;
+import org.jbpm.graph.log.ProcessStateLog;
+import org.jbpm.graph.log.SignalLog;
+import org.jbpm.graph.log.TokenCreateLog;
+import org.jbpm.graph.log.TokenEndLog;
+import org.jbpm.graph.log.TransitionLog;
+import org.jbpm.jsf.JbpmActionListener;
+import org.jbpm.jsf.JbpmJsfContext;
+import org.jbpm.logging.exe.LoggingInstance;
+import org.jbpm.logging.log.CompositeLog;
+import org.jbpm.logging.log.MessageLog;
+import org.jbpm.logging.log.ProcessLog;
+import org.jbpm.taskmgmt.log.SwimlaneAssignLog;
+import org.jbpm.taskmgmt.log.SwimlaneCreateLog;
+import org.jbpm.taskmgmt.log.SwimlaneLog;
+import org.jbpm.taskmgmt.log.TaskAssignLog;
+import org.jbpm.taskmgmt.log.TaskCreateLog;
+import org.jbpm.taskmgmt.log.TaskEndLog;
+import org.jbpm.taskmgmt.log.TaskLog;
+
+import javax.el.ELContext;
+import javax.el.ValueExpression;
+import javax.faces.context.FacesContext;
+import javax.faces.event.ActionEvent;
+
+/**
+ *
+ */
+public final class GetProcessLogsActionListener implements JbpmActionListener {
+ private final ValueExpression processInstanceExpression;
+ private final ValueExpression typeExpression;
+ private final ValueExpression targetExpression;
+
+ private static final Map<String, Class<? extends ProcessLog>> logTypes;
+
+ static {
+ Map<String, Class<? extends ProcessLog>> newLogTypes = new
HashMap<String, Class<? extends ProcessLog>>();
+ // variables
+ newLogTypes.put("variable", VariableLog.class);
+ newLogTypes.put("variableUpdate", VariableUpdateLog.class);
+ newLogTypes.put("variableCreate", VariableCreateLog.class);
+ newLogTypes.put("variableDelete", VariableDeleteLog.class);
+ // jpdl
+ newLogTypes.put("action", ActionLog.class);
+ newLogTypes.put("node", NodeLog.class);
+ newLogTypes.put("processInstanceCreate",
ProcessInstanceCreateLog.class);
+ newLogTypes.put("processInstanceEnd", ProcessInstanceEndLog.class);
+ newLogTypes.put("processState", ProcessStateLog.class);
+ newLogTypes.put("signal", SignalLog.class);
+ newLogTypes.put("tokenCreate", TokenCreateLog.class);
+ newLogTypes.put("tokenEnd", TokenEndLog.class);
+ newLogTypes.put("transition", TransitionLog.class);
+ // misc
+ newLogTypes.put("composite", CompositeLog.class);
+ newLogTypes.put("message", MessageLog.class);
+ // swimlane
+ newLogTypes.put("swimlane", SwimlaneLog.class);
+ newLogTypes.put("swimlaneAssign", SwimlaneAssignLog.class);
+ newLogTypes.put("swimlaneCreate", SwimlaneCreateLog.class);
+ // task
+ newLogTypes.put("task", TaskLog.class);
+ newLogTypes.put("taskAssign", TaskAssignLog.class);
+ newLogTypes.put("taskCreate", TaskCreateLog.class);
+ newLogTypes.put("taskEnd", TaskEndLog.class);
+ logTypes = Collections.unmodifiableMap(newLogTypes);
+ }
+
+ public GetProcessLogsActionListener(final ValueExpression processInstanceExpression,
final ValueExpression typeExpression, final ValueExpression targetExpression) {
+ this.processInstanceExpression = processInstanceExpression;
+ this.typeExpression = typeExpression;
+ this.targetExpression = targetExpression;
+ }
+
+ public String getName() {
+ return "getProcessLogs";
+ }
+
+ @SuppressWarnings ({"unchecked"})
+ public void handleAction(JbpmJsfContext context, ActionEvent event) {
+ try {
+ final FacesContext facesContext = FacesContext.getCurrentInstance();
+ final ELContext elContext = facesContext.getELContext();
+ final Object processInstanceValue =
processInstanceExpression.getValue(elContext);
+ if (processInstanceValue == null) {
+ context.setError("Error reading process logs", "The
process instance value is null");
+ return;
+ }
+ if (!(processInstanceValue instanceof ProcessInstance)) {
+ context.setError("Error reading process logs", "Attempted
to read process logs from something other than a process instance");
+ return;
+ }
+ final List<ProcessLog> processLogs;
+ if (typeExpression != null) {
+ final Object typeValue = typeExpression.getValue(elContext);
+ if (typeValue == null) {
+ context.setError("Error reading process logs", "Null
value for type attribute");
+ return;
+ }
+ final Class type;
+ if (typeValue instanceof Class) {
+ type = (Class) typeValue;
+ } else {
+ final String typeString = typeValue.toString();
+ if (logTypes.containsKey(typeString)) {
+ type = logTypes.get(typeString);
+ } else {
+ try {
+ type = Class.forName(typeString);
+ } catch (ClassNotFoundException e) {
+ context.setError("Error reading process logs",
"No class by the name of '" + typeString + "' was found, and that
type is not among the predefined types for log records");
+ return;
+ }
+ }
+ }
+ if (! ProcessLog.class.isAssignableFrom(type)) {
+ context.setError("Error reading process logs", "The
given log type '" + type.getName() + "' is not a valid process log
type");
+ return;
+ }
+ final ProcessInstance processInstance = (ProcessInstance)
processInstanceValue;
+ final LoggingInstance loggingInstance =
processInstance.getLoggingInstance();
+ processLogs = loggingInstance.getLogs(type);
+ } else {
+ final ProcessInstance processInstance = (ProcessInstance)
processInstanceValue;
+ final LoggingInstance loggingInstance =
processInstance.getLoggingInstance();
+ processLogs = loggingInstance.getLogs();
+ }
+ // TODO - add filter parameters perhaps?
+ targetExpression.setValue(elContext, processLogs);
+ context.selectOutcome("success");
+ } catch (Exception ex) {
+ context.setError("Error reading process logs", ex);
+ return;
+ }
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/GetTaskFormInfoActionListener.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/GetTaskFormInfoActionListener.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/GetTaskFormInfoActionListener.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,90 @@
+package org.jbpm.jsf.core.action;
+
+import org.jbpm.jsf.JbpmActionListener;
+import org.jbpm.jsf.JbpmJsfContext;
+import org.jbpm.graph.def.ProcessDefinition;
+import org.jbpm.file.def.FileDefinition;
+import org.jbpm.util.XmlUtil;
+import org.jbpm.JbpmException;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.NodeList;
+import org.w3c.dom.Node;
+
+import javax.el.ValueExpression;
+import javax.el.ELContext;
+import javax.faces.event.ActionEvent;
+import javax.faces.context.FacesContext;
+
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.LinkedHashMap;
+import java.util.Collections;
+import java.util.HashMap;
+import java.io.Serializable;
+import java.io.InputStream;
+
+/**
+ *
+ */
+public final class GetTaskFormInfoActionListener implements JbpmActionListener {
+ private final ValueExpression processExpression;
+ private final ValueExpression targetExpression;
+
+ public GetTaskFormInfoActionListener(final ValueExpression processExpression, final
ValueExpression targetExpression) {
+ this.processExpression = processExpression;
+ this.targetExpression = targetExpression;
+ }
+
+ public String getName() {
+ return "getTaskFormInfo";
+ }
+
+ public void handleAction(JbpmJsfContext context, ActionEvent event) {
+ try {
+ final FacesContext facesContext = FacesContext.getCurrentInstance();
+ final ELContext elContext = facesContext.getELContext();
+ final Object processValue = processExpression.getValue(elContext);
+ if (processValue == null) {
+ context.setError("Error reading form information", "The
process value is null");
+ return;
+ }
+ if (!(processValue instanceof ProcessDefinition)) {
+ context.setError("Error reading form information", "The
process value is not of type ProcessDefinition");
+ }
+ final ProcessDefinition processDefinition = (ProcessDefinition)
processValue;
+ final FileDefinition fileDefinition = processDefinition.getFileDefinition();
+ if (! fileDefinition.hasFile("forms.xml")) {
+ targetExpression.setValue(elContext, Collections.emptyMap());
+ context.selectOutcome("success");
+ return;
+ }
+ final InputStream inputStream =
fileDefinition.getInputStream("forms.xml");
+ if (inputStream == null) {
+ targetExpression.setValue(elContext, Collections.emptyMap());
+ context.selectOutcome("success");
+ return;
+ }
+ final Map<String, String> targetMap = new HashMap<String,
String>();
+ final Document document = XmlUtil.parseXmlInputStream(inputStream);
+ final Element documentElement = document.getDocumentElement();
+ final NodeList nodeList =
documentElement.getElementsByTagName("form");
+ final int length = nodeList.getLength();
+ for (int i = 0; i < length; i ++) {
+ final Element element = (Element) nodeList.item(i);
+ final String itemTaskName = element.getAttribute("task");
+ final String itemFormName = element.getAttribute("form");
+ if (itemTaskName == null || itemFormName == null) {
+ continue;
+ }
+ targetMap.put(itemTaskName, itemFormName);
+ }
+ targetExpression.setValue(elContext,
Collections.unmodifiableMap(targetMap));
+ context.selectOutcome("success");
+ } catch (Exception ex) {
+ context.setError("Error reading form information", ex);
+ return;
+ }
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/GetVariableActionListener.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/GetVariableActionListener.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/GetVariableActionListener.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,67 @@
+package org.jbpm.jsf.core.action;
+
+import org.jbpm.jsf.JbpmActionListener;
+import org.jbpm.jsf.JbpmJsfContext;
+import org.jbpm.taskmgmt.exe.TaskInstance;
+import org.jbpm.graph.exe.Token;
+import org.jbpm.graph.exe.ProcessInstance;
+import org.jbpm.context.exe.ContextInstance;
+
+import javax.el.ELContext;
+import javax.el.ValueExpression;
+import javax.faces.context.FacesContext;
+import javax.faces.event.ActionEvent;
+
+/**
+ *
+ */
+public final class GetVariableActionListener implements JbpmActionListener {
+ private final ValueExpression nameExpression;
+ private final ValueExpression targetExpression;
+ private final ValueExpression entityExpression;
+
+ public GetVariableActionListener(final ValueExpression nameExpression, final
ValueExpression targetExpression, final ValueExpression entityExpression) {
+ this.nameExpression = nameExpression;
+ this.targetExpression = targetExpression;
+ this.entityExpression = entityExpression;
+ }
+
+ public String getName() {
+ return "getVariable";
+ }
+
+ public void handleAction(JbpmJsfContext context, ActionEvent event) {
+ try {
+ final FacesContext facesContext = FacesContext.getCurrentInstance();
+ final ELContext elContext = facesContext.getELContext();
+ final Object nameValue = nameExpression.getValue(elContext);
+ if (nameValue == null) {
+ context.setError("Error getting variable", "The value of
the 'name' attribute is null");
+ return;
+ }
+ final String name = nameValue.toString();
+ final Object entity = entityExpression.getValue(elContext);
+ final Object value;
+ if (entity instanceof TaskInstance) {
+ final TaskInstance task = (TaskInstance) entity;
+ value = task.getVariable(name);
+ } else if (entity instanceof Token) {
+ final Token token = (Token) entity;
+ final ContextInstance contextInstance =
token.getProcessInstance().getContextInstance();
+ value = contextInstance.getVariable(name, token);
+ } else if (entity instanceof ProcessInstance) {
+ final ProcessInstance processInstance = (ProcessInstance) entity;
+ final ContextInstance contextInstance =
processInstance.getContextInstance();
+ value = contextInstance.getVariable(name);
+ } else {
+ context.setError("Error getting variable", "The value
given for the 'entity' attribute is not a task, token, or process
instance");
+ return;
+ }
+ targetExpression.setValue(elContext, value);
+ context.selectOutcome("success");
+ } catch (Exception ex) {
+ context.setError("Error getting variable", ex);
+ return;
+ }
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/GetVariableMapActionListener.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/GetVariableMapActionListener.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/GetVariableMapActionListener.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,63 @@
+package org.jbpm.jsf.core.action;
+
+import org.jbpm.jsf.JbpmActionListener;
+import org.jbpm.jsf.JbpmJsfContext;
+import org.jbpm.jsf.core.impl.UpdatesHashMap;
+import org.jbpm.graph.exe.ProcessInstance;
+import org.jbpm.graph.exe.Token;
+import org.jbpm.taskmgmt.exe.TaskInstance;
+
+import javax.faces.event.ActionEvent;
+import javax.faces.context.FacesContext;
+import javax.el.ValueExpression;
+import javax.el.ELContext;
+
+import java.util.Map;
+import java.util.Collections;
+
+/**
+ *
+ */
+public final class GetVariableMapActionListener implements JbpmActionListener {
+ private final ValueExpression valueExpression;
+ private final ValueExpression targetExpression;
+
+ public GetVariableMapActionListener(final ValueExpression valueExpression, final
ValueExpression targetExpression) {
+ this.valueExpression = valueExpression;
+ this.targetExpression = targetExpression;
+ }
+
+ public String getName() {
+ return "getVariableMap";
+ }
+
+ @SuppressWarnings ({"unchecked"})
+ public void handleAction(JbpmJsfContext context, ActionEvent event) {
+ try {
+ final FacesContext facesContext = FacesContext.getCurrentInstance();
+ final ELContext elContext = facesContext.getELContext();
+ final Object value = valueExpression.getValue(elContext);
+ final Map<String,Object> updatesMap;
+ if (value instanceof ProcessInstance) {
+ final ProcessInstance processInstance = (ProcessInstance) value;
+ updatesMap = new
UpdatesHashMap(processInstance.getContextInstance().getVariables());
+ } else if (value instanceof Token) {
+ final Token token = (Token) value;
+ updatesMap = new
UpdatesHashMap(token.getProcessInstance().getContextInstance().getVariables(token));
+ } else if (value instanceof TaskInstance) {
+ final TaskInstance task = (TaskInstance) value;
+ updatesMap = new UpdatesHashMap(task.getVariables());
+ } else if (value == null) {
+ context.setError("Error getting variable map", "The value
was given as null");
+ return;
+ } else {
+ context.setError("Error getting variable map", "The value
is not a recognized type");
+ return;
+ }
+ targetExpression.setValue(elContext, updatesMap);
+ } catch (Exception ex) {
+ context.setError("Error getting variable map", ex);
+ return;
+ }
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/LazyJbpmActionListener.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/LazyJbpmActionListener.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/LazyJbpmActionListener.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,77 @@
+package org.jbpm.jsf.core.action;
+
+import org.jbpm.jsf.JbpmActionListener;
+import org.jbpm.jsf.JbpmJsfContext;
+
+import javax.el.ELContext;
+import javax.el.ValueExpression;
+import javax.faces.context.FacesContext;
+import javax.faces.event.ActionEvent;
+
+/**
+ *
+ */
+public final class LazyJbpmActionListener implements JbpmActionListener {
+
+ private final ValueExpression typeExpression;
+ private final ValueExpression listenerExpression;
+
+ public LazyJbpmActionListener(final ValueExpression typeExpression, final
ValueExpression listenerExpression) {
+ this.typeExpression = typeExpression;
+ this.listenerExpression = listenerExpression;
+ }
+
+ public String getName() {
+ return "jbpmActionListener";
+ }
+
+ public void handleAction(JbpmJsfContext context, ActionEvent event) {
+ final FacesContext facesContext = FacesContext.getCurrentInstance();
+ final ELContext elContext = facesContext.getELContext();
+ final JbpmActionListener listener;
+ if (typeExpression != null) {
+ final Object typeValue = typeExpression.getValue(elContext);
+ if (typeValue == null) {
+ context.setError("Error calling action listener", "The
type value is null");
+ return;
+ }
+ final Class type;
+ if (typeValue instanceof Class) {
+ type = (Class) typeValue;
+ } else {
+ final String className = typeValue.toString();
+ try {
+ type = Class.forName(className);
+ } catch (ClassNotFoundException e) {
+ context.setError("Error calling action listener", "The
class '" + className + "' was not found");
+ return;
+ }
+ }
+ if (! JbpmActionListener.class.isAssignableFrom(type)) {
+ context.setError("Error calling action listener", "The
class '" + type.getName() + "' is not a valid
JbpmActionListener");
+ return;
+ }
+ try {
+ listener = (JbpmActionListener) type.newInstance();
+ } catch (Exception e) {
+ context.setError("Error calling action listener", e);
+ return;
+ }
+ } else if (listenerExpression != null) {
+ final Object listenerValue = listenerExpression.getValue(elContext);
+ if (listenerValue == null) {
+ context.setError("Error calling action listener", "The
listener value is null");
+ return;
+ }
+ if (! (listenerValue instanceof JbpmActionListener)) {
+ context.setError("Error calling action listener", "The
listener value given is not a valid JbpmActionListener");
+ return;
+ }
+ listener = (JbpmActionListener) listenerValue;
+ } else {
+ context.setError("Error calling action listener", "Either a
type or a listener must be given");
+ return;
+ }
+ listener.handleAction(context, event);
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/ListJobsActionListener.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/ListJobsActionListener.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/ListJobsActionListener.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,39 @@
+package org.jbpm.jsf.core.action;
+
+import java.util.List;
+import org.jbpm.jsf.JbpmActionListener;
+import org.jbpm.jsf.JbpmJsfContext;
+
+import javax.el.ELContext;
+import javax.el.ValueExpression;
+import javax.faces.context.FacesContext;
+import javax.faces.event.ActionEvent;
+
+/**
+ *
+ */
+public final class ListJobsActionListener implements JbpmActionListener {
+ private final ValueExpression targetExpression;
+
+ public ListJobsActionListener(final ValueExpression targetExpression) {
+ this.targetExpression = targetExpression;
+ }
+
+ public String getName() {
+ return "listJob";
+ }
+
+ @SuppressWarnings ({"unchecked"})
+ public void handleAction(JbpmJsfContext context, ActionEvent event) {
+ try {
+ final FacesContext facesContext = FacesContext.getCurrentInstance();
+ final ELContext elContext = facesContext.getELContext();
+ final List jobs =
context.getJbpmContext().getSession().createQuery("from
org.jbpm.job.Job").list();
+ targetExpression.setValue(elContext, jobs);
+ context.selectOutcome("success");
+ } catch (Exception ex) {
+ context.setError("Error listing job instances", ex);
+ return;
+ }
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/ListProcessInstancesActionListener.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/ListProcessInstancesActionListener.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/ListProcessInstancesActionListener.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,56 @@
+package org.jbpm.jsf.core.action;
+
+import org.jbpm.jsf.JbpmActionListener;
+import org.jbpm.jsf.JbpmJsfContext;
+import org.jbpm.graph.def.ProcessDefinition;
+import org.jbpm.graph.exe.ProcessInstance;
+
+import javax.el.ValueExpression;
+import javax.el.ELContext;
+import javax.faces.event.ActionEvent;
+import javax.faces.context.FacesContext;
+
+import java.util.List;
+
+/**
+ *
+ */
+public final class ListProcessInstancesActionListener implements JbpmActionListener {
+ private final ValueExpression targetExpression;
+ private final ValueExpression processIdExpression;
+
+ public ListProcessInstancesActionListener(final ValueExpression processIdExpression,
final ValueExpression targetExpression) {
+ this.processIdExpression = processIdExpression;
+ this.targetExpression = targetExpression;
+ }
+
+ public String getName() {
+ return "listProcessInstances";
+ }
+
+ @SuppressWarnings ({"unchecked"})
+ public void handleAction(JbpmJsfContext context, ActionEvent event) {
+ try {
+ final FacesContext facesContext = FacesContext.getCurrentInstance();
+ final ELContext elContext = facesContext.getELContext();
+ final Object idValue = processIdExpression.getValue(elContext);
+ final long id;
+ if (idValue instanceof Number) {
+ id = ((Number)idValue).longValue();
+ } else if (idValue instanceof String) {
+ id = Long.parseLong((String)idValue);
+ } else if (idValue != null) {
+ id = Long.parseLong(idValue.toString());
+ } else {
+ context.setError("Error loading process instance list",
"The process ID value is null");
+ return;
+ }
+ final List<ProcessInstance> processList =
context.getJbpmContext().getGraphSession().findProcessInstances(id);
+ targetExpression.setValue(elContext, processList);
+ context.selectOutcome("success");
+ } catch (Exception ex) {
+ context.setError("Error loading process instance list", ex);
+ return;
+ }
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/ListProcessesActionListener.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/ListProcessesActionListener.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/ListProcessesActionListener.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,41 @@
+package org.jbpm.jsf.core.action;
+
+import org.jbpm.jsf.JbpmActionListener;
+import org.jbpm.jsf.JbpmJsfContext;
+import org.jbpm.graph.def.ProcessDefinition;
+
+import javax.el.ValueExpression;
+import javax.el.ELContext;
+import javax.faces.event.ActionEvent;
+import javax.faces.context.FacesContext;
+
+import java.util.List;
+
+/**
+ *
+ */
+public final class ListProcessesActionListener implements JbpmActionListener {
+ private final ValueExpression targetExpression;
+
+ public ListProcessesActionListener(final ValueExpression targetExpression) {
+ this.targetExpression = targetExpression;
+ }
+
+ public String getName() {
+ return "listProcesses";
+ }
+
+ @SuppressWarnings ({"unchecked"})
+ public void handleAction(JbpmJsfContext context, ActionEvent event) {
+ try {
+ final FacesContext facesContext = FacesContext.getCurrentInstance();
+ final ELContext elContext = facesContext.getELContext();
+ final List<ProcessDefinition> processList =
context.getJbpmContext().getGraphSession().findAllProcessDefinitions();
+ targetExpression.setValue(elContext, processList);
+ context.selectOutcome("success");
+ } catch (Exception ex) {
+ context.setError("Error loading process list", ex);
+ return;
+ }
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/ListTasksActionListener.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/ListTasksActionListener.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/ListTasksActionListener.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,51 @@
+package org.jbpm.jsf.core.action;
+
+import java.util.Collections;
+import java.util.List;
+import org.hibernate.Session;
+import org.jbpm.jsf.JbpmActionListener;
+import org.jbpm.jsf.JbpmJsfContext;
+import org.jbpm.taskmgmt.exe.TaskInstance;
+
+import javax.el.ELContext;
+import javax.el.ValueExpression;
+import javax.faces.context.FacesContext;
+import javax.faces.event.ActionEvent;
+
+/**
+ *
+ */
+public final class ListTasksActionListener implements JbpmActionListener {
+ private final ValueExpression targetExpression;
+ private final ValueExpression includeEndedExpression;
+
+ public ListTasksActionListener(final ValueExpression includeEndedExpression, final
ValueExpression targetExpression) {
+ this.includeEndedExpression = includeEndedExpression;
+ this.targetExpression = targetExpression;
+ }
+
+ public String getName() {
+ return "listTasks";
+ }
+
+ @SuppressWarnings ({"unchecked"})
+ public void handleAction(JbpmJsfContext context, ActionEvent event) {
+ try {
+ final FacesContext facesContext = FacesContext.getCurrentInstance();
+ final ELContext elContext = facesContext.getELContext();
+ final Boolean includeEnded = (Boolean)
includeEndedExpression.getValue(elContext);
+ final Session session = context.getJbpmContext().getSession();
+ final List<TaskInstance> taskList;
+ if (includeEnded != null && includeEnded.booleanValue()) {
+ taskList = session.createQuery("from
org.jbpm.taskmgmt.exe.TaskInstance ti").list();
+ } else {
+ taskList = session.createQuery("from
org.jbpm.taskmgmt.exe.TaskInstance ti where ti.end is not null").list();
+ }
+ targetExpression.setValue(elContext,
Collections.unmodifiableList(taskList));
+ context.selectOutcome("success");
+ } catch (Exception ex) {
+ context.setError("Error loading task list", ex);
+ return;
+ }
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/ListTasksForActorActionListener.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/ListTasksForActorActionListener.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/ListTasksForActorActionListener.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,45 @@
+package org.jbpm.jsf.core.action;
+
+import org.jbpm.jsf.JbpmActionListener;
+import org.jbpm.jsf.JbpmJsfContext;
+import org.jbpm.taskmgmt.exe.TaskInstance;
+
+import javax.el.ValueExpression;
+import javax.el.ELContext;
+import javax.faces.event.ActionEvent;
+import javax.faces.context.FacesContext;
+
+import java.util.List;
+import java.util.Collections;
+
+/**
+ *
+ */
+public final class ListTasksForActorActionListener implements JbpmActionListener {
+ private final ValueExpression targetExpression;
+ private final ValueExpression actorExpression;
+
+ public ListTasksForActorActionListener(final ValueExpression actorExpression, final
ValueExpression targetExpression) {
+ this.actorExpression = actorExpression;
+ this.targetExpression = targetExpression;
+ }
+
+ public String getName() {
+ return "listTasksForActorActionListener";
+ }
+
+ @SuppressWarnings ({"unchecked"})
+ public void handleAction(JbpmJsfContext context, ActionEvent event) {
+ try {
+ final FacesContext facesContext = FacesContext.getCurrentInstance();
+ final ELContext elContext = facesContext.getELContext();
+ final String actorId = (String) actorExpression.getValue(elContext);
+ final List<TaskInstance> taskList =
Collections.unmodifiableList(context.getJbpmContext().getTaskList(actorId));
+ targetExpression.setValue(elContext, taskList);
+ context.selectOutcome("success");
+ } catch (Exception ex) {
+ context.setError("Error loading task list", ex);
+ return;
+ }
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/ListTasksForProcessActionListener.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/ListTasksForProcessActionListener.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/ListTasksForProcessActionListener.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,52 @@
+package org.jbpm.jsf.core.action;
+
+import org.jbpm.jsf.JbpmActionListener;
+import org.jbpm.jsf.JbpmJsfContext;
+import org.jbpm.graph.exe.ProcessInstance;
+import org.jbpm.graph.def.ProcessDefinition;
+import org.jbpm.taskmgmt.exe.TaskInstance;
+
+import javax.el.ValueExpression;
+import javax.el.ELContext;
+import javax.faces.event.ActionEvent;
+import javax.faces.context.FacesContext;
+
+import java.util.List;
+import java.util.Collections;
+import java.util.ArrayList;
+
+/**
+ *
+ */
+public final class ListTasksForProcessActionListener implements JbpmActionListener {
+ private final ValueExpression targetExpression;
+ private final ValueExpression processExpression;
+
+ public ListTasksForProcessActionListener(final ValueExpression processExpression,
final ValueExpression targetExpression) {
+ this.processExpression = processExpression;
+ this.targetExpression = targetExpression;
+ }
+
+ public String getName() {
+ return "listTasksForProcess";
+ }
+
+ @SuppressWarnings ({"unchecked"})
+ public void handleAction(JbpmJsfContext context, ActionEvent event) {
+ try {
+ final FacesContext facesContext = FacesContext.getCurrentInstance();
+ final ELContext elContext = facesContext.getELContext();
+ final ProcessDefinition processDefinition = (ProcessDefinition)
processExpression.getValue(elContext);
+ final List<TaskInstance> taskList =
+ Collections.unmodifiableList(context.getJbpmContext().getSession()
+ .createQuery("select ti from org.jbpm.taskmgmt.exe.TaskInstance
ti join ti.processInstance pi where pi.processDefinition = ?")
+ .setEntity(0, processDefinition)
+ .list());
+ targetExpression.setValue(elContext, taskList);
+ context.selectOutcome("success");
+ } catch (Exception ex) {
+ context.setError("Error loading task list", ex);
+ return;
+ }
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/ListTasksForProcessInstanceActionListener.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/ListTasksForProcessInstanceActionListener.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/ListTasksForProcessInstanceActionListener.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,47 @@
+package org.jbpm.jsf.core.action;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import org.jbpm.graph.exe.ProcessInstance;
+import org.jbpm.jsf.JbpmActionListener;
+import org.jbpm.jsf.JbpmJsfContext;
+import org.jbpm.taskmgmt.exe.TaskInstance;
+
+import javax.el.ELContext;
+import javax.el.ValueExpression;
+import javax.faces.context.FacesContext;
+import javax.faces.event.ActionEvent;
+
+/**
+ *
+ */
+public final class ListTasksForProcessInstanceActionListener implements
JbpmActionListener {
+ private final ValueExpression targetExpression;
+ private final ValueExpression processInstanceExpression;
+
+ public ListTasksForProcessInstanceActionListener(final ValueExpression
processInstanceExpression, final ValueExpression targetExpression) {
+ this.processInstanceExpression = processInstanceExpression;
+ this.targetExpression = targetExpression;
+ }
+
+ public String getName() {
+ return "listTasksForProcessInstance";
+ }
+
+ @SuppressWarnings ({"unchecked"})
+ public void handleAction(JbpmJsfContext context, ActionEvent event) {
+ try {
+ final FacesContext facesContext = FacesContext.getCurrentInstance();
+ final ELContext elContext = facesContext.getELContext();
+ final ProcessInstance processInstance = (ProcessInstance)
processInstanceExpression.getValue(elContext);
+ final List<TaskInstance> taskList =
+ Collections.unmodifiableList(new
ArrayList<TaskInstance>(processInstance.getTaskMgmtInstance().getTaskInstances()));
+ targetExpression.setValue(elContext, taskList);
+ context.selectOutcome("success");
+ } catch (Exception ex) {
+ context.setError("Error loading task list", ex);
+ return;
+ }
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/ListTokensActionListener.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/ListTokensActionListener.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/ListTokensActionListener.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,45 @@
+package org.jbpm.jsf.core.action;
+
+import org.jbpm.graph.exe.ProcessInstance;
+import org.jbpm.jsf.JbpmActionListener;
+import org.jbpm.jsf.JbpmJsfContext;
+
+import javax.el.ELContext;
+import javax.el.ValueExpression;
+import javax.faces.context.FacesContext;
+import javax.faces.event.ActionEvent;
+
+/**
+ *
+ */
+public final class ListTokensActionListener implements JbpmActionListener {
+ private final ValueExpression targetExpression;
+ private final ValueExpression processInstanceExpression;
+
+ public ListTokensActionListener(final ValueExpression processInstanceExpression,
final ValueExpression targetExpression) {
+ this.processInstanceExpression = processInstanceExpression;
+ this.targetExpression = targetExpression;
+ }
+
+ public String getName() {
+ return "listTokens";
+ }
+
+ @SuppressWarnings ({"unchecked"})
+ public void handleAction(JbpmJsfContext context, ActionEvent event) {
+ try {
+ final FacesContext facesContext = FacesContext.getCurrentInstance();
+ final ELContext elContext = facesContext.getELContext();
+ final Object processInstanceValue =
processInstanceExpression.getValue(elContext);
+ if (!(processInstanceValue instanceof ProcessInstance)) {
+ context.setError("Error listing token instances", "The
given process instance is not an instance of ProcessInstance");
+ return;
+ }
+ targetExpression.setValue(elContext,
((ProcessInstance)processInstanceValue).findAllTokens());
+ context.selectOutcome("success");
+ } catch (Exception ex) {
+ context.setError("Error listing token instances", ex);
+ return;
+ }
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/LoadJobActionListener.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/LoadJobActionListener.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/LoadJobActionListener.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,57 @@
+package org.jbpm.jsf.core.action;
+
+import org.jbpm.job.Job;
+import org.jbpm.jsf.JbpmActionListener;
+import org.jbpm.jsf.JbpmJsfContext;
+
+import javax.el.ELContext;
+import javax.el.ValueExpression;
+import javax.faces.context.FacesContext;
+import javax.faces.event.ActionEvent;
+
+/**
+ *
+ */
+public final class LoadJobActionListener implements JbpmActionListener {
+
+ private final ValueExpression idExpression;
+ private final ValueExpression targetExpression;
+
+ public LoadJobActionListener(final ValueExpression idExpression, final
ValueExpression targetExpression) {
+ this.idExpression = idExpression;
+ this.targetExpression = targetExpression;
+ }
+
+ public String getName() {
+ return "loadJob";
+ }
+
+ public void handleAction(JbpmJsfContext context, ActionEvent event) {
+ try {
+ final FacesContext facesContext = FacesContext.getCurrentInstance();
+ final ELContext elContext = facesContext.getELContext();
+ final Object idValue = idExpression.getValue(elContext);
+ if (idValue == null) {
+ context.setError("Error loading job instance", "The ID
value is null");
+ return;
+ }
+ final long id;
+ if (idValue instanceof Long) {
+ id = ((Long)idValue).longValue();
+ } else {
+ id = Long.valueOf(idValue.toString()).longValue();
+ }
+ final Job job;
+ job = context.getJbpmContext().getJobSession().getJob(id);
+ if (job == null) {
+ context.setError("Error loading job instance", "No job
instance was found with an ID of " + id);
+ return;
+ }
+ targetExpression.setValue(elContext, job);
+ context.selectOutcome("success");
+ } catch (Exception ex) {
+ context.setError("Error loading job", ex);
+ return;
+ }
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/LoadProcessActionListener.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/LoadProcessActionListener.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/LoadProcessActionListener.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,55 @@
+package org.jbpm.jsf.core.action;
+
+import org.jbpm.graph.def.ProcessDefinition;
+import org.jbpm.jsf.JbpmActionListener;
+import org.jbpm.jsf.JbpmJsfContext;
+
+import javax.el.ELContext;
+import javax.el.ValueExpression;
+import javax.faces.context.FacesContext;
+import javax.faces.event.ActionEvent;
+
+/**
+ *
+ */
+public final class LoadProcessActionListener implements JbpmActionListener {
+ private final ValueExpression idExpression;
+ private final ValueExpression targetExpression;
+
+ public LoadProcessActionListener(final ValueExpression idExpression, final
ValueExpression targetExpression) {
+ this.idExpression = idExpression;
+ this.targetExpression = targetExpression;
+ }
+
+ public String getName() {
+ return "loadProcess";
+ }
+
+ public void handleAction(JbpmJsfContext context, ActionEvent event) {
+ try {
+ final FacesContext facesContext = FacesContext.getCurrentInstance();
+ final ELContext elContext = facesContext.getELContext();
+ final Object idValue = idExpression.getValue(elContext);
+ if (idValue == null) {
+ context.setError("Error loading process", "The ID value is
null");
+ return;
+ }
+ final long id;
+ if (idValue instanceof Long) {
+ id = ((Long)idValue).longValue();
+ } else {
+ id = Long.valueOf(idValue.toString()).longValue();
+ }
+ final ProcessDefinition processDefinition =
context.getJbpmContext().getGraphSession().getProcessDefinition(id);
+ if (processDefinition == null) {
+ context.setError("Error loading process", "No process
definition was found with an ID of " + id);
+ return;
+ }
+ targetExpression.setValue(elContext, processDefinition);
+ context.selectOutcome("success");
+ } catch (Exception ex) {
+ context.setError("Error loading process", ex);
+ return;
+ }
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/LoadProcessInstanceActionListener.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/LoadProcessInstanceActionListener.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/LoadProcessInstanceActionListener.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,79 @@
+package org.jbpm.jsf.core.action;
+
+import org.jbpm.graph.exe.ProcessInstance;
+import org.jbpm.jsf.JbpmActionListener;
+import org.jbpm.jsf.JbpmJsfContext;
+
+import javax.el.ELContext;
+import javax.el.ValueExpression;
+import javax.faces.context.FacesContext;
+import javax.faces.event.ActionEvent;
+import javax.faces.event.PhaseId;
+
+/**
+ *
+ */
+public final class LoadProcessInstanceActionListener implements JbpmActionListener {
+
+ private final ValueExpression idExpression;
+ private final ValueExpression targetExpression;
+ private final ValueExpression forUpdateExpression;
+
+ public LoadProcessInstanceActionListener(final ValueExpression idExpression, final
ValueExpression targetExpression, final ValueExpression forUpdateExpression) {
+ this.idExpression = idExpression;
+ this.targetExpression = targetExpression;
+ this.forUpdateExpression = forUpdateExpression;
+ }
+
+ public String getName() {
+ return "loadProcessInstance";
+ }
+
+ public void handleAction(JbpmJsfContext context, ActionEvent event) {
+ try {
+ final FacesContext facesContext = FacesContext.getCurrentInstance();
+ final ELContext elContext = facesContext.getELContext();
+ final Object idValue = idExpression.getValue(elContext);
+ if (idValue == null) {
+ context.setError("Error loading process instance", "The ID
value is null");
+ return;
+ }
+ final long id;
+ if (idValue instanceof Long) {
+ id = ((Long)idValue).longValue();
+ } else {
+ id = Long.valueOf(idValue.toString()).longValue();
+ }
+ final boolean forUpdate;
+ if (forUpdateExpression != null) {
+ final Object forUpdateValue = forUpdateExpression.getValue(elContext);
+ if (forUpdateValue == null) {
+ context.setError("Error loading process instance",
"The value of 'forUpdate' is null");
+ return;
+ }
+ if (forUpdateValue instanceof Boolean) {
+ forUpdate = ((Boolean)forUpdateValue).booleanValue();
+ } else {
+ forUpdate = Boolean.parseBoolean(forUpdateValue.toString());
+ }
+ } else {
+ forUpdate = event.getPhaseId() != PhaseId.RENDER_RESPONSE;
+ }
+ final ProcessInstance processInstance;
+ if (forUpdate) {
+ processInstance =
context.getJbpmContext().getProcessInstanceForUpdate(id);
+ } else {
+ processInstance = context.getJbpmContext().getProcessInstance(id);
+ }
+ if (processInstance == null) {
+ context.setError("Error loading process instance", "No
process instance was found with an ID of " + id);
+ return;
+ }
+ targetExpression.setValue(elContext, processInstance);
+ context.selectOutcome("success");
+ } catch (Exception ex) {
+ context.setError("Error loading process instance", ex);
+ return;
+ }
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/LoadTaskActionListener.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/LoadTaskActionListener.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/LoadTaskActionListener.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,79 @@
+package org.jbpm.jsf.core.action;
+
+import org.jbpm.jsf.JbpmActionListener;
+import org.jbpm.jsf.JbpmJsfContext;
+import org.jbpm.taskmgmt.exe.TaskInstance;
+
+import javax.el.ELContext;
+import javax.el.ValueExpression;
+import javax.faces.context.FacesContext;
+import javax.faces.event.ActionEvent;
+import javax.faces.event.PhaseId;
+
+/**
+ *
+ */
+public final class LoadTaskActionListener implements JbpmActionListener {
+
+ private final ValueExpression idExpression;
+ private final ValueExpression targetExpression;
+ private final ValueExpression forUpdateExpression;
+
+ public LoadTaskActionListener(final ValueExpression idExpression, final
ValueExpression targetExpression, final ValueExpression forUpdateExpression) {
+ this.idExpression = idExpression;
+ this.targetExpression = targetExpression;
+ this.forUpdateExpression = forUpdateExpression;
+ }
+
+ public String getName() {
+ return "loadTask";
+ }
+
+ public void handleAction(JbpmJsfContext context, ActionEvent event) {
+ try {
+ final FacesContext facesContext = FacesContext.getCurrentInstance();
+ final ELContext elContext = facesContext.getELContext();
+ final Object idValue = idExpression.getValue(elContext);
+ if (idValue == null) {
+ context.setError("Error loading task instance", "The ID
value is null");
+ return;
+ }
+ final long id;
+ if (idValue instanceof Long) {
+ id = ((Long)idValue).longValue();
+ } else {
+ id = Long.valueOf(idValue.toString()).longValue();
+ }
+ final boolean forUpdate;
+ if (forUpdateExpression != null) {
+ final Object forUpdateValue = forUpdateExpression.getValue(elContext);
+ if (forUpdateValue == null) {
+ context.setError("Error loading task instance", "The
value of 'forUpdate' is null");
+ return;
+ }
+ if (forUpdateValue instanceof Boolean) {
+ forUpdate = ((Boolean)forUpdateValue).booleanValue();
+ } else {
+ forUpdate = Boolean.parseBoolean(forUpdateValue.toString());
+ }
+ } else {
+ forUpdate = event.getPhaseId() != PhaseId.RENDER_RESPONSE;
+ }
+ final TaskInstance taskInstance;
+ if (forUpdate) {
+ taskInstance = context.getJbpmContext().getTaskInstanceForUpdate(id);
+ } else {
+ taskInstance = context.getJbpmContext().getTaskInstance(id);
+ }
+ if (taskInstance == null) {
+ context.setError("Error loading task instance", "No task
instance was found with an ID of " + id);
+ return;
+ }
+ targetExpression.setValue(elContext, taskInstance);
+ context.selectOutcome("success");
+ } catch (Exception ex) {
+ context.setError("Error loading task", ex);
+ return;
+ }
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/LoadTokenActionListener.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/LoadTokenActionListener.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/LoadTokenActionListener.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,79 @@
+package org.jbpm.jsf.core.action;
+
+import org.jbpm.graph.exe.Token;
+import org.jbpm.jsf.JbpmActionListener;
+import org.jbpm.jsf.JbpmJsfContext;
+
+import javax.el.ELContext;
+import javax.el.ValueExpression;
+import javax.faces.context.FacesContext;
+import javax.faces.event.ActionEvent;
+import javax.faces.event.PhaseId;
+
+/**
+ *
+ */
+public final class LoadTokenActionListener implements JbpmActionListener {
+
+ private final ValueExpression idExpression;
+ private final ValueExpression targetExpression;
+ private final ValueExpression forUpdateExpression;
+
+ public LoadTokenActionListener(final ValueExpression idExpression, final
ValueExpression targetExpression, final ValueExpression forUpdateExpression) {
+ this.idExpression = idExpression;
+ this.targetExpression = targetExpression;
+ this.forUpdateExpression = forUpdateExpression;
+ }
+
+ public String getName() {
+ return "loadProcessInstance";
+ }
+
+ public void handleAction(JbpmJsfContext context, ActionEvent event) {
+ try {
+ final FacesContext facesContext = FacesContext.getCurrentInstance();
+ final ELContext elContext = facesContext.getELContext();
+ final Object idValue = idExpression.getValue(elContext);
+ if (idValue == null) {
+ context.setError("Error loading token", "The ID value is
null");
+ return;
+ }
+ final long id;
+ if (idValue instanceof Long) {
+ id = ((Long)idValue).longValue();
+ } else {
+ id = Long.valueOf(idValue.toString()).longValue();
+ }
+ final boolean forUpdate;
+ if (forUpdateExpression != null) {
+ final Object forUpdateValue = forUpdateExpression.getValue(elContext);
+ if (forUpdateValue == null) {
+ context.setError("Error loading token", "The value of
'forUpdate' is null");
+ return;
+ }
+ if (forUpdateValue instanceof Boolean) {
+ forUpdate = ((Boolean)forUpdateValue).booleanValue();
+ } else {
+ forUpdate = Boolean.parseBoolean(forUpdateValue.toString());
+ }
+ } else {
+ forUpdate = event.getPhaseId() != PhaseId.RENDER_RESPONSE;
+ }
+ final Token token;
+ if (forUpdate) {
+ token = context.getJbpmContext().getTokenForUpdate(id);
+ } else {
+ token = context.getJbpmContext().getToken(id);
+ }
+ if (token == null) {
+ context.setError("Error loading token", "No token was
found with an ID of " + id);
+ return;
+ }
+ targetExpression.setValue(elContext, token);
+ context.selectOutcome("success");
+ } catch (Exception ex) {
+ context.setError("Error loading token", ex);
+ return;
+ }
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/MoveTokenActionListener.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/MoveTokenActionListener.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/MoveTokenActionListener.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,68 @@
+package org.jbpm.jsf.core.action;
+
+import org.jbpm.graph.def.Node;
+import org.jbpm.graph.exe.Token;
+import org.jbpm.jsf.JbpmActionListener;
+import org.jbpm.jsf.JbpmJsfContext;
+
+import javax.el.ELContext;
+import javax.el.ValueExpression;
+import javax.faces.context.FacesContext;
+import javax.faces.event.ActionEvent;
+
+/**
+ *
+ */
+public final class MoveTokenActionListener implements JbpmActionListener {
+ private final ValueExpression tokenExpression;
+ private final ValueExpression nodeExpression;
+
+ public MoveTokenActionListener(final ValueExpression tokenExpression, final
ValueExpression nodeExpression) {
+ this.tokenExpression = tokenExpression;
+ this.nodeExpression = nodeExpression;
+ }
+
+ public String getName() {
+ return "moveToken";
+ }
+
+ public void handleAction(JbpmJsfContext context, ActionEvent event) {
+ try {
+ final FacesContext facesContext = FacesContext.getCurrentInstance();
+ final ELContext elContext = facesContext.getELContext();
+ final Object tokenValue = tokenExpression.getValue(elContext);
+ if (tokenValue == null) {
+ context.setError("Error moving token", "The token value is
null");
+ return;
+ }
+ if (! (tokenValue instanceof Token)) {
+ context.setError("Error moving token", "Attempted to move
something other than a token");
+ return;
+ }
+ final Token token = (Token) tokenValue;
+ final Node node;
+ final Object nodeValue = nodeExpression.getValue(elContext);
+ if (nodeValue == null) {
+ context.setError("Error moving token", "Node value is
null");
+ return;
+ }
+ if (nodeValue instanceof Node) {
+ node = (Node) nodeValue;
+ } else {
+ final String nodeName = nodeValue.toString();
+ node =
token.getProcessInstance().getProcessDefinition().getNode(nodeName);
+ if (node == null) {
+ context.setError("Error moving token", "No node found
by name of '" + nodeName + "'");
+ return;
+ }
+ }
+ token.setNode(node);
+ context.addSuccessMessage("Token moved to node '" +
node.getName() + "'");
+ context.getJbpmContext().getSession().flush();
+ context.selectOutcome("success");
+ } catch (Exception ex) {
+ context.setError("Error moving token", ex);
+ return;
+ }
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/RemoveVariableActionListener.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/RemoveVariableActionListener.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/RemoveVariableActionListener.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,74 @@
+package org.jbpm.jsf.core.action;
+
+import org.jbpm.jsf.JbpmActionListener;
+import org.jbpm.jsf.JbpmJsfContext;
+import org.jbpm.taskmgmt.exe.TaskInstance;
+import org.jbpm.graph.exe.Token;
+import org.jbpm.graph.exe.ProcessInstance;
+import org.jbpm.context.exe.ContextInstance;
+
+import javax.el.ELContext;
+import javax.el.ValueExpression;
+import javax.faces.context.FacesContext;
+import javax.faces.event.ActionEvent;
+
+/**
+ *
+ */
+public final class RemoveVariableActionListener implements JbpmActionListener {
+ private final ValueExpression nameExpression;
+ private final ValueExpression oldValueTargetExpression;
+ private final ValueExpression entityExpression;
+
+ public RemoveVariableActionListener(final ValueExpression nameExpression, final
ValueExpression oldValueTargetExpression, final ValueExpression entityExpression) {
+ this.nameExpression = nameExpression;
+ this.oldValueTargetExpression = oldValueTargetExpression;
+ this.entityExpression = entityExpression;
+ }
+
+ public String getName() {
+ return "removeVariable";
+ }
+
+ public void handleAction(JbpmJsfContext context, ActionEvent event) {
+ try {
+ final FacesContext facesContext = FacesContext.getCurrentInstance();
+ final ELContext elContext = facesContext.getELContext();
+ final Object nameValue = nameExpression.getValue(elContext);
+ if (nameValue == null) {
+ context.setError("Error removing variable", "The value of
the 'name' attribute is null");
+ return;
+ }
+ final String name = nameValue.toString();
+ final Object entity = entityExpression.getValue(elContext);
+ final Object oldValue;
+ if (entity instanceof TaskInstance) {
+ final TaskInstance task = (TaskInstance) entity;
+ oldValue = task.getVariable(name);
+ task.deleteVariable(name);
+ } else if (entity instanceof Token) {
+ final Token token = (Token) entity;
+ final ContextInstance contextInstance =
token.getProcessInstance().getContextInstance();
+ oldValue = contextInstance.getVariable(name, token);
+ contextInstance.deleteVariable(name, token);
+ } else if (entity instanceof ProcessInstance) {
+ final ProcessInstance processInstance = (ProcessInstance) entity;
+ final ContextInstance contextInstance =
processInstance.getContextInstance();
+ oldValue = contextInstance.getVariable(name);
+ contextInstance.deleteVariable(name);
+ } else {
+ context.setError("Error removing variable", "The value
given for the 'entity' attribute is not a task, token, or process
instance");
+ return;
+ }
+ if (oldValueTargetExpression != null) {
+ oldValueTargetExpression.setValue(elContext, oldValue);
+ }
+ context.addSuccessMessage("Variable '" + name + "'
successfully removed");
+ context.getJbpmContext().getSession().flush();
+ context.selectOutcome("success");
+ } catch (Exception ex) {
+ context.setError("Error removing variable", ex);
+ return;
+ }
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/ResumeActionListener.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/ResumeActionListener.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/ResumeActionListener.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,58 @@
+package org.jbpm.jsf.core.action;
+
+import org.jbpm.jsf.JbpmActionListener;
+import org.jbpm.jsf.JbpmJsfContext;
+import org.jbpm.taskmgmt.exe.TaskInstance;
+import org.jbpm.graph.exe.Token;
+import org.jbpm.graph.exe.ProcessInstance;
+
+import javax.el.ValueExpression;
+import javax.el.ELContext;
+import javax.faces.event.ActionEvent;
+import javax.faces.context.FacesContext;
+
+/**
+ *
+ */
+public final class ResumeActionListener implements JbpmActionListener {
+
+ private final ValueExpression valueExpression;
+
+ public ResumeActionListener(final ValueExpression valueExpression) {
+ this.valueExpression = valueExpression;
+ }
+
+ public String getName() {
+ return "resume";
+ }
+
+ public void handleAction(JbpmJsfContext context, ActionEvent event) {
+ try {
+ final FacesContext facesContext = FacesContext.getCurrentInstance();
+ final ELContext elContext = facesContext.getELContext();
+ final Object value = valueExpression.getValue(elContext);
+ if (value == null) {
+ context.setError("Resume failed", "The value is
null");
+ return;
+ }
+ if (value instanceof TaskInstance) {
+ ((TaskInstance)value).resume();
+ context.addSuccessMessage("Task instance resumed");
+ } else if (value instanceof Token) {
+ ((Token)value).resume();
+ context.addSuccessMessage("Token resumed");
+ } else if (value instanceof ProcessInstance) {
+ ((ProcessInstance)value).resume();
+ context.addSuccessMessage("Process instance resumed");
+ } else {
+ context.setError("Resume failed", "The value type is not
recognized");
+ return;
+ }
+ context.getJbpmContext().getSession().flush();
+ context.selectOutcome("success");
+ } catch (Exception ex) {
+ context.setError("Resume failed", ex);
+ return;
+ }
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/SignalActionListener.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/SignalActionListener.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/SignalActionListener.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,68 @@
+package org.jbpm.jsf.core.action;
+
+import org.jbpm.graph.def.Transition;
+import org.jbpm.graph.exe.Token;
+import org.jbpm.graph.exe.ProcessInstance;
+import org.jbpm.jsf.JbpmActionListener;
+import org.jbpm.jsf.JbpmJsfContext;
+
+import javax.el.ELContext;
+import javax.el.ValueExpression;
+import javax.faces.context.FacesContext;
+import javax.faces.event.ActionEvent;
+
+/**
+ *
+ */
+public final class SignalActionListener implements JbpmActionListener {
+
+ private final ValueExpression valueExpression;
+ private final ValueExpression transitionExpression;
+
+ public SignalActionListener(final ValueExpression valueExpression, final
ValueExpression transitionExpression) {
+ this.valueExpression = valueExpression;
+ this.transitionExpression = transitionExpression;
+ }
+
+ public String getName() {
+ return "signal";
+ }
+
+ public void handleAction(JbpmJsfContext context, ActionEvent event) {
+ try {
+ final FacesContext facesContext = FacesContext.getCurrentInstance();
+ final ELContext elContext = facesContext.getELContext();
+ final Object value = valueExpression.getValue(elContext);
+ final Token token;
+ if (value == null) {
+ context.setError("Signal failed", "The value is
null");
+ return;
+ }
+ if (value instanceof Token) {
+ token = (Token) value;
+ } else if (value instanceof ProcessInstance) {
+ token = ((ProcessInstance)value).getRootToken();
+ } else {
+ context.setError("Signal failed", "The value type is not
recognized");
+ return;
+ }
+ if (transitionExpression != null) {
+ final Object transitionValue = transitionExpression.getValue(elContext);
+ if (transitionValue == null) {
+ token.signal();
+ } else if (transitionValue instanceof Transition) {
+ token.signal((Transition)transitionValue);
+ } else {
+ token.signal(transitionValue.toString());
+ }
+ } else {
+ token.signal();
+ }
+ context.addSuccessMessage((value instanceof ProcessInstance) ? "Process
instance" : "Token" + " signalled");
+ context.getJbpmContext().getSession().flush();
+ context.selectOutcome("success");
+ } catch (Exception ex) {
+ context.setError("Error signalling token", ex);
+ }
+ }
+}
\ No newline at end of file
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/StartProcessActionListener.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/StartProcessActionListener.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/StartProcessActionListener.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,105 @@
+package org.jbpm.jsf.core.action;
+
+import org.jbpm.graph.def.Node;
+import org.jbpm.graph.def.ProcessDefinition;
+import org.jbpm.graph.def.Transition;
+import org.jbpm.graph.exe.ProcessInstance;
+import org.jbpm.graph.exe.Token;
+import org.jbpm.jsf.JbpmActionListener;
+import org.jbpm.jsf.JbpmJsfContext;
+import org.jbpm.taskmgmt.exe.TaskInstance;
+import org.jbpm.taskmgmt.exe.TaskMgmtInstance;
+
+import javax.el.ELContext;
+import javax.el.ELException;
+import javax.el.ValueExpression;
+import javax.faces.context.FacesContext;
+import javax.faces.event.ActionEvent;
+
+/**
+ *
+ */
+public final class StartProcessActionListener implements JbpmActionListener {
+
+ private final ValueExpression processExpression;
+ private final ValueExpression instanceExpression;
+
+
+ public StartProcessActionListener(final ValueExpression processExpression, final
ValueExpression instanceExpression) {
+ this.processExpression = processExpression;
+ this.instanceExpression = instanceExpression;
+ }
+
+ public String getName() {
+ return "startProcess";
+ }
+
+ public void handleAction(JbpmJsfContext context, ActionEvent event) {
+ try {
+ final FacesContext facesContext = FacesContext.getCurrentInstance();
+ final ELContext elContext = facesContext.getELContext();
+ final Object processValue = processExpression.getValue(elContext);
+ if (processValue == null) {
+ context.setError("Error starting process", "The process
value is null");
+ return;
+ }
+ if (!(processValue instanceof ProcessDefinition)) {
+ context.setError("Error starting process", "Attempted to
start something other than a process");
+ return;
+ }
+ final ProcessDefinition definition = (ProcessDefinition) processValue;
+ final ProcessInstance instance = definition.createProcessInstance();
+ // Signal the root token based on the following criteria:
+ // 1. If there is no start task, and
+ // 2. If the root token is still at the start state, and
+ // 3. If the start state has a default leaving transition, then
+ // signal the token along the default transition.
+ context.addSuccessMessage("Started process");
+
+ final TaskMgmtInstance taskMgmtInstance = instance.getTaskMgmtInstance();
+ final TaskInstance startTaskInstance =
taskMgmtInstance.createStartTaskInstance();
+
+ /* next piece causes NPE.
+ * and i don't think it is needed to signal a new process automatically.
that can
+ * be done in the console itself as well.
+ * TODO it would be nice if the console automatically navigated to the screen
where
+ * you can see the root token and actually give the signal
+
+ if (startTaskInstance == null) {
+ // There is no start task
+ final Node initialNode = definition.getStartState();
+ final Token rootToken = instance.getRootToken();
+ final Node rootTokenNode = rootToken.getNode();
+ if (initialNode.getId() == rootTokenNode.getId()) {
+ // The root token is still at the start node
+ final Transition defaultLeavingTransition =
initialNode.getDefaultLeavingTransition();
+ if (defaultLeavingTransition != null) {
+ // There's a default transition
+ rootToken.signal(defaultLeavingTransition);
+ context.addSuccessMessage("Signalled root token");
+ }
+ }
+ }
+ */
+
+ context.selectOutcome("started");
+ if (instance.hasEnded()) {
+ context.selectOutcome("finished");
+ context.addSuccessMessage("Process completed");
+ }
+ if (instanceExpression != null) {
+ try {
+ instanceExpression.setValue(elContext, instance);
+ } catch (ELException ex) {
+ context.setError("Error setting value of " +
instanceExpression.getExpressionString(), ex);
+ return;
+ }
+ }
+ // Nothing else saves the process, so we must
+ context.getJbpmContext().save(instance);
+ } catch (Exception ex) {
+ context.setError("Error starting process", ex);
+ return;
+ }
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/StartTaskActionListener.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/StartTaskActionListener.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/StartTaskActionListener.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,79 @@
+package org.jbpm.jsf.core.action;
+
+import org.jbpm.jsf.JbpmActionListener;
+import org.jbpm.jsf.JbpmJsfContext;
+import org.jbpm.taskmgmt.exe.TaskInstance;
+
+import javax.el.ELContext;
+import javax.el.ValueExpression;
+import javax.faces.context.FacesContext;
+import javax.faces.event.ActionEvent;
+
+/**
+ *
+ */
+public final class StartTaskActionListener implements JbpmActionListener {
+
+ private final ValueExpression taskInstanceExpression;
+ private final ValueExpression actorIdExpression;
+ private final ValueExpression overwriteSwimlaneExpression;
+
+ public StartTaskActionListener(final ValueExpression taskInstanceExpression, final
ValueExpression actorIdExpression, final ValueExpression overwriteSwimlaneExpression) {
+ this.taskInstanceExpression = taskInstanceExpression;
+ this.actorIdExpression = actorIdExpression;
+ this.overwriteSwimlaneExpression = overwriteSwimlaneExpression;
+ }
+
+ public String getName() {
+ return "startTask";
+ }
+
+ public void handleAction(JbpmJsfContext context, ActionEvent event) {
+ try {
+ final FacesContext facesContext = FacesContext.getCurrentInstance();
+ final ELContext elContext = facesContext.getELContext();
+ final Object taskInstanceValue = taskInstanceExpression.getValue(elContext);
+ if (taskInstanceValue == null) {
+ context.setError("Error starting task", "The task instance
value is null");
+ return;
+ }
+ if (!(taskInstanceValue instanceof TaskInstance)) {
+ context.setError("Error starting task", "Attempted to
start something other than a task instance");
+ return;
+ }
+ final TaskInstance taskInstance = (TaskInstance) taskInstanceValue;
+ if (actorIdExpression != null) {
+ final Object actorIdValue = actorIdExpression.getValue(elContext);
+ if (actorIdValue == null) {
+ context.setError("Error starting task", "Actor ID
expression resolved to null");
+ return;
+ }
+ final String actorId = actorIdValue.toString();
+ if (overwriteSwimlaneExpression != null) {
+ final Object overwriteSwimlaneValue =
overwriteSwimlaneExpression.getValue(elContext);
+ if (overwriteSwimlaneValue == null) {
+ context.setError("Error starting task", "Overwrite
swimlane expression resolved to null");
+ return;
+ }
+ final Boolean overwriteSwimlane;
+ if (overwriteSwimlaneValue instanceof Boolean) {
+ overwriteSwimlane = (Boolean) overwriteSwimlaneValue;
+ } else {
+ overwriteSwimlane =
Boolean.valueOf(overwriteSwimlaneValue.toString());
+ }
+ taskInstance.start(actorId, overwriteSwimlane.booleanValue());
+ } else {
+ taskInstance.start(actorId);
+ }
+ } else {
+ taskInstance.start();
+ }
+ context.addSuccessMessage("Task started");
+ context.getJbpmContext().getSession().flush();
+ context.selectOutcome("success");
+ } catch (Exception ex) {
+ context.setError("Error starting task", ex);
+ return;
+ }
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/SuspendActionListener.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/SuspendActionListener.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/SuspendActionListener.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,58 @@
+package org.jbpm.jsf.core.action;
+
+import org.jbpm.jsf.JbpmActionListener;
+import org.jbpm.jsf.JbpmJsfContext;
+import org.jbpm.taskmgmt.exe.TaskInstance;
+import org.jbpm.graph.exe.Token;
+import org.jbpm.graph.exe.ProcessInstance;
+
+import javax.el.ValueExpression;
+import javax.el.ELContext;
+import javax.faces.event.ActionEvent;
+import javax.faces.context.FacesContext;
+
+/**
+ *
+ */
+public final class SuspendActionListener implements JbpmActionListener {
+
+ private final ValueExpression valueExpression;
+
+ public SuspendActionListener(final ValueExpression valueExpression) {
+ this.valueExpression = valueExpression;
+ }
+
+ public String getName() {
+ return "suspend";
+ }
+
+ public void handleAction(JbpmJsfContext context, ActionEvent event) {
+ try {
+ final FacesContext facesContext = FacesContext.getCurrentInstance();
+ final ELContext elContext = facesContext.getELContext();
+ final Object value = valueExpression.getValue(elContext);
+ if (value == null) {
+ context.setError("Suspend failed", "The value is
null");
+ return;
+ }
+ if (value instanceof TaskInstance) {
+ ((TaskInstance)value).suspend();
+ context.addSuccessMessage("Task instance suspended");
+ } else if (value instanceof Token) {
+ ((Token)value).suspend();
+ context.addSuccessMessage("Token suspended");
+ } else if (value instanceof ProcessInstance) {
+ ((ProcessInstance)value).suspend();
+ context.addSuccessMessage("Process instance suspended");
+ } else {
+ context.setError("Suspend failed", "The value type is not
recognized");
+ return;
+ }
+ context.getJbpmContext().getSession().flush();
+ context.selectOutcome("success");
+ } catch (Exception ex) {
+ context.setError("Suspend failed", ex);
+ return;
+ }
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/TaskFormButtonActionListener.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/TaskFormButtonActionListener.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/TaskFormButtonActionListener.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,66 @@
+package org.jbpm.jsf.core.action;
+
+import org.jbpm.jsf.JbpmActionListener;
+import org.jbpm.jsf.JbpmJsfContext;
+import org.jbpm.jsf.taskform.ui.UITaskFormCancelButton;
+import org.jbpm.jsf.taskform.ui.UITaskFormSaveButton;
+import org.jbpm.jsf.taskform.ui.UITaskFormTransitionButton;
+
+import javax.faces.event.ActionEvent;
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.el.ValueExpression;
+import javax.el.ELContext;
+
+import java.util.logging.Logger;
+import java.util.logging.Level;
+
+/**
+ *
+ */
+public final class TaskFormButtonActionListener implements JbpmActionListener {
+ private final ValueExpression transitionTargetValueExpression;
+ private final ValueExpression buttonTargetValueExpression;
+
+ public TaskFormButtonActionListener(final ValueExpression
transitionTargetValueExpression, final ValueExpression buttonTargetValueExpression) {
+ this.transitionTargetValueExpression = transitionTargetValueExpression;
+ this.buttonTargetValueExpression = buttonTargetValueExpression;
+ }
+
+ public String getName() {
+ return "taskFormButton";
+ }
+
+ public void handleAction(JbpmJsfContext context, ActionEvent event) {
+ final UIComponent source = event.getComponent();
+ final ELContext elContext = FacesContext.getCurrentInstance().getELContext();
+ if (source instanceof UITaskFormCancelButton) {
+ context.selectOutcome("cancel");
+ if (buttonTargetValueExpression != null) {
+ buttonTargetValueExpression.setValue(elContext, "cancel");
+ }
+ log.fine("Cancel button selected");
+ } else if (source instanceof UITaskFormSaveButton) {
+ context.selectOutcome("save");
+ if (buttonTargetValueExpression != null) {
+ buttonTargetValueExpression.setValue(elContext, "save");
+ }
+ log.fine("Save button selected");
+ } else if (source instanceof UITaskFormTransitionButton) {
+ if (transitionTargetValueExpression != null) {
+ final String transitionName = ((UITaskFormTransitionButton)
source).getTransition();
+ transitionTargetValueExpression.setValue(elContext, transitionName);
+ if (log.isLoggable(Level.FINE)) {
+ log.fine("Updating transition expression '" +
transitionTargetValueExpression.getExpressionString() + "' with transition value
'" + transitionName + "'");
+ }
+ }
+ if (buttonTargetValueExpression != null) {
+ buttonTargetValueExpression.setValue(elContext, "transition");
+ }
+ log.fine("Transition button selected");
+ context.selectOutcome("transition");
+ }
+ }
+
+ private static final Logger log =
Logger.getLogger("org.jbpm.jsf.core.action.TaskFormButtonActionListener");
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/UpdateTaskStartActionListener.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/UpdateTaskStartActionListener.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/UpdateTaskStartActionListener.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,70 @@
+package org.jbpm.jsf.core.action;
+
+import org.jbpm.jsf.JbpmActionListener;
+import org.jbpm.jsf.JbpmJsfContext;
+import org.jbpm.taskmgmt.exe.TaskInstance;
+
+import javax.el.ValueExpression;
+import javax.el.ELContext;
+import javax.faces.event.ActionEvent;
+import javax.faces.context.FacesContext;
+
+import java.util.Date;
+
+/**
+ *
+ */
+public final class UpdateTaskStartActionListener implements JbpmActionListener {
+ private final ValueExpression taskExpression;
+ private final ValueExpression startDateExpression;
+
+
+ public UpdateTaskStartActionListener(final ValueExpression startDateExpression, final
ValueExpression taskExpression) {
+ this.startDateExpression = startDateExpression;
+ this.taskExpression = taskExpression;
+ }
+
+ public String getName() {
+ return "updateTaskStart";
+ }
+
+ public void handleAction(JbpmJsfContext context, ActionEvent event) {
+ try {
+ final FacesContext facesContext = FacesContext.getCurrentInstance();
+ final ELContext elContext = facesContext.getELContext();
+ final Object taskInstanceValue = taskExpression.getValue(elContext);
+ if (taskInstanceValue == null) {
+ context.setError("Error updating task", "The task instance
value is null");
+ return;
+ }
+ if (!(taskInstanceValue instanceof TaskInstance)) {
+ context.setError("Error updating task", "Attempted to
resume something other than a task instance");
+ return;
+ }
+ final TaskInstance taskInstance = (TaskInstance) taskInstanceValue;
+ final Date start;
+ if (startDateExpression != null) {
+ final Object startDateValue = startDateExpression.getValue(elContext);
+ if (startDateValue == null) {
+ context.setError("Error updating task", "Start date
value is null");
+ return;
+ }
+ if (startDateValue instanceof Date) {
+ start = (Date) startDateValue;
+ } else if (startDateValue instanceof Long) {
+ start = new Date(((Long)startDateValue).longValue());
+ } else {
+ context.setError("Error updating task", "Start date
value is not a recognized type");
+ return;
+ }
+ } else {
+ start = new Date();
+ }
+ taskInstance.setStart(start);
+ context.getJbpmContext().getSession().flush();
+ } catch (Exception ex) {
+ context.setError("Error updating task", ex);
+ return;
+ }
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/UpdateVariableActionListener.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/UpdateVariableActionListener.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/action/UpdateVariableActionListener.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,77 @@
+package org.jbpm.jsf.core.action;
+
+import org.jbpm.jsf.JbpmActionListener;
+import org.jbpm.jsf.JbpmJsfContext;
+import org.jbpm.taskmgmt.exe.TaskInstance;
+import org.jbpm.graph.exe.Token;
+import org.jbpm.graph.exe.ProcessInstance;
+import org.jbpm.context.exe.ContextInstance;
+
+import javax.el.ELContext;
+import javax.el.ValueExpression;
+import javax.faces.context.FacesContext;
+import javax.faces.event.ActionEvent;
+
+/**
+ *
+ */
+public final class UpdateVariableActionListener implements JbpmActionListener {
+ private final ValueExpression nameExpression;
+ private final ValueExpression valueExpression;
+ private final ValueExpression oldValueTargetExpression;
+ private final ValueExpression entityExpression;
+
+ public UpdateVariableActionListener(final ValueExpression nameExpression, final
ValueExpression valueExpression, final ValueExpression oldValueTargetExpression, final
ValueExpression entityExpression) {
+ this.nameExpression = nameExpression;
+ this.valueExpression = valueExpression;
+ this.oldValueTargetExpression = oldValueTargetExpression;
+ this.entityExpression = entityExpression;
+ }
+
+ public String getName() {
+ return "updateVariable";
+ }
+
+ public void handleAction(JbpmJsfContext context, ActionEvent event) {
+ try {
+ final FacesContext facesContext = FacesContext.getCurrentInstance();
+ final ELContext elContext = facesContext.getELContext();
+ final Object nameValue = nameExpression.getValue(elContext);
+ if (nameValue == null) {
+ context.setError("Error updating variable", "The value of
the 'name' attribute is null");
+ return;
+ }
+ final String name = nameValue.toString();
+ final Object value = valueExpression.getValue(elContext);
+ final Object entity = entityExpression.getValue(elContext);
+ final Object oldValue;
+ if (entity instanceof TaskInstance) {
+ final TaskInstance task = (TaskInstance) entity;
+ oldValue = task.getVariable(name);
+ task.setVariable(name, value);
+ } else if (entity instanceof Token) {
+ final Token token = (Token) entity;
+ final ContextInstance contextInstance =
token.getProcessInstance().getContextInstance();
+ oldValue = contextInstance.getVariable(name, token);
+ contextInstance.setVariable(name, value, token);
+ } else if (entity instanceof ProcessInstance) {
+ final ProcessInstance processInstance = (ProcessInstance) entity;
+ final ContextInstance contextInstance =
processInstance.getContextInstance();
+ oldValue = contextInstance.getVariable(name);
+ contextInstance.setVariable(name, value);
+ } else {
+ context.setError("Error updating variable", "The value
given for the 'entity' attribute is not a task, token, or process
instance");
+ return;
+ }
+ if (oldValueTargetExpression != null) {
+ oldValueTargetExpression.setValue(elContext, oldValue);
+ }
+ context.addSuccessMessage("Variable updated");
+ context.getJbpmContext().getSession().flush();
+ context.selectOutcome("success");
+ } catch (Exception ex) {
+ context.setError("Error updating variable", ex);
+ return;
+ }
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/config/Configuration.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/config/Configuration.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/config/Configuration.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,51 @@
+package org.jbpm.jsf.core.config;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.regex.Pattern;
+
+/**
+ *
+ */
+public final class Configuration {
+ private final List<FileMatcher> matchers;
+ private final boolean useJsfActorId;
+
+ public Configuration(final List<FileMatcher> matchers, final boolean
useJsfActorId) {
+ this.matchers = Collections.unmodifiableList(new
ArrayList<FileMatcher>(matchers));
+ this.useJsfActorId = useJsfActorId;
+ }
+
+ public List<FileMatcher> getMatchers() {
+ return matchers;
+ }
+
+ public boolean useJsfActorId() {
+ return useJsfActorId;
+ }
+
+ public static final class FileMatcher {
+ private final Pattern pattern;
+ private final String contentType;
+ private final String file;
+
+ public FileMatcher(final Pattern pattern, final String contentType, final String
file) {
+ this.pattern = pattern;
+ this.contentType = contentType;
+ this.file = file;
+ }
+
+ public String getContentType() {
+ return contentType;
+ }
+
+ public String getFile() {
+ return file;
+ }
+
+ public Pattern getPattern() {
+ return pattern;
+ }
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/config/ConfigurationLocator.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/config/ConfigurationLocator.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/config/ConfigurationLocator.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,284 @@
+package org.jbpm.jsf.core.config;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.NoSuchElementException;
+import java.util.regex.Pattern;
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+
+import javax.faces.FacesException;
+import javax.faces.context.ExternalContext;
+import javax.faces.context.FacesContext;
+import javax.servlet.ServletContext;
+
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+/**
+ *
+ */
+public final class ConfigurationLocator {
+ private final List<Configuration.FileMatcher> matchers = arrayList();
+ private boolean useJsfActorId;
+
+ private static <T> List<T> arrayList() {
+ return new ArrayList<T>();
+ }
+
+ private ConfigurationLocator() {
+ }
+
+ private static Configuration configuration = null;
+
+ public static Configuration getInstance() {
+ synchronized (ConfigurationLocator.class) {
+ if (configuration == null) {
+ final ConfigurationLocator configurationLocator = new
ConfigurationLocator();
+ configurationLocator.configure();
+ configuration = new Configuration(configurationLocator.matchers,
configurationLocator.useJsfActorId);
+ }
+ return configuration;
+ }
+ }
+
+ private void configure() throws FacesException {
+ searchJars();
+ searchWar();
+ }
+
+ private static enum Elem {
+ JBPM4JSF_CONFIG("jbpm4jsf-config"),
+ AUTHENTICATION_SERVICE("authentication-service"),
+ USE_JSF_ACTOR("use-jsf-actor"),
+ PROCESS_FILE_MATCHER("process-file-matcher"),
+ PATTERN("pattern"),
+ FILE_NAME("file-name"),
+ CONTENT_TYPE("content-type");
+
+ private final String elemName;
+
+ Elem(final String elemName) {
+ this.elemName = elemName;
+ }
+
+ private String getName() {
+ return elemName;
+ }
+ }
+
+ static {
+ final Map<String, Elem> map = new HashMap<String, Elem>();
+ for (Elem e : Elem.values()) {
+ map.put(e.getName(), e);
+ }
+ elements = Collections.unmodifiableMap(map);
+ }
+
+ private static final Map<String, Elem> elements;
+
+ private Elem lookup(Element element) {
+ final Elem elem = elements.get(element.getLocalName());
+ if (elem == null) {
+ throw unexpectedElement(element);
+ }
+ return elem;
+ }
+
+ private Iterable<Element> childrenOf(Element element) {
+ return new ElementIterable(element);
+ }
+
+ private static final class ElementIterable implements Iterable<Element> {
+ private final Element element;
+
+ private ElementIterable(final Element element) {
+ this.element = element;
+ }
+
+ public Iterator<Element> iterator() {
+ return new ElementIterator(element);
+ }
+ }
+
+ private static final class ElementIterator implements Iterator<Element> {
+
+ private Element next;
+ private Node position;
+
+ public ElementIterator(final Element element) {
+ next = null;
+ position = element.getFirstChild();
+ }
+
+ public boolean hasNext() {
+ if (next == null) {
+ spinToNext();
+ }
+ return next != null;
+ }
+
+ private void spinToNext() {
+ if (next == null) {
+ while (position != null) {
+ try {
+ if (position instanceof Element) {
+ next = (Element) position;
+ return;
+ }
+ } finally {
+ position = position.getNextSibling();
+ }
+ }
+ }
+ }
+
+ public Element next() {
+ if (next == null) {
+ throw new NoSuchElementException("next() past end");
+ }
+ try {
+ return next;
+ } finally {
+ next = null;
+ spinToNext();
+ }
+ }
+
+ public void remove() {
+ throw new UnsupportedOperationException("remove() not allowed");
+ }
+ }
+
+ private RuntimeException unexpectedElement(final Element element) {
+ return new IllegalStateException("Unexpected element \"" +
element.getLocalName() + "\"");
+ }
+
+ private RuntimeException missingContent(final String elementName) {
+ return new IllegalArgumentException("Missing required data for element
\"" + elementName + "\"");
+ }
+
+ private void handleAuthenticationService(final Element parent) {
+ for (Element element : childrenOf(parent)) {
+ switch (lookup(element)) {
+ case USE_JSF_ACTOR: useJsfActorId =
Boolean.valueOf(element.getTextContent()); break;
+ default: throw unexpectedElement(element);
+ }
+ }
+ }
+
+ private void handleProcessFileMatcher(final Element parent) {
+ String patternText = null;
+ String contentType = null;
+ String fileName = null;
+ for (Element element : childrenOf(parent)) {
+ switch (lookup(element)) {
+ case PATTERN: patternText = element.getTextContent().trim(); break;
+ case CONTENT_TYPE: contentType = element.getTextContent().trim(); break;
+ case FILE_NAME: fileName = element.getTextContent().trim(); break;
+ default: throw unexpectedElement(element);
+ }
+ }
+ if (patternText == null || patternText.length() == 0) {
+ throw missingContent("pattern");
+ }
+ if (contentType == null || contentType.length() == 0) {
+ throw missingContent("content-type");
+ }
+ if (fileName == null || fileName.length() == 0) {
+ throw missingContent("file-name");
+ }
+ matchers.add(new Configuration.FileMatcher(Pattern.compile(patternText),
contentType, fileName));
+ }
+
+ private void handleConfiguration(URL resource) {
+ final InputStream inputStream;
+ try {
+ inputStream = resource.openStream();
+ } catch (IOException e) {
+ FacesException ex = new FacesException("Failed to parse jbpm4jsf
configuration file: " + e.getMessage());
+ ex.setStackTrace(e.getStackTrace());
+ throw ex;
+ }
+ try {
+ DocumentBuilderFactory documentBuilderFactory =
DocumentBuilderFactory.newInstance();
+ documentBuilderFactory.setValidating(false);
+ documentBuilderFactory.setNamespaceAware(true);
+ final DocumentBuilder builder = documentBuilderFactory.newDocumentBuilder();
+ final Document document = builder.parse(inputStream);
+ final Element docElement = document.getDocumentElement();
+ switch (lookup(docElement)) {
+ case JBPM4JSF_CONFIG: break;
+ default: throw unexpectedElement(docElement);
+ }
+ for (Element element : childrenOf(docElement)) {
+ switch (lookup(element)) {
+ case AUTHENTICATION_SERVICE: handleAuthenticationService(element);
break;
+ case PROCESS_FILE_MATCHER: handleProcessFileMatcher(element); break;
+ default: throw unexpectedElement(element);
+ }
+ }
+ } catch (Exception e) {
+ FacesException ex = new FacesException("Failed to parse jbpm4jsf
configuration file: " + e.getMessage());
+ ex.setStackTrace(e.getStackTrace());
+ throw ex;
+ } finally {
+ try {
+ inputStream.close();
+ } catch (IOException e) {
+ log.log(Level.WARNING, "Failed to close URL input stream: " +
e.getMessage());
+ }
+ }
+ }
+
+ private void searchJars() {
+ // TODO: alphabetize by jar name
+ final String path = "META-INF/jbpm4jsf-config.xml";
+ ClassLoader loader = Thread.currentThread().getContextClassLoader();
+ if (loader == null) {
+ loader = ConfigurationLocator.class.getClassLoader();
+ }
+ final Enumeration<URL> resources;
+ try {
+ resources = loader.getResources(path);
+ } catch (IOException e) {
+ final FacesException ex = new FacesException("Failed to read
configuration resource: " + e.getMessage(), e.getCause());
+ ex.setStackTrace(e.getStackTrace());
+ throw ex;
+ }
+ while (resources.hasMoreElements()) {
+ final URL resource = resources.nextElement();
+ handleConfiguration(resource);
+ }
+ }
+
+ private void searchWar() {
+ final String path = "/WEB-INF/jbpm4jsf-config.xml";
+ final FacesContext facesContext = FacesContext.getCurrentInstance();
+ final ExternalContext externalContext = facesContext.getExternalContext();
+ final ServletContext servletContext = (ServletContext)
externalContext.getContext();
+ try {
+ final URL resource = servletContext.getResource(path);
+ handleConfiguration(resource);
+ } catch (MalformedURLException e) {
+ final FacesException ex = new FacesException("Failed to read
configuration resource: " + e.getMessage(), e.getCause());
+ ex.setStackTrace(e.getStackTrace());
+ throw ex;
+ }
+ }
+
+ private static final Logger log =
Logger.getLogger("org.jbpm.jsf.core.config.ConfigLocator");
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/AbstractHandler.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/AbstractHandler.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/AbstractHandler.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,80 @@
+package org.jbpm.jsf.core.handler;
+
+import java.io.IOException;
+import org.jbpm.jsf.JbpmActionListener;
+import org.jbpm.jsf.core.impl.JbpmActionListenerWrapper;
+import org.jboss.gravel.common.annotation.TldAttributes;
+import org.jboss.gravel.common.annotation.TldAttribute;
+
+import com.sun.facelets.FaceletContext;
+import com.sun.facelets.tag.TagAttribute;
+import com.sun.facelets.tag.TagConfig;
+import com.sun.facelets.tag.TagException;
+import com.sun.facelets.tag.TagHandler;
+import com.sun.facelets.tag.jsf.ComponentSupport;
+
+import javax.el.ELException;
+import javax.el.ValueExpression;
+import javax.faces.FacesException;
+import javax.faces.component.ActionSource;
+import javax.faces.component.UIComponent;
+
+/**
+ *
+ */
+@TldAttributes ({
+ @TldAttribute (
+ name = "unless",
+ description = "A boolean expression that, if true, will prevent this action
from being run.",
+ deferredType = boolean.class
+ ),
+ @TldAttribute (
+ name = "navigate",
+ description = "A boolean expression that can be used to control whether
navigation will be attempted after this " +
+ "action completes.",
+ deferredType = boolean.class
+ ),
+ @TldAttribute (
+ name = "name",
+ description = "A different name to use for this action. Action names are
used by some navigation handlers."
+ )
+})
+public abstract class AbstractHandler extends TagHandler {
+ public static final String JBPM_JSF_CONTEXT_KEY = "org.jbpm.jsf.CONTEXT";
+
+ private final TagConfig config;
+
+ private final TagAttribute unlessAttribute;
+ private final TagAttribute navigateAttribute;
+ private final TagAttribute nameAttribute;
+
+ public AbstractHandler(final TagConfig config) {
+ super(config);
+ this.config = config;
+ unlessAttribute = getAttribute("unless");
+ navigateAttribute = getAttribute("navigate");
+ nameAttribute = getAttribute("name");
+ }
+
+ public void apply(FaceletContext ctx, UIComponent parent) throws IOException,
FacesException, ELException {
+ if (! (parent instanceof ActionSource)) {
+ throw new TagException(tag, "Parent component is not an
ActionSource");
+ }
+ if (ComponentSupport.isNew(parent)) {
+ ((ActionSource) parent).addActionListener(
+ new JbpmActionListenerWrapper(
+ getListener(ctx),
+ getValueExpression(unlessAttribute, ctx, Boolean.class),
+ getValueExpression(navigateAttribute, ctx, Boolean.class),
+ getValueExpression(nameAttribute, ctx, String.class)
+ )
+ );
+ }
+ }
+
+ protected ValueExpression getValueExpression(TagAttribute tagAttribute,
FaceletContext context, Class<?> type) {
+ return tagAttribute == null ? null : tagAttribute.getValueExpression(context,
type);
+ }
+
+ protected abstract JbpmActionListener getListener(final FaceletContext ctx);
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/AddCommentHandler.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/AddCommentHandler.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/AddCommentHandler.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,46 @@
+package org.jbpm.jsf.core.handler;
+
+import org.jboss.gravel.common.annotation.TldAttribute;
+import org.jboss.gravel.common.annotation.TldTag;
+import org.jbpm.graph.def.GraphElement;
+import org.jbpm.jsf.JbpmActionListener;
+import org.jbpm.jsf.core.action.AddCommentActionListener;
+
+import com.sun.facelets.FaceletContext;
+import com.sun.facelets.tag.TagAttribute;
+import com.sun.facelets.tag.TagConfig;
+
+/**
+ *
+ */
+@TldTag(
+ name ="addComment",
+ description = "Add a comment to a task or token.",
+ attributes = {
+ @TldAttribute (
+ name = "comment",
+ description = "An EL expression that returns the comment text to
add.",
+ deferredType = String.class,
+ required = true
+ ),
+ @TldAttribute (
+ name = "target",
+ description = "An EL expression that returns the node to add a comment
to.",
+ deferredType = GraphElement.class,
+ required = true
+ )
+})
+public final class AddCommentHandler extends AbstractHandler {
+ private final TagAttribute commentAttribute;
+ private final TagAttribute targetAttribute;
+
+ public AddCommentHandler(final TagConfig config) {
+ super(config);
+ commentAttribute = getRequiredAttribute("comment");
+ targetAttribute = getRequiredAttribute("target");
+ }
+
+ protected JbpmActionListener getListener(final FaceletContext ctx) {
+ return new AddCommentActionListener(commentAttribute.getValueExpression(ctx,
String.class), targetAttribute.getValueExpression(ctx, Object.class));
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/ApplyVariableMapHandler.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/ApplyVariableMapHandler.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/ApplyVariableMapHandler.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,50 @@
+package org.jbpm.jsf.core.handler;
+
+import org.jboss.gravel.common.annotation.TldTag;
+import org.jboss.gravel.common.annotation.TldAttribute;
+import org.jbpm.jsf.core.impl.UpdatesHashMap;
+import org.jbpm.jsf.core.action.ApplyVariableMapActionListener;
+import org.jbpm.jsf.JbpmActionListener;
+
+import com.sun.facelets.FaceletContext;
+import com.sun.facelets.tag.TagConfig;
+import com.sun.facelets.tag.TagAttribute;
+
+/**
+ *
+ */
+@TldTag (
+ name = "applyVariableMap",
+ description = "Apply a variable map to a token, task, or process
instance",
+ attributes = {
+ @TldAttribute (
+ name = "variableMap",
+ description = "The variable map to apply.",
+ required = true,
+ deferredType = UpdatesHashMap.class
+ ),
+ @TldAttribute (
+ name = "target",
+ description = "The token, task, or process instance to apply the
variables to.",
+ required = true,
+ deferredType = Object.class
+ )
+ }
+)
+public final class ApplyVariableMapHandler extends AbstractHandler {
+ private final TagAttribute variableMapTagAttribute;
+ private final TagAttribute targetTagAttribute;
+
+ public ApplyVariableMapHandler(final TagConfig config) {
+ super(config);
+ variableMapTagAttribute = getRequiredAttribute("variableMap");
+ targetTagAttribute = getRequiredAttribute("target");
+ }
+
+ protected JbpmActionListener getListener(final FaceletContext ctx) {
+ return new ApplyVariableMapActionListener(
+ getValueExpression(variableMapTagAttribute, ctx, UpdatesHashMap.class),
+ getValueExpression(targetTagAttribute, ctx, Object.class)
+ );
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/AssignTaskHandler.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/AssignTaskHandler.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/AssignTaskHandler.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,59 @@
+package org.jbpm.jsf.core.handler;
+
+import org.jboss.gravel.common.annotation.TldAttribute;
+import org.jboss.gravel.common.annotation.TldTag;
+import org.jbpm.jsf.JbpmActionListener;
+import org.jbpm.jsf.core.action.AssignTaskActionListener;
+import org.jbpm.taskmgmt.exe.TaskInstance;
+
+import com.sun.facelets.FaceletContext;
+import com.sun.facelets.tag.TagAttribute;
+import com.sun.facelets.tag.TagConfig;
+
+/**
+ *
+ */
+@TldTag (
+ name = "assignTask",
+ description = "Assign a task to an actor.",
+ attributes = {
+ @TldAttribute(
+ name = "task",
+ description = "The task instance to assign.",
+ required = true,
+ deferredType = TaskInstance.class
+ ),
+ @TldAttribute(
+ name = "actorId",
+ description = "The actor ID to which the task should be
assigned.",
+ required = true,
+ deferredType = String.class
+ ),
+ @TldAttribute(
+ name = "overwriteSwimlane",
+ description = "A flag that indicates whether the swimlane should be
overwritten.",
+ required = false,
+ deferredType = boolean.class
+ )
+ }
+)
+public final class AssignTaskHandler extends AbstractHandler {
+ private final TagAttribute taskTagAttribute;
+ private final TagAttribute actorIdTagAttribute;
+ private final TagAttribute overwriteSwimlaneTagAttribute;
+
+ public AssignTaskHandler(final TagConfig config) {
+ super(config);
+ taskTagAttribute = getRequiredAttribute("task");
+ actorIdTagAttribute = getRequiredAttribute("actorId");
+ overwriteSwimlaneTagAttribute = getAttribute("overwriteSwimlane");
+ }
+
+ protected JbpmActionListener getListener(final FaceletContext ctx) {
+ return new AssignTaskActionListener(
+ getValueExpression(taskTagAttribute, ctx, TaskInstance.class),
+ getValueExpression(actorIdTagAttribute, ctx, String.class),
+ getValueExpression(overwriteSwimlaneTagAttribute, ctx, Boolean.class)
+ );
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/CancelHandler.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/CancelHandler.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/CancelHandler.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,41 @@
+package org.jbpm.jsf.core.handler;
+
+import org.jboss.gravel.common.annotation.TldTag;
+import org.jboss.gravel.common.annotation.TldAttribute;
+import org.jbpm.taskmgmt.exe.TaskInstance;
+import org.jbpm.jsf.JbpmActionListener;
+import org.jbpm.jsf.core.action.CancelActionListener;
+
+import com.sun.facelets.tag.TagAttribute;
+import com.sun.facelets.tag.TagConfig;
+import com.sun.facelets.FaceletContext;
+
+/**
+ *
+ */
+@TldTag (
+ name = "cancel",
+ description = "Cancel a running task instance, token, or process
instance.",
+ attributes = {
+ @TldAttribute (
+ name = "value",
+ description = "The item to cancel.",
+ required = true,
+ deferredType = Object.class
+ )
+ }
+)
+public final class CancelHandler extends AbstractHandler {
+ private final TagAttribute taskTagAttribute;
+
+ public CancelHandler(final TagConfig config) {
+ super(config);
+ taskTagAttribute = getRequiredAttribute("value");
+ }
+
+ protected JbpmActionListener getListener(final FaceletContext ctx) {
+ return new CancelActionListener(
+ getValueExpression(taskTagAttribute, ctx, Object.class)
+ );
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/CompleteTaskHandler.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/CompleteTaskHandler.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/CompleteTaskHandler.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,49 @@
+package org.jbpm.jsf.core.handler;
+
+import org.jboss.gravel.common.annotation.TldAttribute;
+import org.jboss.gravel.common.annotation.TldTag;
+import org.jbpm.jsf.JbpmActionListener;
+import org.jbpm.jsf.core.action.CompleteTaskActionListener;
+import org.jbpm.taskmgmt.exe.TaskInstance;
+
+import com.sun.facelets.FaceletContext;
+import com.sun.facelets.tag.TagAttribute;
+import com.sun.facelets.tag.TagConfig;
+
+/**
+ *
+ */
+@TldTag (
+ name = "completeTask",
+ description = "Complete a task.",
+ attributes = {
+ @TldAttribute (
+ name = "task",
+ description = "An EL expression that resolves to the task instance to
complete.",
+ required = true,
+ deferredType = TaskInstance.class
+ ),
+ @TldAttribute (
+ name = "transition",
+ description = "An EL expression that resolves to either the name of a
transition, or the transition object to take upon completing this task.",
+ deferredType = Object.class
+ )
+ }
+)
+public final class CompleteTaskHandler extends AbstractHandler {
+ private final TagAttribute instanceTagAttribute;
+ private final TagAttribute transitionTagAttribute;
+
+ public CompleteTaskHandler(final TagConfig config) {
+ super(config);
+ instanceTagAttribute = getRequiredAttribute("task");
+ transitionTagAttribute = getAttribute("transition");
+ }
+
+ protected JbpmActionListener getListener(final FaceletContext ctx) {
+ return new CompleteTaskActionListener(
+ getValueExpression(instanceTagAttribute, ctx, TaskInstance.class),
+ getValueExpression(transitionTagAttribute, ctx, Object.class)
+ );
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/DeleteHandler.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/DeleteHandler.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/DeleteHandler.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,40 @@
+package org.jbpm.jsf.core.handler;
+
+import org.jboss.gravel.common.annotation.TldAttribute;
+import org.jboss.gravel.common.annotation.TldTag;
+import org.jbpm.jsf.JbpmActionListener;
+import org.jbpm.jsf.core.action.DeleteActionListener;
+
+import com.sun.facelets.FaceletContext;
+import com.sun.facelets.tag.TagAttribute;
+import com.sun.facelets.tag.TagConfig;
+
+/**
+ *
+ */
+@TldTag (
+ name = "delete",
+ description = "Delete a process, process instance, or job.",
+ attributes = {
+ @TldAttribute (
+ name = "value",
+ description = "The item to delete.",
+ required = true,
+ deferredType = Object.class
+ )
+ }
+)
+public final class DeleteHandler extends AbstractHandler {
+ private final TagAttribute processTagAttribute;
+
+ public DeleteHandler(final TagConfig config) {
+ super(config);
+ processTagAttribute = getRequiredAttribute("value");
+ }
+
+ protected JbpmActionListener getListener(final FaceletContext ctx) {
+ return new DeleteActionListener(
+ getValueExpression(processTagAttribute, ctx, Object.class)
+ );
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/DeployProcessHandler.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/DeployProcessHandler.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/DeployProcessHandler.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,50 @@
+package org.jbpm.jsf.core.handler;
+
+import org.jboss.gravel.common.annotation.TldAttribute;
+import org.jboss.gravel.common.annotation.TldTag;
+import org.jbpm.graph.def.ProcessDefinition;
+import org.jbpm.jsf.JbpmActionListener;
+import org.jbpm.jsf.core.action.DeployProcessActionListener;
+
+import com.sun.facelets.FaceletContext;
+import com.sun.facelets.tag.TagAttribute;
+import com.sun.facelets.tag.TagConfig;
+
+/**
+ *
+ */
+@TldTag (
+ name = "deployProcess",
+ description = "Deploy a new process archive.",
+ attributes = {
+ @TldAttribute(
+ name = "archive",
+ description = "The source of the archive, as an input stream or a byte
array.",
+ required = true,
+ deferredType = Object.class
+ ),
+ @TldAttribute(
+ name = "target",
+ description = "An EL expression into which the new process definition
will be inserted.",
+ deferredType = ProcessDefinition.class
+ )
+ }
+)
+public final class DeployProcessHandler extends AbstractHandler {
+ private final TagAttribute archiveTagAttribute;
+ private final TagAttribute targetTagAttribute;
+
+ public DeployProcessHandler(final TagConfig config) {
+ super(config);
+ archiveTagAttribute = getRequiredAttribute("archive");
+ targetTagAttribute = getAttribute("target");
+
+ }
+
+ protected JbpmActionListener getListener(final FaceletContext ctx) {
+ return new DeployProcessActionListener(
+ getValueExpression(archiveTagAttribute, ctx, Object.class),
+ getValueExpression(targetTagAttribute, ctx, ProcessDefinition.class)
+ );
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/GetDiagramInfoHandler.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/GetDiagramInfoHandler.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/GetDiagramInfoHandler.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,50 @@
+package org.jbpm.jsf.core.handler;
+
+import org.jboss.gravel.common.annotation.TldAttribute;
+import org.jboss.gravel.common.annotation.TldTag;
+import org.jbpm.graph.def.ProcessDefinition;
+import org.jbpm.jsf.JbpmActionListener;
+import org.jbpm.jsf.core.action.GetDiagramInfoActionListener;
+
+import com.sun.facelets.FaceletContext;
+import com.sun.facelets.tag.TagAttribute;
+import com.sun.facelets.tag.TagConfig;
+
+/**
+ *
+ */
+@TldTag (
+ name = "getDiagramInfo",
+ description = "Read process definition diagram information from the
database.",
+ attributes = {
+ @TldAttribute (
+ name = "process",
+ description = "The the process definition to read diagram information
for.",
+ required = true,
+ deferredType = ProcessDefinition.class
+ ),
+ @TldAttribute (
+ name = "target",
+ description = "An EL expression into which the diagram information
should be stored.",
+ required = true,
+ deferredType = Object.class
+ )
+ }
+)
+public final class GetDiagramInfoHandler extends AbstractHandler {
+ private final TagAttribute processTagAttribute;
+ private final TagAttribute targetTagAttribute;
+
+ public GetDiagramInfoHandler(final TagConfig config) {
+ super(config);
+ processTagAttribute = getRequiredAttribute("process");
+ targetTagAttribute = getRequiredAttribute("target");
+ }
+
+ protected JbpmActionListener getListener(final FaceletContext ctx) {
+ return new GetDiagramInfoActionListener(
+ getValueExpression(processTagAttribute, ctx, ProcessDefinition.class),
+ getValueExpression(targetTagAttribute, ctx, Object.class)
+ );
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/GetProcessLogsHandler.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/GetProcessLogsHandler.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/GetProcessLogsHandler.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,78 @@
+package org.jbpm.jsf.core.handler;
+
+import java.util.List;
+import org.jboss.gravel.common.annotation.TldAttribute;
+import org.jboss.gravel.common.annotation.TldTag;
+import org.jbpm.graph.exe.ProcessInstance;
+import org.jbpm.jsf.JbpmActionListener;
+import org.jbpm.jsf.core.action.GetProcessLogsActionListener;
+
+import com.sun.facelets.FaceletContext;
+import com.sun.facelets.tag.TagAttribute;
+import com.sun.facelets.tag.TagConfig;
+
+/**
+ *
+ */
+@TldTag (
+ name = "getProcessLogs",
+ description = "Get the process logs from a process instance.",
+ attributes = {
+ @TldAttribute (
+ name = "processInstance",
+ description = "The process instance whose process logs are to be
read.",
+ required = true,
+ deferredType = ProcessInstance.class
+ ),
+ @TldAttribute (
+ name = "type",
+ description = "The process log type. This may be a literal Class
object, or the name of a class, "
+ + "or one of the following shortcut names:<ul>"
+ + "<li><code>variable</code></li>"
+ +
"<li><code>variableUpdate</code></li>"
+ +
"<li><code>variableCreate</code></li>"
+ +
"<li><code>variableDelete</code></li>"
+ + "<li><code>action</code></li>"
+ + "<li><code>node</code></li>"
+ +
"<li><code>processInstanceCreate</code></li>"
+ +
"<li><code>processInstanceEnd</code></li>"
+ + "<li><code>processState</code></li>"
+ + "<li><code>signal</code></li>"
+ + "<li><code>tokenCreate</code></li>"
+ + "<li><code>tokenEnd</code></li>"
+ + "<li><code>transition</code></li>"
+ + "<li><code>composite</code></li>"
+ + "<li><code>message</code></li>"
+ + "<li><code>swimlane</code></li>"
+ +
"<li><code>swimlaneAssign</code></li>"
+ +
"<li><code>swimlaneCreate</code></li>"
+ + "<li><code>task</code></li>"
+ + "<li><code>taskAssign</code></li>"
+ + "<li><code>taskCreate</code></li>"
+ + "<li><code>taskEnd</code></li>"
+ + "</ul>",
+ deferredType = Object.class
+ )
+ }
+)
+public final class GetProcessLogsHandler extends AbstractHandler {
+
+ private final TagAttribute processInstanceTagAttribute;
+ private final TagAttribute typeTagAttribute;
+ private final TagAttribute targetTagAttribute;
+
+ public GetProcessLogsHandler(final TagConfig config) {
+ super(config);
+ processInstanceTagAttribute = getRequiredAttribute("processInstance");
+ typeTagAttribute = getAttribute("type");
+ targetTagAttribute = getRequiredAttribute("target");
+ }
+
+ protected JbpmActionListener getListener(final FaceletContext ctx) {
+ return new GetProcessLogsActionListener(
+ getValueExpression(processInstanceTagAttribute, ctx, ProcessInstance.class),
+ getValueExpression(typeTagAttribute, ctx, Object.class),
+ getValueExpression(targetTagAttribute, ctx, List.class)
+ );
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/GetTaskFormInfoHandler.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/GetTaskFormInfoHandler.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/GetTaskFormInfoHandler.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,54 @@
+package org.jbpm.jsf.core.handler;
+
+import org.jboss.gravel.common.annotation.TldTag;
+import org.jboss.gravel.common.annotation.TldAttribute;
+import org.jbpm.graph.def.ProcessDefinition;
+import org.jbpm.jsf.JbpmActionListener;
+import org.jbpm.jsf.core.action.GetTaskFormInfoActionListener;
+
+import com.sun.facelets.tag.TagAttribute;
+import com.sun.facelets.tag.TagConfig;
+import com.sun.facelets.FaceletContext;
+
+import java.util.Map;
+
+/**
+ *
+ */
+@TldTag (
+ name = "getTaskFormInfo",
+ description = "Read process definition task form information from the
database.",
+ attributes = {
+ @TldAttribute (
+ name = "process",
+ description = "The the process definition to read task form information
for.",
+ required = true,
+ deferredType = ProcessDefinition.class
+ ),
+ @TldAttribute (
+ name = "target",
+ description = "An EL expression into which the task form information
should be stored. This will be " +
+ "in the form of a map whose keys are task names and whose values are
the name of the task form file, " +
+ "if any.",
+ required = true,
+ deferredType = Map.class
+ )
+ }
+)
+public final class GetTaskFormInfoHandler extends AbstractHandler {
+ private final TagAttribute processTagAttribute;
+ private final TagAttribute targetTagAttribute;
+
+ public GetTaskFormInfoHandler(final TagConfig config) {
+ super(config);
+ processTagAttribute = getRequiredAttribute("process");
+ targetTagAttribute = getRequiredAttribute("target");
+ }
+
+ protected JbpmActionListener getListener(final FaceletContext ctx) {
+ return new GetTaskFormInfoActionListener(
+ getValueExpression(processTagAttribute, ctx, ProcessDefinition.class),
+ getValueExpression(targetTagAttribute, ctx, Object.class)
+ );
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/GetVariableHandler.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/GetVariableHandler.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/GetVariableHandler.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,58 @@
+package org.jbpm.jsf.core.handler;
+
+import org.jboss.gravel.common.annotation.TldAttribute;
+import org.jboss.gravel.common.annotation.TldTag;
+import org.jbpm.jsf.JbpmActionListener;
+import org.jbpm.jsf.core.action.GetVariableActionListener;
+import org.jbpm.taskmgmt.exe.TaskInstance;
+
+import com.sun.facelets.FaceletContext;
+import com.sun.facelets.tag.TagAttribute;
+import com.sun.facelets.tag.TagConfig;
+
+/**
+ *
+ */
+@TldTag (
+ name = "getVariable",
+ description = "Get the value of a process variable.",
+ attributes = {
+ @TldAttribute (
+ name = "name",
+ description = "The name of the variable to remove.",
+ required = true
+ ),
+ @TldAttribute (
+ name = "target",
+ description = "An EL expression into which the variable value will be
stored.",
+ deferredType = Object.class,
+ required = true
+ ),
+ @TldAttribute (
+ name = "entity",
+ description = "The token, task, or process instance from which the
variable value should be retrieved.",
+ deferredType = Object.class,
+ required = true
+ )
+ }
+)
+public final class GetVariableHandler extends AbstractHandler {
+ private final TagAttribute nameTagAttribute;
+ private final TagAttribute targetTagAttribute;
+ private final TagAttribute entityTagAttribute;
+
+ public GetVariableHandler(final TagConfig config) {
+ super(config);
+ nameTagAttribute = getRequiredAttribute("name");
+ targetTagAttribute = getRequiredAttribute("target");
+ entityTagAttribute = getRequiredAttribute("entity");
+ }
+
+ protected JbpmActionListener getListener(final FaceletContext ctx) {
+ return new GetVariableActionListener(
+ getValueExpression(nameTagAttribute, ctx, String.class),
+ getValueExpression(targetTagAttribute, ctx, Object.class),
+ getValueExpression(entityTagAttribute, ctx, Object.class)
+ );
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/GetVariableMapHandler.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/GetVariableMapHandler.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/GetVariableMapHandler.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,51 @@
+package org.jbpm.jsf.core.handler;
+
+import org.jboss.gravel.common.annotation.TldTag;
+import org.jboss.gravel.common.annotation.TldAttribute;
+import org.jbpm.jsf.JbpmActionListener;
+import org.jbpm.jsf.core.action.GetVariableMapActionListener;
+
+import com.sun.facelets.tag.TagAttribute;
+import com.sun.facelets.tag.TagConfig;
+import com.sun.facelets.FaceletContext;
+
+import java.util.Map;
+
+/**
+ *
+ */
+@TldTag (
+ name = "getVariableMap",
+ description = "Get the variable map from a token, process instance, or
task.",
+ attributes = {
+ @TldAttribute (
+ name = "target",
+ description = "An EL expression into which the variable map will be
stored.",
+ deferredType = Map.class,
+ required = true
+ ),
+ @TldAttribute (
+ name = "value",
+ description = "The entity from which the variable should be
retrieved.",
+ deferredType = Object.class,
+ required = true
+ )
+ }
+)
+public final class GetVariableMapHandler extends AbstractHandler {
+ private final TagAttribute targetTagAttribute;
+ private final TagAttribute valueTagAttribute;
+
+ public GetVariableMapHandler(final TagConfig config) {
+ super(config);
+ targetTagAttribute = getRequiredAttribute("target");
+ valueTagAttribute = getRequiredAttribute("value");
+ }
+
+ protected JbpmActionListener getListener(final FaceletContext ctx) {
+ return new GetVariableMapActionListener(
+ getValueExpression(valueTagAttribute, ctx, Object.class),
+ getValueExpression(targetTagAttribute, ctx, Map.class)
+ );
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/IncludeProcessFileHandler.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/IncludeProcessFileHandler.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/IncludeProcessFileHandler.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,129 @@
+package org.jbpm.jsf.core.handler;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.FileNotFoundException;
+import java.net.URL;
+import java.net.URLStreamHandler;
+import java.net.URLConnection;
+
+import com.sun.facelets.tag.TagAttribute;
+import com.sun.facelets.tag.TagException;
+import com.sun.facelets.tag.TagHandler;
+import com.sun.facelets.tag.TagConfig;
+import com.sun.facelets.FaceletContext;
+import com.sun.facelets.el.VariableMapperWrapper;
+
+import javax.faces.component.UIComponent;
+import javax.faces.FacesException;
+import javax.el.ELException;
+import javax.el.VariableMapper;
+import javax.el.ValueExpression;
+
+import org.jbpm.graph.def.ProcessDefinition;
+import org.jbpm.file.def.FileDefinition;
+
+import org.jboss.gravel.common.annotation.TldTag;
+import org.jboss.gravel.common.annotation.TldAttribute;
+
+/**
+ *
+ */
+@TldTag (
+ name = "includeProcessFile",
+ description = "Include a process file.",
+ attributes = {
+ @TldAttribute (
+ name = "process",
+ description = "The process definition from which the file should be
read.",
+ required = true,
+ deferredType = ProcessDefinition.class
+ ),
+ @TldAttribute (
+ name = "file",
+ description = "The name of a file within the process to include.",
+ required = true
+ )
+ }
+)
+public final class IncludeProcessFileHandler extends TagHandler {
+ private final TagAttribute processAttribute;
+ private final TagAttribute fileAttribute;
+
+ public IncludeProcessFileHandler(final TagConfig config) {
+ super(config);
+ processAttribute = getRequiredAttribute("process");
+ fileAttribute = getRequiredAttribute("file");
+ }
+
+ public void apply(FaceletContext ctx, UIComponent parent) throws IOException,
FacesException, ELException {
+ // now include the nested form
+ final ValueExpression fileExpression = fileAttribute.getValueExpression(ctx,
String.class);
+ final ValueExpression processExpression =
processAttribute.getValueExpression(ctx, ProcessDefinition.class);
+
+ final String file = (String) fileExpression.getValue(ctx);
+ if (file == null || file.length() == 0) {
+ return;
+ }
+ final ProcessDefinition processDefinition = (ProcessDefinition)
processExpression.getValue(ctx);
+ if (processDefinition == null) {
+ throw new TagException(tag, "Value for process attribute is
null");
+ }
+ final FileDefinition fileDefinition = processDefinition.getFileDefinition();
+ if (fileDefinition == null) {
+ throw new TagException(tag, "Process has a null fileDefinition
property");
+ }
+ if (! fileDefinition.hasFile(file)) {
+ throw new TagException(tag, "Process does not contain file '" +
file + "'");
+ }
+ VariableMapper orig = ctx.getVariableMapper();
+ final VariableMapperWrapper newVarMapper = new VariableMapperWrapper(orig);
+ ctx.setVariableMapper(newVarMapper);
+ try {
+ final StringBuffer buffer = new StringBuffer();
+ buffer.append(processDefinition.getId());
+ buffer.append("/");
+ buffer.append(file);
+ nextHandler.apply(ctx, parent);
+ ctx.includeFacelet(parent, new URL("par", "", 0,
buffer.toString(), new FileDefinitionURLStreamHandler(fileDefinition, file)));
+ } finally {
+ ctx.setVariableMapper(orig);
+ }
+ }
+
+ private static final class FileDefinitionURLStreamHandler extends URLStreamHandler {
+ private final FileDefinition fileDefinition;
+ private final String src;
+
+ public FileDefinitionURLStreamHandler(final FileDefinition fileDefinition, final
String src) {
+ this.fileDefinition = fileDefinition;
+ this.src = src;
+ }
+
+ protected URLConnection openConnection(URL url) {
+ return new IncludeProcessFileHandler.FileDefinitionURLConnection(url,
fileDefinition, src);
+ }
+ }
+
+ private static final class FileDefinitionURLConnection extends URLConnection {
+ private final FileDefinition fileDefinition;
+ private final String src;
+
+ protected FileDefinitionURLConnection(final URL url, final FileDefinition
fileDefinition, final String src) {
+ super(url);
+ this.fileDefinition = fileDefinition;
+ this.src = src;
+ }
+
+ public void connect() {
+ }
+
+ public InputStream getInputStream() throws FileNotFoundException {
+ final InputStream inputStream = fileDefinition.getInputStream(src);
+ if (inputStream == null) {
+ throw new FileNotFoundException("File '" + src +
"' not found in process file definition");
+ }
+ return inputStream;
+ }
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/JbpmActionListenerHandler.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/JbpmActionListenerHandler.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/JbpmActionListenerHandler.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,53 @@
+package org.jbpm.jsf.core.handler;
+
+import org.jboss.gravel.common.annotation.TldAttribute;
+import org.jboss.gravel.common.annotation.TldTag;
+import org.jbpm.jsf.JbpmActionListener;
+import org.jbpm.jsf.core.action.LazyJbpmActionListener;
+
+import com.sun.facelets.FaceletContext;
+import com.sun.facelets.tag.TagAttribute;
+import com.sun.facelets.tag.TagConfig;
+import com.sun.facelets.tag.TagException;
+
+/**
+ *
+ */
+@TldTag (
+ name = "jbpmActionListener",
+ description = "Call a user-defined action, providing the action with a
JbpmJsfContext.",
+ attributes = {
+ @TldAttribute (
+ name = "type",
+ description = "The type of the action. Can be an EL expression which
resolves to a literal Class object, "
+ + "or the name of a class as a String. Either this or the
'listener' attribute must be given.",
+ deferredType = Object.class
+ ),
+ @TldAttribute (
+ name = "listener",
+ description = "An EL expression that resolves to the listener to
execute. Either this or the "
+ + "'type' attribute must be given.",
+ deferredType = JbpmActionListener.class
+ )
+ }
+)
+public final class JbpmActionListenerHandler extends AbstractHandler {
+ private final TagAttribute typeTagAttribute;
+ private final TagAttribute listenerTagAttribute;
+
+ public JbpmActionListenerHandler(final TagConfig config) {
+ super(config);
+ typeTagAttribute = getAttribute("type");
+ listenerTagAttribute = getAttribute("listener");
+ if ((typeTagAttribute == null) == (listenerTagAttribute == null)) {
+ throw new TagException(tag, "Exactly one of the \"type\" or
\"listener\" attributes must be given");
+ }
+ }
+
+ protected JbpmActionListener getListener(final FaceletContext ctx) {
+ return new LazyJbpmActionListener(
+ getValueExpression(typeTagAttribute, ctx, Object.class),
+ getValueExpression(typeTagAttribute, ctx, JbpmActionListener.class)
+ );
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/ListJobsHandler.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/ListJobsHandler.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/ListJobsHandler.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,41 @@
+package org.jbpm.jsf.core.handler;
+
+import java.util.List;
+import org.jboss.gravel.common.annotation.TldAttribute;
+import org.jboss.gravel.common.annotation.TldTag;
+import org.jbpm.jsf.JbpmActionListener;
+import org.jbpm.jsf.core.action.ListJobsActionListener;
+
+import com.sun.facelets.FaceletContext;
+import com.sun.facelets.tag.TagAttribute;
+import com.sun.facelets.tag.TagConfig;
+
+/**
+ *
+ */
+@TldTag (
+ name = "listJobs",
+ description = "List all jobs in the database.",
+ attributes = {
+ @TldAttribute (
+ name = "target",
+ description = "An EL expression into which the list will be
stored.",
+ required = true,
+ deferredType = List.class
+ )
+ }
+)
+public final class ListJobsHandler extends AbstractHandler {
+ private final TagAttribute targetAttribute;
+
+ public ListJobsHandler(final TagConfig config) {
+ super(config);
+ targetAttribute = getRequiredAttribute("target");
+ }
+
+ protected JbpmActionListener getListener(final FaceletContext ctx) {
+ return new ListJobsActionListener(
+ getValueExpression(targetAttribute, ctx, List.class)
+ );
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/ListProcessInstancesHandler.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/ListProcessInstancesHandler.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/ListProcessInstancesHandler.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,51 @@
+package org.jbpm.jsf.core.handler;
+
+import org.jboss.gravel.common.annotation.TldTag;
+import org.jboss.gravel.common.annotation.TldAttribute;
+import org.jbpm.jsf.JbpmActionListener;
+import org.jbpm.jsf.core.action.ListProcessesActionListener;
+import org.jbpm.jsf.core.action.ListProcessInstancesActionListener;
+import java.util.List;
+
+import com.sun.facelets.tag.TagAttribute;
+import com.sun.facelets.tag.TagConfig;
+import com.sun.facelets.FaceletContext;
+
+/**
+ *
+ */
+@TldTag (
+ name = "listProcessInstances",
+ description = "Read a list of process instances from a process
definition.",
+ attributes = {
+ @TldAttribute (
+ name = "target",
+ description = "An EL expression into which the process instance list
should be stored.",
+ required = true,
+ deferredType = List.class
+ ),
+ @TldAttribute (
+ name = "processId",
+ description = "The numeric ID of the process definition whose instances
are to be read.",
+ required = true,
+ deferredType = long.class
+ )
+ }
+)
+public final class ListProcessInstancesHandler extends AbstractHandler {
+ private final TagAttribute targetTagAttribute;
+ private final TagAttribute processIdTagAttribute;
+
+ public ListProcessInstancesHandler(final TagConfig config) {
+ super(config);
+ targetTagAttribute = getRequiredAttribute("target");
+ processIdTagAttribute = getRequiredAttribute("processId");
+ }
+
+ protected JbpmActionListener getListener(final FaceletContext ctx) {
+ return new ListProcessInstancesActionListener(
+ getValueExpression(processIdTagAttribute, ctx, Long.class),
+ getValueExpression(targetTagAttribute, ctx, List.class)
+ );
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/ListProcessesHandler.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/ListProcessesHandler.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/ListProcessesHandler.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,42 @@
+package org.jbpm.jsf.core.handler;
+
+import org.jboss.gravel.common.annotation.TldTag;
+import org.jboss.gravel.common.annotation.TldAttribute;
+import org.jbpm.jsf.JbpmActionListener;
+import org.jbpm.jsf.core.action.ListProcessesActionListener;
+
+import com.sun.facelets.tag.TagAttribute;
+import com.sun.facelets.tag.TagConfig;
+import com.sun.facelets.FaceletContext;
+
+import java.util.List;
+
+/**
+ *
+ */
+@TldTag (
+ name = "listProcesses",
+ description = "Read a list of process definitions from the database.",
+ attributes = {
+ @TldAttribute (
+ name = "target",
+ description = "An EL expression into which the process definition list
should be stored.",
+ required = true,
+ deferredType = List.class
+ )
+ }
+)
+public final class ListProcessesHandler extends AbstractHandler {
+ private final TagAttribute targetTagAttribute;
+
+ public ListProcessesHandler(final TagConfig config) {
+ super(config);
+ targetTagAttribute = getRequiredAttribute("target");
+ }
+
+ protected JbpmActionListener getListener(final FaceletContext ctx) {
+ return new ListProcessesActionListener(
+ getValueExpression(targetTagAttribute, ctx, List.class)
+ );
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/ListTasksForActorHandler.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/ListTasksForActorHandler.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/ListTasksForActorHandler.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,49 @@
+package org.jbpm.jsf.core.handler;
+
+import org.jboss.gravel.common.annotation.TldTag;
+import org.jboss.gravel.common.annotation.TldAttribute;
+import org.jbpm.jsf.JbpmActionListener;
+import org.jbpm.jsf.core.action.ListTasksForActorActionListener;
+import java.util.List;
+
+import com.sun.facelets.tag.TagAttribute;
+import com.sun.facelets.tag.TagConfig;
+import com.sun.facelets.FaceletContext;
+
+/**
+ *
+ */
+@TldTag (
+ name = "listTasksForActor",
+ description = "Read a list of task instances assigned to an actor ID.",
+ attributes = {
+ @TldAttribute (
+ name = "target",
+ description = "An EL expression into which the task instance list should
be stored.",
+ required = true,
+ deferredType = List.class
+ ),
+ @TldAttribute (
+ name = "actorId",
+ description = "The actor ID whose task instances are to be read.",
+ required = true
+ )
+ }
+)
+public final class ListTasksForActorHandler extends AbstractHandler {
+ private final TagAttribute targetTagAttribute;
+ private final TagAttribute actorIdTagAttribute;
+
+ public ListTasksForActorHandler(final TagConfig config) {
+ super(config);
+ targetTagAttribute = getRequiredAttribute("target");
+ actorIdTagAttribute = getRequiredAttribute("actorId");
+ }
+
+ protected JbpmActionListener getListener(final FaceletContext ctx) {
+ return new ListTasksForActorActionListener(
+ getValueExpression(actorIdTagAttribute, ctx, String.class),
+ getValueExpression(targetTagAttribute, ctx, List.class)
+ );
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/ListTasksForProcessHandler.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/ListTasksForProcessHandler.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/ListTasksForProcessHandler.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,51 @@
+package org.jbpm.jsf.core.handler;
+
+import org.jboss.gravel.common.annotation.TldTag;
+import org.jboss.gravel.common.annotation.TldAttribute;
+import org.jbpm.graph.def.ProcessDefinition;
+import org.jbpm.jsf.JbpmActionListener;
+import org.jbpm.jsf.core.action.ListTasksForProcessActionListener;
+import java.util.List;
+
+import com.sun.facelets.tag.TagAttribute;
+import com.sun.facelets.tag.TagConfig;
+import com.sun.facelets.FaceletContext;
+
+/**
+ *
+ */
+@TldTag (
+ name = "listTasksForProcess",
+ description = "Read a list of task instances from a process definition.",
+ attributes = {
+ @TldAttribute (
+ name = "target",
+ description = "An EL expression into which the task instance list should
be stored.",
+ required = true,
+ deferredType = List.class
+ ),
+ @TldAttribute (
+ name = "process",
+ description = "The process whose task instances are to be read.",
+ required = true,
+ deferredType = ProcessDefinition.class
+ )
+ }
+)
+public final class ListTasksForProcessHandler extends AbstractHandler {
+ private final TagAttribute targetTagAttribute;
+ private final TagAttribute processInstanceTagAttribute;
+
+ public ListTasksForProcessHandler(final TagConfig config) {
+ super(config);
+ targetTagAttribute = getRequiredAttribute("target");
+ processInstanceTagAttribute = getRequiredAttribute("process");
+ }
+
+ protected JbpmActionListener getListener(final FaceletContext ctx) {
+ return new ListTasksForProcessActionListener(
+ getValueExpression(processInstanceTagAttribute, ctx,
ProcessDefinition.class),
+ getValueExpression(targetTagAttribute, ctx, List.class)
+ );
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/ListTasksForProcessInstanceHandler.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/ListTasksForProcessInstanceHandler.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/ListTasksForProcessInstanceHandler.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,51 @@
+package org.jbpm.jsf.core.handler;
+
+import java.util.List;
+import org.jboss.gravel.common.annotation.TldAttribute;
+import org.jboss.gravel.common.annotation.TldTag;
+import org.jbpm.graph.exe.ProcessInstance;
+import org.jbpm.jsf.JbpmActionListener;
+import org.jbpm.jsf.core.action.ListTasksForProcessInstanceActionListener;
+
+import com.sun.facelets.FaceletContext;
+import com.sun.facelets.tag.TagAttribute;
+import com.sun.facelets.tag.TagConfig;
+
+/**
+ *
+ */
+@TldTag (
+ name = "listTasksForProcessInstance",
+ description = "Read a list of task instances from a process instance.",
+ attributes = {
+ @TldAttribute (
+ name = "target",
+ description = "An EL expression into which the task instance list should
be stored.",
+ required = true,
+ deferredType = List.class
+ ),
+ @TldAttribute (
+ name = "processInstance",
+ description = "The process instance whose task instances are to be
read.",
+ required = true,
+ deferredType = ProcessInstance.class
+ )
+ }
+)
+public final class ListTasksForProcessInstanceHandler extends AbstractHandler {
+ private final TagAttribute targetTagAttribute;
+ private final TagAttribute processInstanceTagAttribute;
+
+ public ListTasksForProcessInstanceHandler(final TagConfig config) {
+ super(config);
+ targetTagAttribute = getRequiredAttribute("target");
+ processInstanceTagAttribute = getRequiredAttribute("processInstance");
+ }
+
+ protected JbpmActionListener getListener(final FaceletContext ctx) {
+ return new ListTasksForProcessInstanceActionListener(
+ getValueExpression(processInstanceTagAttribute, ctx, ProcessInstance.class),
+ getValueExpression(targetTagAttribute, ctx, List.class)
+ );
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/ListTasksHandler.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/ListTasksHandler.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/ListTasksHandler.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,49 @@
+package org.jbpm.jsf.core.handler;
+
+import java.util.List;
+import org.jboss.gravel.common.annotation.TldAttribute;
+import org.jboss.gravel.common.annotation.TldTag;
+import org.jbpm.jsf.JbpmActionListener;
+import org.jbpm.jsf.core.action.ListTasksActionListener;
+
+import com.sun.facelets.FaceletContext;
+import com.sun.facelets.tag.TagAttribute;
+import com.sun.facelets.tag.TagConfig;
+
+/**
+ *
+ */
+@TldTag (
+ name = "listTasks",
+ description = "Read a list of task instances from the database.",
+ attributes = {
+ @TldAttribute (
+ name = "target",
+ description = "An EL expression into which the task instance list should
be stored.",
+ required = true,
+ deferredType = List.class
+ ),
+ @TldAttribute (
+ name = "includeEnded",
+ description = "A flag specifying whether ended tasks should be
included.",
+ deferredType = boolean.class
+ )
+ }
+)
+public final class ListTasksHandler extends AbstractHandler {
+ private final TagAttribute targetTagAttribute;
+ private final TagAttribute includeEndedTagAttribute;
+
+ public ListTasksHandler(final TagConfig config) {
+ super(config);
+ targetTagAttribute = getRequiredAttribute("target");
+ includeEndedTagAttribute = getAttribute("includeEnded");
+ }
+
+ protected JbpmActionListener getListener(final FaceletContext ctx) {
+ return new ListTasksActionListener(
+ getValueExpression(includeEndedTagAttribute, ctx, Boolean.class),
+ getValueExpression(targetTagAttribute, ctx, List.class)
+ );
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/ListTokensHandler.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/ListTokensHandler.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/ListTokensHandler.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,51 @@
+package org.jbpm.jsf.core.handler;
+
+import java.util.List;
+import org.jboss.gravel.common.annotation.TldAttribute;
+import org.jboss.gravel.common.annotation.TldTag;
+import org.jbpm.graph.exe.ProcessInstance;
+import org.jbpm.jsf.JbpmActionListener;
+import org.jbpm.jsf.core.action.ListTokensActionListener;
+
+import com.sun.facelets.FaceletContext;
+import com.sun.facelets.tag.TagAttribute;
+import com.sun.facelets.tag.TagConfig;
+
+/**
+ *
+ */
+@TldTag (
+ name = "listTokens",
+ description = "Read a token list from a process instance.",
+ attributes = {
+ @TldAttribute (
+ name = "processInstance",
+ description = "The process instalce to read the token list from.",
+ required = true,
+ deferredType = ProcessInstance.class
+ ),
+ @TldAttribute (
+ name = "target",
+ description = "An EL expression into which the token list should be
stored.",
+ required = true,
+ deferredType = List.class
+ )
+ }
+)
+public final class ListTokensHandler extends AbstractHandler {
+ private final TagAttribute processInstanceTagAttribute;
+ private final TagAttribute targetTagAttribute;
+
+ public ListTokensHandler(final TagConfig config) {
+ super(config);
+ processInstanceTagAttribute = getRequiredAttribute("processInstance");
+ targetTagAttribute = getRequiredAttribute("target");
+ }
+
+ protected JbpmActionListener getListener(final FaceletContext ctx) {
+ return new ListTokensActionListener(
+ getValueExpression(processInstanceTagAttribute, ctx, ProcessInstance.class),
+ getValueExpression(targetTagAttribute, ctx, List.class)
+ );
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/LoadJobHandler.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/LoadJobHandler.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/LoadJobHandler.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,50 @@
+package org.jbpm.jsf.core.handler;
+
+import org.jboss.gravel.common.annotation.TldAttribute;
+import org.jboss.gravel.common.annotation.TldTag;
+import org.jbpm.job.Job;
+import org.jbpm.jsf.JbpmActionListener;
+import org.jbpm.jsf.core.action.LoadJobActionListener;
+
+import com.sun.facelets.FaceletContext;
+import com.sun.facelets.tag.TagAttribute;
+import com.sun.facelets.tag.TagConfig;
+
+/**
+ *
+ */
+@TldTag (
+ name = "loadJob",
+ description = "Read a job instance from the database.",
+ attributes = {
+ @TldAttribute (
+ name = "id",
+ description = "The ID of the job to load.",
+ required = true,
+ deferredType = long.class
+ ),
+ @TldAttribute (
+ name = "target",
+ description = "An EL expression into which the job should be
stored.",
+ required = true,
+ deferredType = Job.class
+ )
+ }
+)
+public final class LoadJobHandler extends AbstractHandler {
+ private final TagAttribute idTagAttribute;
+ private final TagAttribute targetTagAttribute;
+
+ public LoadJobHandler(final TagConfig config) {
+ super(config);
+ idTagAttribute = getRequiredAttribute("id");
+ targetTagAttribute = getRequiredAttribute("target");
+ }
+
+ protected JbpmActionListener getListener(final FaceletContext ctx) {
+ return new LoadJobActionListener(
+ getValueExpression(idTagAttribute, ctx, Long.class),
+ getValueExpression(targetTagAttribute, ctx, Job.class)
+ );
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/LoadProcessHandler.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/LoadProcessHandler.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/LoadProcessHandler.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,50 @@
+package org.jbpm.jsf.core.handler;
+
+import org.jboss.gravel.common.annotation.TldAttribute;
+import org.jboss.gravel.common.annotation.TldTag;
+import org.jbpm.graph.def.ProcessDefinition;
+import org.jbpm.jsf.JbpmActionListener;
+import org.jbpm.jsf.core.action.LoadProcessActionListener;
+
+import com.sun.facelets.FaceletContext;
+import com.sun.facelets.tag.TagAttribute;
+import com.sun.facelets.tag.TagConfig;
+
+/**
+ *
+ */
+@TldTag (
+ name = "loadProcess",
+ description = "Read a process definition from the database.",
+ attributes = {
+ @TldAttribute (
+ name = "id",
+ description = "The ID of the process definition to load.",
+ required = true,
+ deferredType = long.class
+ ),
+ @TldAttribute (
+ name = "target",
+ description = "An EL expression into which the process definition should
be stored.",
+ required = true,
+ deferredType = ProcessDefinition.class
+ )
+ }
+)
+public final class LoadProcessHandler extends AbstractHandler {
+ private final TagAttribute idTagAttribute;
+ private final TagAttribute targetTagAttribute;
+
+ public LoadProcessHandler(final TagConfig config) {
+ super(config);
+ idTagAttribute = getRequiredAttribute("id");
+ targetTagAttribute = getRequiredAttribute("target");
+ }
+
+ protected JbpmActionListener getListener(final FaceletContext ctx) {
+ return new LoadProcessActionListener(
+ getValueExpression(idTagAttribute, ctx, Long.class),
+ getValueExpression(targetTagAttribute, ctx, ProcessDefinition.class)
+ );
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/LoadProcessInstanceHandler.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/LoadProcessInstanceHandler.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/LoadProcessInstanceHandler.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,61 @@
+package org.jbpm.jsf.core.handler;
+
+import org.jboss.gravel.common.annotation.TldAttribute;
+import org.jboss.gravel.common.annotation.TldTag;
+import org.jbpm.graph.exe.ProcessInstance;
+import org.jbpm.jsf.JbpmActionListener;
+import org.jbpm.jsf.core.action.LoadProcessInstanceActionListener;
+
+import com.sun.facelets.FaceletContext;
+import com.sun.facelets.tag.TagAttribute;
+import com.sun.facelets.tag.TagConfig;
+
+/**
+ *
+ */
+@TldTag (
+ name = "loadProcessInstance",
+ description = "Read a process instance from the database.",
+ attributes = {
+ @TldAttribute (
+ name = "id",
+ description = "The ID of the process instance to load.",
+ required = true,
+ deferredType = long.class
+ ),
+ @TldAttribute (
+ name = "target",
+ description = "An EL expression into which the process instance should
be stored.",
+ required = true,
+ deferredType = ProcessInstance.class
+ ),
+ @TldAttribute (
+ name = "forUpdate",
+ description = "A boolean that controls whether the process instance is
to be read for update. " +
+ "This typically entails using a <code>SELECT ... FOR
UPDATE</code> statement, when database persistence is " +
+ "involved. By default, this flag is <code>false</code>
if the action is invoked during the " +
+ "<code>RENDER_RESPONSE</code> phase, and
<code>true</code> otherwise.",
+ deferredType = boolean.class
+ )
+ }
+)
+public final class LoadProcessInstanceHandler extends AbstractHandler {
+ private final TagAttribute idTagAttribute;
+ private final TagAttribute targetTagAttribute;
+ private final TagAttribute forUpdateTagAttribute;
+
+ public LoadProcessInstanceHandler(final TagConfig config) {
+ super(config);
+ idTagAttribute = getRequiredAttribute("id");
+ targetTagAttribute = getRequiredAttribute("target");
+ forUpdateTagAttribute = getAttribute("forUpdate");
+ }
+
+ protected JbpmActionListener getListener(final FaceletContext ctx) {
+ return new LoadProcessInstanceActionListener(
+ getValueExpression(idTagAttribute, ctx, Long.class),
+ getValueExpression(targetTagAttribute, ctx, ProcessInstance.class),
+ getValueExpression(forUpdateTagAttribute, ctx, Boolean.class)
+ );
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/LoadTaskHandler.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/LoadTaskHandler.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/LoadTaskHandler.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,61 @@
+package org.jbpm.jsf.core.handler;
+
+import org.jboss.gravel.common.annotation.TldAttribute;
+import org.jboss.gravel.common.annotation.TldTag;
+import org.jbpm.jsf.JbpmActionListener;
+import org.jbpm.jsf.core.action.LoadTaskActionListener;
+import org.jbpm.taskmgmt.exe.TaskInstance;
+
+import com.sun.facelets.FaceletContext;
+import com.sun.facelets.tag.TagAttribute;
+import com.sun.facelets.tag.TagConfig;
+
+/**
+ *
+ */
+@TldTag (
+ name = "loadTask",
+ description = "Read a task instance from the database.",
+ attributes = {
+ @TldAttribute (
+ name = "id",
+ description = "The ID of the task instance to load.",
+ required = true,
+ deferredType = long.class
+ ),
+ @TldAttribute (
+ name = "target",
+ description = "An EL expression into which the task instance should be
stored.",
+ required = true,
+ deferredType = TaskInstance.class
+ ),
+ @TldAttribute (
+ name = "forUpdate",
+ description = "A boolean that controls whether the task instance is to
be read for update. " +
+ "This typically entails using a <code>SELECT ... FOR
UPDATE</code> statement, when database persistence is " +
+ "involved. By default, this flag is <code>false</code>
if the action is invoked during the " +
+ "<code>RENDER_RESPONSE</code> phase, and
<code>true</code> otherwise.",
+ deferredType = boolean.class
+ )
+ }
+)
+public final class LoadTaskHandler extends AbstractHandler {
+ private final TagAttribute idTagAttribute;
+ private final TagAttribute targetTagAttribute;
+ private final TagAttribute forUpdateTagAttribute;
+
+ public LoadTaskHandler(final TagConfig config) {
+ super(config);
+ idTagAttribute = getRequiredAttribute("id");
+ targetTagAttribute = getRequiredAttribute("target");
+ forUpdateTagAttribute = getAttribute("forUpdate");
+ }
+
+ protected JbpmActionListener getListener(final FaceletContext ctx) {
+ return new LoadTaskActionListener(
+ getValueExpression(idTagAttribute, ctx, Long.class),
+ getValueExpression(targetTagAttribute, ctx, TaskInstance.class),
+ getValueExpression(forUpdateTagAttribute, ctx, Boolean.class)
+ );
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/LoadTokenHandler.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/LoadTokenHandler.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/LoadTokenHandler.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,61 @@
+package org.jbpm.jsf.core.handler;
+
+import org.jboss.gravel.common.annotation.TldAttribute;
+import org.jboss.gravel.common.annotation.TldTag;
+import org.jbpm.graph.exe.Token;
+import org.jbpm.jsf.JbpmActionListener;
+import org.jbpm.jsf.core.action.LoadTokenActionListener;
+
+import com.sun.facelets.FaceletContext;
+import com.sun.facelets.tag.TagAttribute;
+import com.sun.facelets.tag.TagConfig;
+
+/**
+ *
+ */
+@TldTag (
+ name = "loadToken",
+ description = "Read a token from the database.",
+ attributes = {
+ @TldAttribute (
+ name = "id",
+ description = "The ID of the token to load.",
+ required = true,
+ deferredType = long.class
+ ),
+ @TldAttribute (
+ name = "target",
+ description = "An EL expression into which the token should be
stored.",
+ required = true,
+ deferredType = Token.class
+ ),
+ @TldAttribute (
+ name = "forUpdate",
+ description = "A boolean that controls whether the token is to be read
for update. " +
+ "This typically entails using a <code>SELECT ... FOR
UPDATE</code> statement, when database persistence is " +
+ "involved. By default, this flag is <code>false</code>
if the action is invoked during the " +
+ "<code>RENDER_RESPONSE</code> phase, and
<code>true</code> otherwise.",
+ deferredType = boolean.class
+ )
+ }
+)
+public final class LoadTokenHandler extends AbstractHandler {
+ private final TagAttribute idTagAttribute;
+ private final TagAttribute targetTagAttribute;
+ private final TagAttribute forUpdateTagAttribute;
+
+ public LoadTokenHandler(final TagConfig config) {
+ super(config);
+ idTagAttribute = getRequiredAttribute("id");
+ targetTagAttribute = getRequiredAttribute("target");
+ forUpdateTagAttribute = getAttribute("forUpdate");
+ }
+
+ protected JbpmActionListener getListener(final FaceletContext ctx) {
+ return new LoadTokenActionListener(
+ getValueExpression(idTagAttribute, ctx, Long.class),
+ getValueExpression(targetTagAttribute, ctx, Token.class),
+ getValueExpression(forUpdateTagAttribute, ctx, Boolean.class)
+ );
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/MoveTokenHandler.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/MoveTokenHandler.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/MoveTokenHandler.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,52 @@
+package org.jbpm.jsf.core.handler;
+
+import org.jboss.gravel.common.annotation.TldAttribute;
+import org.jboss.gravel.common.annotation.TldTag;
+import org.jbpm.graph.exe.Token;
+import org.jbpm.jsf.JbpmActionListener;
+import org.jbpm.jsf.core.action.MoveTokenActionListener;
+
+import com.sun.facelets.FaceletContext;
+import com.sun.facelets.tag.TagAttribute;
+import com.sun.facelets.tag.TagConfig;
+
+/**
+ *
+ */
+@TldTag (
+ name = "moveToken",
+ description = "Move a token to a new node. Note that this does not affect any
" +
+ "tasks that may be active and associated with this token.",
+ attributes = {
+ @TldAttribute (
+ name = "token",
+ description = "An EL expression which resolves to the token that is to
be moved.",
+ required = true,
+ deferredType = Token.class
+ ),
+ @TldAttribute(
+ name = "node",
+ description = "An EL expression which resolves to the node to move the
token to, or " +
+ "the name of the node.",
+ required = true,
+ deferredType = Object.class
+ )
+ }
+)
+public final class MoveTokenHandler extends AbstractHandler {
+ private final TagAttribute tokenTagAttribute;
+ private final TagAttribute nodeTagAttribute;
+
+ public MoveTokenHandler(final TagConfig config) {
+ super(config);
+ tokenTagAttribute = getRequiredAttribute("token");
+ nodeTagAttribute = getRequiredAttribute("node");
+ }
+
+ protected JbpmActionListener getListener(final FaceletContext ctx) {
+ return new MoveTokenActionListener(
+ getValueExpression(tokenTagAttribute, ctx, Token.class),
+ getValueExpression(nodeTagAttribute, ctx, Object.class)
+ );
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/RemoveVariableHandler.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/RemoveVariableHandler.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/RemoveVariableHandler.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,57 @@
+package org.jbpm.jsf.core.handler;
+
+import org.jboss.gravel.common.annotation.TldAttribute;
+import org.jboss.gravel.common.annotation.TldTag;
+import org.jbpm.jsf.JbpmActionListener;
+import org.jbpm.jsf.core.action.RemoveVariableActionListener;
+import org.jbpm.taskmgmt.exe.TaskInstance;
+
+import com.sun.facelets.FaceletContext;
+import com.sun.facelets.tag.TagAttribute;
+import com.sun.facelets.tag.TagConfig;
+
+/**
+ *
+ */
+@TldTag(
+ name = "removeVariable",
+ description = "Remove a process variable. Optionally store the old value into
an EL expression.",
+ attributes = {
+ @TldAttribute (
+ name = "name",
+ description = "The name of the variable to remove.",
+ required = true
+ ),
+ @TldAttribute (
+ name = "target",
+ description = "An optional EL expression into which the old variable
value will be stored.",
+ deferredType = Object.class
+ ),
+ @TldAttribute (
+ name = "entity",
+ description = "The token, task, or process instance from which the
variable should be removed.",
+ deferredType = Object.class,
+ required = true
+ )
+ }
+)
+public final class RemoveVariableHandler extends AbstractHandler {
+ private final TagAttribute nameTagAttribute;
+ private final TagAttribute oldValueTargetTagAttribute;
+ private final TagAttribute entityTagAttribute;
+
+ public RemoveVariableHandler(final TagConfig config) {
+ super(config);
+ nameTagAttribute = getRequiredAttribute("name");
+ oldValueTargetTagAttribute = getAttribute("target");
+ entityTagAttribute = getRequiredAttribute("entity");
+ }
+
+ protected JbpmActionListener getListener(final FaceletContext ctx) {
+ return new RemoveVariableActionListener(
+ getValueExpression(nameTagAttribute, ctx, String.class),
+ getValueExpression(oldValueTargetTagAttribute, ctx, Object.class),
+ getValueExpression(entityTagAttribute, ctx, Object.class)
+ );
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/ResumeHandler.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/ResumeHandler.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/ResumeHandler.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,40 @@
+package org.jbpm.jsf.core.handler;
+
+import org.jboss.gravel.common.annotation.TldTag;
+import org.jboss.gravel.common.annotation.TldAttribute;
+import org.jbpm.jsf.JbpmActionListener;
+import org.jbpm.jsf.core.action.ResumeActionListener;
+
+import com.sun.facelets.tag.TagAttribute;
+import com.sun.facelets.tag.TagConfig;
+import com.sun.facelets.FaceletContext;
+
+/**
+ *
+ */
+@TldTag (
+ name = "resume",
+ description = "Resume a running task, token, or process instance.",
+ attributes = {
+ @TldAttribute (
+ name = "value",
+ description = "The item to resume.",
+ required = true,
+ deferredType = Object.class
+ )
+ }
+)
+public final class ResumeHandler extends AbstractHandler {
+ private final TagAttribute valueTagAttribute;
+
+ public ResumeHandler(final TagConfig config) {
+ super(config);
+ valueTagAttribute = getRequiredAttribute("value");
+ }
+
+ protected JbpmActionListener getListener(final FaceletContext ctx) {
+ return new ResumeActionListener(
+ getValueExpression(valueTagAttribute, ctx, Object.class)
+ );
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/SignalHandler.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/SignalHandler.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/SignalHandler.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,49 @@
+package org.jbpm.jsf.core.handler;
+
+import org.jboss.gravel.common.annotation.TldAttribute;
+import org.jboss.gravel.common.annotation.TldTag;
+import org.jbpm.graph.exe.Token;
+import org.jbpm.jsf.JbpmActionListener;
+import org.jbpm.jsf.core.action.SignalActionListener;
+
+import com.sun.facelets.FaceletContext;
+import com.sun.facelets.tag.TagAttribute;
+import com.sun.facelets.tag.TagConfig;
+
+/**
+ *
+ */
+@TldTag (
+ name = "signal",
+ description = "Signal a token or process instance. Optionally specify the
transition.",
+ attributes = {
+ @TldAttribute (
+ name = "value",
+ description = "The item to signal.",
+ required = true,
+ deferredType = Object.class
+ ),
+ @TldAttribute (
+ name = "transition",
+ description = "The transition, or transition name, to signal the item
along.",
+ deferredType = Object.class
+ )
+ }
+)
+public final class SignalHandler extends AbstractHandler {
+ private final TagAttribute valueTagAttribute;
+ private final TagAttribute transitionTagAttribute;
+
+ public SignalHandler(final TagConfig config) {
+ super(config);
+ valueTagAttribute = getRequiredAttribute("value");
+ transitionTagAttribute = getAttribute("transition");
+ }
+
+ protected JbpmActionListener getListener(final FaceletContext ctx) {
+ return new SignalActionListener(
+ getValueExpression(valueTagAttribute, ctx, Object.class),
+ getValueExpression(transitionTagAttribute, ctx, Object.class)
+ );
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/StartProcessHandler.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/StartProcessHandler.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/StartProcessHandler.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,50 @@
+package org.jbpm.jsf.core.handler;
+
+import org.jboss.gravel.common.annotation.TldAttribute;
+import org.jboss.gravel.common.annotation.TldTag;
+import org.jbpm.graph.def.ProcessDefinition;
+import org.jbpm.graph.exe.ProcessInstance;
+import org.jbpm.jsf.JbpmActionListener;
+import org.jbpm.jsf.core.action.StartProcessActionListener;
+
+import com.sun.facelets.FaceletContext;
+import com.sun.facelets.tag.TagAttribute;
+import com.sun.facelets.tag.TagConfig;
+
+/**
+ *
+ */
+@TldTag (
+ name = "startProcess",
+ description = "Start a process.",
+ attributes = {
+ @TldAttribute (
+ name = "process",
+ description = "The process definition to begin executing.",
+ required = true,
+ deferredType = ProcessDefinition.class
+ ),
+ @TldAttribute (
+ name = "target",
+ description = "An EL expression into which the new process instance will
be stored.",
+ deferredType = ProcessInstance.class
+ )
+ }
+)
+public final class StartProcessHandler extends AbstractHandler {
+ private final TagAttribute processTagAttribute;
+ private final TagAttribute instanceTagAttribute;
+
+ public StartProcessHandler(final TagConfig config) {
+ super(config);
+ processTagAttribute = getRequiredAttribute("process");
+ instanceTagAttribute = getRequiredAttribute("target");
+ }
+
+ protected JbpmActionListener getListener(final FaceletContext ctx) {
+ return new StartProcessActionListener(
+ getValueExpression(processTagAttribute, ctx, ProcessDefinition.class),
+ getValueExpression(instanceTagAttribute, ctx, ProcessInstance.class)
+ );
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/StartTaskHandler.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/StartTaskHandler.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/StartTaskHandler.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,58 @@
+package org.jbpm.jsf.core.handler;
+
+import org.jboss.gravel.common.annotation.TldAttribute;
+import org.jboss.gravel.common.annotation.TldTag;
+import org.jbpm.jsf.JbpmActionListener;
+import org.jbpm.jsf.core.action.StartTaskActionListener;
+import org.jbpm.taskmgmt.exe.TaskInstance;
+
+import com.sun.facelets.FaceletContext;
+import com.sun.facelets.tag.TagAttribute;
+import com.sun.facelets.tag.TagConfig;
+
+/**
+ *
+ */
+@TldTag (
+ name = "startTask",
+ description = "Mark a task as started.",
+ attributes = {
+ @TldAttribute (
+ name = "task",
+ description = "The task to mark as started.",
+ required = true,
+ deferredType = TaskInstance.class
+ ),
+ @TldAttribute (
+ name = "actorId",
+ description = "The actor to assign the task to. If not given, the
current actor is not changed.",
+ deferredType = String.class
+ ),
+ @TldAttribute (
+ name = "overwriteSwimlane",
+ description = "A flag specifying whether the swimlane will be
overwritten.",
+ deferredType = boolean.class
+ )
+ }
+)
+public final class StartTaskHandler extends AbstractHandler {
+ private final TagAttribute instanceTagAttribute;
+ private final TagAttribute actorIdTagAttribute;
+ private final TagAttribute overwriteSwimlaneTagAttribute;
+
+ public StartTaskHandler(final TagConfig config) {
+ super(config);
+ instanceTagAttribute = getRequiredAttribute("task");
+ actorIdTagAttribute = getAttribute("actorId");
+ overwriteSwimlaneTagAttribute = getAttribute("overwriteSwimlane");
+ }
+
+ protected JbpmActionListener getListener(final FaceletContext ctx) {
+ return new StartTaskActionListener(
+ getValueExpression(instanceTagAttribute, ctx, TaskInstance.class),
+ getValueExpression(actorIdTagAttribute, ctx, String.class),
+ getValueExpression(overwriteSwimlaneTagAttribute, ctx, Boolean.class)
+ );
+ }
+}
+
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/SuspendHandler.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/SuspendHandler.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/SuspendHandler.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,40 @@
+package org.jbpm.jsf.core.handler;
+
+import org.jboss.gravel.common.annotation.TldTag;
+import org.jboss.gravel.common.annotation.TldAttribute;
+import org.jbpm.jsf.JbpmActionListener;
+import org.jbpm.jsf.core.action.SuspendActionListener;
+
+import com.sun.facelets.tag.TagAttribute;
+import com.sun.facelets.tag.TagConfig;
+import com.sun.facelets.FaceletContext;
+
+/**
+ *
+ */
+@TldTag (
+ name = "suspend",
+ description = "Suspend a running task, token, or process instance.",
+ attributes = {
+ @TldAttribute (
+ name = "value",
+ description = "The item to suspend.",
+ required = true,
+ deferredType = Object.class
+ )
+ }
+)
+public final class SuspendHandler extends AbstractHandler {
+ private final TagAttribute valueTagAttribute;
+
+ public SuspendHandler(final TagConfig config) {
+ super(config);
+ valueTagAttribute = getRequiredAttribute("value");
+ }
+
+ protected JbpmActionListener getListener(final FaceletContext ctx) {
+ return new SuspendActionListener(
+ getValueExpression(valueTagAttribute, ctx, Object.class)
+ );
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/TaskFormHandler.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/TaskFormHandler.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/TaskFormHandler.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,66 @@
+package org.jbpm.jsf.core.handler;
+
+import org.jbpm.jsf.core.ui.UITaskForm;
+import org.jbpm.jsf.core.impl.JbpmActionListenerWrapper;
+import org.jbpm.jsf.core.action.TaskFormButtonActionListener;
+import org.jboss.gravel.common.annotation.TldTag;
+import org.jboss.gravel.common.annotation.TldAttribute;
+
+import com.sun.facelets.tag.jsf.ComponentHandler;
+import com.sun.facelets.tag.jsf.ComponentConfig;
+import com.sun.facelets.tag.TagAttribute;
+import com.sun.facelets.FaceletContext;
+
+import javax.faces.component.UIComponent;
+import javax.el.ValueExpression;
+
+/**
+ *
+ */
+@TldTag (
+ name = "taskForm",
+ description = "Represents the task form action source.",
+ attributes = {
+ @TldAttribute (
+ name = "transitionTarget",
+ description = "An EL expression into which the submitted transition name
will be stored (if any)."
+ ),
+ @TldAttribute (
+ name = "buttonTarget",
+ description = "An EL expression into which the type of button clicked
will be stored. It will be one " +
+ "of:
<ul><li><code>cancel</code></li><li><code>save</code></li><li><code>transition</code></li></ul>"
+ )
+ }
+)
+public final class TaskFormHandler extends ComponentHandler {
+ private final TagAttribute transitionTargetTagAttribute;
+ private final TagAttribute buttonTargetTagAttribute;
+
+ public TaskFormHandler(final ComponentConfig config) {
+ super(config);
+ transitionTargetTagAttribute = getAttribute("transitionTarget");
+ buttonTargetTagAttribute = getAttribute("buttonTarget");
+ }
+
+ protected void onComponentCreated(FaceletContext ctx, UIComponent c, UIComponent
parent) {
+ final ValueExpression transitionTargetValueExpression;
+ if (transitionTargetTagAttribute != null) {
+ transitionTargetValueExpression =
transitionTargetTagAttribute.getValueExpression(ctx, String.class);
+ } else {
+ transitionTargetValueExpression = null;
+ }
+ final ValueExpression buttonTargetValueExpression;
+ if (buttonTargetTagAttribute != null) {
+ buttonTargetValueExpression =
buttonTargetTagAttribute.getValueExpression(ctx, String.class);
+ } else {
+ buttonTargetValueExpression = null;
+ }
+ UITaskForm taskForm = ((UITaskForm)c);
+ taskForm.addActionListener(new JbpmActionListenerWrapper(
+ new TaskFormButtonActionListener(transitionTargetValueExpression,
buttonTargetValueExpression),
+ null,
+ null,
+ null
+ ));
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/UpdateTaskStartHandler.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/UpdateTaskStartHandler.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/UpdateTaskStartHandler.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,51 @@
+package org.jbpm.jsf.core.handler;
+
+import org.jbpm.jsf.JbpmActionListener;
+import org.jbpm.jsf.core.action.UpdateTaskStartActionListener;
+import org.jbpm.taskmgmt.exe.TaskInstance;
+import org.jboss.gravel.common.annotation.TldTag;
+import org.jboss.gravel.common.annotation.TldAttribute;
+
+import com.sun.facelets.FaceletContext;
+import com.sun.facelets.tag.TagConfig;
+import com.sun.facelets.tag.TagAttribute;
+
+import java.util.Date;
+
+/**
+ *
+ */
+@TldTag (
+ name = "updateTaskStart",
+ description = "Update the start date of a started task.",
+ attributes = {
+ @TldAttribute (
+ name = "task",
+ description = "The task instance to update.",
+ required = true,
+ deferredType = TaskInstance.class
+ ),
+ @TldAttribute (
+ name = "startDate",
+ description = "The start date to assign. If not given, the current date
will be used.",
+ deferredType = Date.class
+ )
+ }
+)
+public final class UpdateTaskStartHandler extends AbstractHandler {
+ private final TagAttribute taskTagAttribute;
+ private final TagAttribute startDateTagAttribute;
+
+ public UpdateTaskStartHandler(final TagConfig config) {
+ super(config);
+ taskTagAttribute = getRequiredAttribute("task");
+ startDateTagAttribute = getAttribute("startDate");
+ }
+
+ protected JbpmActionListener getListener(final FaceletContext ctx) {
+ return new UpdateTaskStartActionListener(
+ getValueExpression(taskTagAttribute, ctx, TaskInstance.class),
+ getValueExpression(startDateTagAttribute, ctx, Date.class)
+ );
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/UpdateVariableHandler.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/UpdateVariableHandler.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/handler/UpdateVariableHandler.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,66 @@
+package org.jbpm.jsf.core.handler;
+
+import org.jboss.gravel.common.annotation.TldAttribute;
+import org.jboss.gravel.common.annotation.TldTag;
+import org.jbpm.jsf.JbpmActionListener;
+import org.jbpm.jsf.core.action.UpdateVariableActionListener;
+import org.jbpm.taskmgmt.exe.TaskInstance;
+
+import com.sun.facelets.FaceletContext;
+import com.sun.facelets.tag.TagAttribute;
+import com.sun.facelets.tag.TagConfig;
+
+/**
+ *
+ */
+@TldTag (
+ name = "updateVariable",
+ description = "Update a process variable. Optionally store the old value into
an EL expression.",
+ attributes = {
+ @TldAttribute (
+ name = "name",
+ description = "The name of the variable to update.",
+ required = true
+ ),
+ @TldAttribute (
+ name = "value",
+ description = "The new variable value.",
+ required = true,
+ deferredType = Object.class
+ ),
+ @TldAttribute (
+ name = "target",
+ description = "An optional EL expression into which the old variable
value will be stored.",
+ deferredType = Object.class
+ ),
+ @TldAttribute (
+ name = "entity",
+ description = "The token, task, or process instance for which the
variable should be updated.",
+ deferredType = Object.class,
+ required = true
+ )
+ }
+)
+public final class UpdateVariableHandler extends AbstractHandler {
+ private final TagAttribute nameTagAttribute;
+ private final TagAttribute valueTagAttribute;
+ private final TagAttribute oldValueTargetTagAttribute;
+ private final TagAttribute entityTagAttribute;
+
+ public UpdateVariableHandler(final TagConfig config) {
+ super(config);
+ nameTagAttribute = getRequiredAttribute("name");
+ valueTagAttribute = getRequiredAttribute("value");
+ oldValueTargetTagAttribute = getAttribute("target");
+ entityTagAttribute = getRequiredAttribute("entity");
+ }
+
+ protected JbpmActionListener getListener(final FaceletContext ctx) {
+ return new UpdateVariableActionListener(
+ getValueExpression(nameTagAttribute, ctx, String.class),
+ getValueExpression(valueTagAttribute, ctx, Object.class),
+ getValueExpression(oldValueTargetTagAttribute, ctx, Object.class),
+ getValueExpression(entityTagAttribute, ctx, Object.class)
+ );
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/impl/JbpmActionListenerWrapper.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/impl/JbpmActionListenerWrapper.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/impl/JbpmActionListenerWrapper.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,84 @@
+package org.jbpm.jsf.core.impl;
+
+import java.io.Serializable;
+import java.util.Map;
+import org.jbpm.jsf.JbpmActionListener;
+import org.jbpm.jsf.core.handler.AbstractHandler;
+
+import javax.el.ELContext;
+import javax.el.ValueExpression;
+import javax.faces.context.FacesContext;
+import javax.faces.event.AbortProcessingException;
+import javax.faces.event.ActionEvent;
+import javax.faces.event.ActionListener;
+
+/**
+ *
+ */
+public final class JbpmActionListenerWrapper implements ActionListener, Serializable {
+ private static final long serialVersionUID = 1L;
+
+ private final JbpmActionListener listener;
+
+ private final ValueExpression unlessExpression;
+ private final ValueExpression navigateExpression;
+ private final ValueExpression nameExpression;
+
+ public JbpmActionListenerWrapper(final JbpmActionListener listener, final
ValueExpression unlessExpression, final ValueExpression navigateExpression, final
ValueExpression nameExpression) {
+ this.listener = listener;
+ this.unlessExpression = unlessExpression;
+ this.navigateExpression = navigateExpression;
+ this.nameExpression = nameExpression;
+ }
+
+ public void processAction(ActionEvent actionEvent) throws AbortProcessingException {
+ FacesContext context = FacesContext.getCurrentInstance();
+ final ELContext elContext = context.getELContext();
+ final Map<String,Object> requestMap =
context.getExternalContext().getRequestMap();
+ final JbpmJsfContextImpl jbpmJsfContext;
+ if (requestMap.containsKey(AbstractHandler.JBPM_JSF_CONTEXT_KEY)) {
+ jbpmJsfContext = (JbpmJsfContextImpl)
requestMap.get(AbstractHandler.JBPM_JSF_CONTEXT_KEY);
+ } else {
+ jbpmJsfContext = new JbpmJsfContextImpl();
+ requestMap.put(AbstractHandler.JBPM_JSF_CONTEXT_KEY, jbpmJsfContext);
+ }
+ if (unlessExpression != null) {
+ final Object unlessValue = unlessExpression.getValue(elContext);
+ if (unlessValue != null) {
+ final Boolean unless;
+ if (unlessValue instanceof Boolean) {
+ unless = (Boolean) unlessValue;
+ } else {
+ unless = Boolean.valueOf(unlessValue.toString());
+ }
+ if (unless.booleanValue()) {
+ // do not run action
+ return;
+ }
+ }
+ }
+ boolean enableNavigation = true;
+ if (navigateExpression != null) {
+ final Object navigateValue = navigateExpression.getValue(elContext);
+ if (navigateValue != null) {
+ final Boolean navigate;
+ if (navigateValue instanceof Boolean) {
+ navigate = (Boolean) navigateValue;
+ } else {
+ navigate = Boolean.valueOf(navigateValue.toString());
+ }
+ enableNavigation = navigate.booleanValue();
+ }
+ }
+ String name = listener.getName();
+ if (nameExpression != null) {
+ final Object nameValue = nameExpression.getValue(elContext);
+ if (nameValue != null) {
+ name = nameValue.toString();
+ }
+ }
+ jbpmJsfContext.setEnableNavigation(enableNavigation);
+ jbpmJsfContext.setActionName(name);
+ listener.handleAction(jbpmJsfContext, actionEvent);
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/impl/JbpmJsfContextImpl.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/impl/JbpmJsfContextImpl.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/impl/JbpmJsfContextImpl.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,174 @@
+package org.jbpm.jsf.core.impl;
+
+import java.security.Principal;
+import java.util.ArrayList;
+import java.util.List;
+import org.jbpm.JbpmConfiguration;
+import org.jbpm.JbpmContext;
+import org.jbpm.identity.hibernate.IdentitySession;
+import org.jbpm.jsf.JbpmJsfContext;
+import org.jbpm.jsf.core.config.ConfigurationLocator;
+
+import javax.faces.application.FacesMessage;
+import javax.faces.context.FacesContext;
+
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+/**
+ *
+ */
+public final class JbpmJsfContextImpl implements JbpmJsfContext {
+
+ private JbpmContext jbpmContext;
+ private IdentitySession identitySession;
+ private List<FacesMessage> messages = new ArrayList<FacesMessage>();
+ private String outcome;
+ private boolean error;
+ private String actionName;
+ private String outcomeActionName;
+ private boolean enableNavigation;
+
+ public boolean hasJbpmContext() {
+ return jbpmContext != null;
+ }
+
+ public JbpmContext getJbpmContext() {
+ final boolean debug = log.isLoggable(Level.FINE);
+ if (jbpmContext==null) {
+ jbpmContext = JbpmConfiguration.getInstance().createJbpmContext();
+ final Principal userPrincipal =
FacesContext.getCurrentInstance().getExternalContext().getUserPrincipal();
+ if (userPrincipal != null &&
ConfigurationLocator.getInstance().useJsfActorId()) {
+ jbpmContext.setActorId(userPrincipal.getName());
+ }
+ if (debug) log.fine(toString() + " using NEW " +
jbpmContext.toString());
+ } else {
+ if (debug) log.fine(toString() + " using cached " +
jbpmContext.toString());
+ }
+ return jbpmContext;
+ }
+
+ public IdentitySession getIdentitySession() {
+ if (identitySession==null) {
+ identitySession = new IdentitySession(getJbpmContext().getSession());
+ }
+ return identitySession;
+ }
+
+ public void addSuccessMessage(String message) {
+ if (message != null) {
+ messages.add(new FacesMessage(message, null));
+ if (log.isLoggable(Level.FINE)) {
+ log.fine("Added success message: " + message);
+ }
+ }
+ }
+
+ public void addSuccessMessage(String message, String detail) {
+ if (message != null) {
+ messages.add(new FacesMessage(message, detail));
+ if (log.isLoggable(Level.FINE)) {
+ log.fine("Added success message: " + message + " (detail:
" + detail + ")");
+ }
+ }
+ }
+
+ public void addSuccessMessage(FacesMessage.Severity severity, String message, String
detail) {
+ if (severity == null) {
+ throw new NullPointerException("addSuccessMessage cannot accept null as
the value of the severity parameter");
+ }
+ if (message != null) {
+ messages.add(new FacesMessage(severity, message, detail));
+ if (log.isLoggable(Level.FINE)) {
+ log.fine("Added success message: severity " + severity +
", message: " + message + " (detail: " + detail + ")");
+ }
+ }
+ }
+
+ public void selectOutcome(String outcomeName) {
+ if (outcomeName != null && enableNavigation) {
+ outcome = outcomeName;
+ outcomeActionName = actionName;
+ if (log.isLoggable(Level.FINE)) {
+ log.fine("Selected outcome " + outcomeName);
+ }
+ }
+ }
+
+ public String getOutcome() {
+ return outcome;
+ }
+
+ public boolean isError() {
+ return error;
+ }
+
+ public void setError(String message) {
+ error = true;
+ if (message != null) {
+ FacesContext.getCurrentInstance().addMessage(null, new
FacesMessage(FacesMessage.SEVERITY_ERROR, message, null));
+ }
+ if (log.isLoggable(Level.FINE)) {
+ log.log(Level.FINE, "Error message \"" + message +
"\"");
+ }
+ }
+
+ public void setError(String message, String detail) {
+ error = true;
+ if (message != null) {
+ FacesContext.getCurrentInstance().addMessage(null, new
FacesMessage(FacesMessage.SEVERITY_ERROR, message, detail));
+ }
+ if (log.isLoggable(Level.FINE)) {
+ log.log(Level.FINE, "Error message \"" + message +
"\" (" + detail + ")");
+ }
+ }
+
+ public void setError(String message, Throwable cause) {
+ error = true;
+ StringBuilder detailBuilder = new StringBuilder();
+ detailBuilder.append("An exception of type \"");
+ detailBuilder.append(cause.getClass().getName());
+ detailBuilder.append("\" was thrown.");
+ final String exMsg = cause.getMessage();
+ if (exMsg != null) {
+ detailBuilder.append(" The message is: ");
+ detailBuilder.append(exMsg);
+ }
+ if (message != null) {
+ FacesContext.getCurrentInstance().addMessage(null, new
FacesMessage(FacesMessage.SEVERITY_ERROR, message, detailBuilder.toString()));
+ }
+ if (log.isLoggable(Level.FINE)) {
+ log.log(Level.FINE, "Error message \"" + message +
"\" (exception thrown: " + cause.getMessage() + ")", cause);
+ }
+ }
+
+ public String getActionName() {
+ return actionName;
+ }
+
+ public void setActionName(final String actionName) {
+ this.actionName = actionName;
+ }
+
+ public String getOutcomeActionName() {
+ return outcomeActionName;
+ }
+
+ public void setEnableNavigation(final boolean enableNavigation) {
+ this.enableNavigation = enableNavigation;
+ }
+
+ public void reset() {
+ messages = new ArrayList<FacesMessage>();
+ error = false;
+ outcome = null;
+ outcomeActionName = null;
+ actionName = null;
+ }
+
+ private static final Logger log =
Logger.getLogger("org.jbpm.jsf.core.impl.JbpmJsfContextImpl");
+
+ public List<FacesMessage> getMessages() {
+ return messages;
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/impl/UpdatesHashMap.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/impl/UpdatesHashMap.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/impl/UpdatesHashMap.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,161 @@
+package org.jbpm.jsf.core.impl;
+
+import java.util.AbstractMap;
+import java.util.Map;
+import java.util.Set;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Collections;
+import java.util.AbstractSet;
+import java.util.Iterator;
+import java.io.Serializable;
+
+/**
+ *
+ */
+public final class UpdatesHashMap extends AbstractMap<String,Object> implements
Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ private final Map<String,Object> backingMap;
+ private final Set<String> updates;
+ private final Set<String> deletes;
+
+ public UpdatesHashMap() {
+ backingMap = new HashMap<String, Object>();
+ updates = new HashSet<String>();
+ deletes = new HashSet<String>();
+ }
+
+ public UpdatesHashMap(final Map<String, Object> backingMap) {
+ if (backingMap == null) {
+ this.backingMap = new HashMap<String, Object>();
+ } else {
+ this.backingMap = new HashMap<String, Object>(backingMap);
+ }
+ updates = new HashSet<String>();
+ deletes = new HashSet<String>();
+ }
+
+ public boolean containsKey(final Object key) {
+ return backingMap.containsKey(key);
+ }
+
+ public Object get(final Object key) {
+ return backingMap.get(key);
+ }
+
+ public boolean isEmpty() {
+ return backingMap.isEmpty();
+ }
+
+ public int size() {
+ return backingMap.size();
+ }
+
+ public Object put(final String key, final Object value) {
+ if (key == null) {
+ throw new NullPointerException("key is null");
+ }
+ deletes.remove(key);
+ final Object old = backingMap.put(key, value);
+ if (old == value) {
+ // this branch is also taken if both are null
+ // no update
+ return old;
+ } else if ((old == null) != (value == null)) {
+ // this branch is taken if one of them is null
+ // update
+ updates.add(key);
+ return old;
+ } else if (value.equals(old)) {
+ // niether one can possibly be null here
+ // no update
+ return old;
+ } else {
+ // niether one can possibly be null here
+ // update
+ updates.add(key);
+ return old;
+ }
+ }
+
+ public Object remove(final Object key) {
+ if (key instanceof String && backingMap.containsKey(key)) {
+ deletes.add((String) key);
+ updates.remove(key);
+ return backingMap.remove(key);
+ } else {
+ return null;
+ }
+ }
+
+ public void clear() {
+ updates.clear();
+ deletes.clear();
+ deletes.addAll(backingMap.keySet());
+ backingMap.clear();
+ }
+
+ public Set<Entry<String, Object>> entrySet() {
+ return new EntrySet(this);
+ }
+
+ public Set<String> updatesSet() {
+ return Collections.unmodifiableSet(updates);
+ }
+
+ public Set<String> deletesSet() {
+ return Collections.unmodifiableSet(deletes);
+ }
+
+ public static final class EntrySet extends AbstractSet<Entry<String,
Object>> implements Serializable {
+ private static final long serialVersionUID = 1L;
+
+ private final UpdatesHashMap updatesHashMap;
+
+ public EntrySet(final UpdatesHashMap updatesHashMap) {
+ this.updatesHashMap = updatesHashMap;
+ }
+
+ public Iterator<Entry<String, Object>> iterator() {
+ return new EntrySetIterator(updatesHashMap);
+ }
+
+ public int size() {
+ return updatesHashMap.backingMap.size();
+ }
+
+ public boolean isEmpty() {
+ return updatesHashMap.backingMap.isEmpty();
+ }
+ }
+
+ public static final class EntrySetIterator implements
Iterator<Map.Entry<String, Object>> {
+ private final Iterator<Map.Entry<String,Object>> iterator;
+ private final UpdatesHashMap updatesHashMap;
+ private Map.Entry<String,Object> current;
+
+ public EntrySetIterator(final UpdatesHashMap updatesHashMap) {
+ iterator = updatesHashMap.backingMap.entrySet().iterator();
+ this.updatesHashMap = updatesHashMap;
+ }
+
+ public boolean hasNext() {
+ return iterator.hasNext();
+ }
+
+ public Map.Entry<String, Object> next() {
+ current = iterator.next();
+ return current;
+ }
+
+ public void remove() {
+ iterator.remove();
+ final String key = current.getKey();
+ current = null;
+ updatesHashMap.deletes.add(key);
+ updatesHashMap.updates.remove(key);
+ }
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/package-info.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/package-info.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/package-info.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,9 @@
+/**
+ * JSF Tag Library for jBPM applications.
+ */
+(a)org.jboss.gravel.common.annotation.TldTagLib(
+ fileName = "core.tld",
+ shortName = "jbpm",
+ uri = "http://jbpm.org/jbpm4jsf/core"
+)
+package org.jbpm.jsf.core;
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/phase/JbpmPhaseListener.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/phase/JbpmPhaseListener.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/phase/JbpmPhaseListener.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,121 @@
+package org.jbpm.jsf.core.phase;
+
+import java.util.Map;
+import org.jbpm.JbpmContext;
+import org.jbpm.jsf.core.handler.AbstractHandler;
+import org.jbpm.jsf.core.impl.JbpmJsfContextImpl;
+import org.jbpm.persistence.db.DbPersistenceService;
+
+import javax.faces.application.FacesMessage;
+import javax.faces.application.NavigationHandler;
+import javax.faces.context.FacesContext;
+import javax.faces.event.PhaseEvent;
+import javax.faces.event.PhaseId;
+import javax.faces.event.PhaseListener;
+
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+/**
+ *
+ */
+public final class JbpmPhaseListener implements PhaseListener {
+ private static final long serialVersionUID = 1L;
+
+ public void beforePhase(PhaseEvent phaseEvent) {
+ log.fine("Before phase " + phaseEvent.getPhaseId().toString());
+ }
+
+ public void afterPhase(PhaseEvent phaseEvent) {
+ log.fine("After phase " + phaseEvent.getPhaseId().toString());
+ final FacesContext facesContext = phaseEvent.getFacesContext();
+ final JbpmJsfContextImpl jbpmJsfContext = getJbpmJsfContext(facesContext);
+ if (jbpmJsfContext != null) {
+ if (facesContext.getResponseComplete()) {
+ // No matter what phase, context should be closed.
+ closeContext(jbpmJsfContext);
+ removeJbpmJsfContext(facesContext);
+ } else if (phaseEvent.getPhaseId() == PhaseId.INVOKE_APPLICATION) {
+ // Application was invoked; a new transaction should be begun.
+ handleOutcome(facesContext, jbpmJsfContext);
+ closeContext(jbpmJsfContext);
+ removeJbpmJsfContext(facesContext);
+ } else if (phaseEvent.getPhaseId() == PhaseId.RENDER_RESPONSE) {
+ // Response was rendered and possibly more actions invoked.
+ closeContext(jbpmJsfContext);
+ removeJbpmJsfContext(facesContext);
+ }
+ }
+ }
+
+ private void commitTxnMessages(final FacesContext facesContext, final
JbpmJsfContextImpl jbpmJsfContext) {
+ if (! jbpmJsfContext.isError()) {
+ for (FacesMessage msg : jbpmJsfContext.getMessages()) {
+ facesContext.addMessage(null, msg);
+ }
+ }
+ }
+
+ private void handleOutcome(final FacesContext facesContext, final JbpmJsfContextImpl
jbpmJsfContext) {
+ final NavigationHandler navigationHandler =
facesContext.getApplication().getNavigationHandler();
+ if (jbpmJsfContext.isError()) {
+ navigationHandler.handleNavigation(facesContext,
jbpmJsfContext.getOutcomeActionName(), "error");
+ } else {
+ final String outcome = jbpmJsfContext.getOutcome();
+ if (outcome != null) {
+ navigationHandler.handleNavigation(facesContext,
jbpmJsfContext.getOutcomeActionName(), outcome);
+ }
+ }
+ }
+
+ public PhaseId getPhaseId() {
+ return PhaseId.ANY_PHASE;
+ }
+
+ private JbpmJsfContextImpl getJbpmJsfContext(FacesContext facesContext) {
+ final Map<String,Object> requestMap =
facesContext.getExternalContext().getRequestMap();
+ return (JbpmJsfContextImpl)
requestMap.get(AbstractHandler.JBPM_JSF_CONTEXT_KEY);
+ }
+
+ private void removeJbpmJsfContext(FacesContext facesContext) {
+ final Map<String,Object> requestMap =
facesContext.getExternalContext().getRequestMap();
+ requestMap.remove(AbstractHandler.JBPM_JSF_CONTEXT_KEY);
+ }
+
+ private void closeContext(final JbpmJsfContextImpl jbpmJsfContext) {
+ if (jbpmJsfContext.hasJbpmContext()) {
+ log.fine("Closing jBPM context");
+ if (jbpmJsfContext.isError()) {
+ log.fine("Context has an error status; setting transaction to roll
back");
+ jbpmJsfContext.getJbpmContext().setRollbackOnly();
+ }
+ final FacesContext context = FacesContext.getCurrentInstance();
+ try {
+ jbpmJsfContext.getJbpmContext().close();
+ } catch (RuntimeException ex) {
+ try {
+ jbpmJsfContext.getJbpmContext().setRollbackOnly();
+ } catch (Exception ex2) {
+ log.log(Level.WARNING, "Failed to set rollback on jBPM context
after close failed", ex2);
+ }
+ context.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_ERROR,
"Closing the database context " +
+ "failed", "An exception of type " +
ex.getClass().getName() + " was thrown, with the message: " +
+ ex.getMessage()));
+ return;
+ }
+ commitTxnMessages(context, jbpmJsfContext);
+ }
+ }
+
+ private void startNewTxn(final JbpmJsfContextImpl jbpmJsfContext) {
+ if (jbpmJsfContext.hasJbpmContext()) {
+ final JbpmContext jbpmContext = jbpmJsfContext.getJbpmContext();
+ DbPersistenceService dbPersistenceService = (DbPersistenceService)
jbpmContext.getServices().getPersistenceService();
+ log.fine("Committing transaction");
+ dbPersistenceService.endTransaction();
+ dbPersistenceService.beginTransaction();
+ }
+ }
+
+ private static final Logger log =
Logger.getLogger("org.jbpm.jsf.core.phase.JbpmPhaseListener");
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/phase/ProcessFilePhaseListener.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/phase/ProcessFilePhaseListener.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/phase/ProcessFilePhaseListener.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,149 @@
+package org.jbpm.jsf.core.phase;
+
+import java.io.IOException;
+import java.io.OutputStream;
+import java.util.List;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+import org.jbpm.JbpmConfiguration;
+import org.jbpm.JbpmContext;
+import org.jbpm.graph.def.ProcessDefinition;
+import org.jbpm.jsf.core.config.Configuration;
+import org.jbpm.jsf.core.config.ConfigurationLocator;
+
+import javax.faces.context.ExternalContext;
+import javax.faces.context.FacesContext;
+import javax.faces.event.PhaseEvent;
+import javax.faces.event.PhaseId;
+import javax.faces.event.PhaseListener;
+import javax.servlet.http.HttpServletResponse;
+
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+/**
+ *
+ */
+public final class ProcessFilePhaseListener implements PhaseListener {
+
+ private static final long serialVersionUID = 1L;
+
+ private static final Logger log =
Logger.getLogger("org.jbpm.jsf.core.phase.ProcessFilePhaseListener");
+
+ private Configuration configuration = null;
+
+ public ProcessFilePhaseListener() {
+ }
+
+ public void beforePhase(PhaseEvent event) {
+ log.fine("Entering phase listener");
+ final FacesContext facesContext = event.getFacesContext();
+ final ExternalContext externalContext = facesContext.getExternalContext();
+ synchronized(this) {
+ if (configuration == null) {
+ try {
+ configuration = ConfigurationLocator.getInstance();
+ } catch (Exception ex) {
+ final HttpServletResponse response = (HttpServletResponse)
externalContext.getResponse();
+ try {
+ response.sendError(500, "Error loading jbpm configuration:
" + ex.getMessage());
+ } catch (IOException e) {
+ log.log(Level.SEVERE, "Error sending 500 response for bad
jbpm configuration load", e);
+ } finally {
+ facesContext.responseComplete();
+ }
+ return;
+ }
+ }
+ }
+ final String servletPath = externalContext.getRequestServletPath();
+ final String pathInfo = externalContext.getRequestPathInfo();
+ final String path = servletPath == null ? null : pathInfo == null ? servletPath :
servletPath + pathInfo;
+ if (path == null) {
+ log.fine("Path is null, skipping");
+ return;
+ }
+ final List<Configuration.FileMatcher> fileMatchers =
configuration.getMatchers();
+ if (log.isLoggable(Level.FINE)) {
+ log.fine("Checking path against " + fileMatchers.size() + "
matchers");
+ }
+ for (Configuration.FileMatcher fileMatcher : fileMatchers) {
+ final Pattern pattern = fileMatcher.getPattern();
+ final Matcher matcher = pattern.matcher(path);
+ if (!matcher.matches()) {
+ if (log.isLoggable(Level.FINE)) {
+ log.fine("Request pattern '" + pattern + "'
did NOT match path info '" + path + "'");
+ }
+ } else {
+ if (log.isLoggable(Level.FINE)) {
+ log.fine("Request pattern '" + pattern + "'
MATCHED path info '" + path + "'");
+ }
+ if (matcher.groupCount() < 1) {
+ log.warning("Configuration pattern '" + pattern +
"' does not contain a capturing group for the process ID");
+ continue;
+ }
+ final String idPart = matcher.group(1);
+ final long id = Long.parseLong(idPart);
+ final String contentType = fileMatcher.getContentType();
+ final String file = fileMatcher.getFile();
+ final HttpServletResponse response = (HttpServletResponse)
externalContext.getResponse();
+ final JbpmContext jbpmContext =
JbpmConfiguration.getInstance().createJbpmContext();
+ try {
+ final ProcessDefinition processDefinition =
jbpmContext.getGraphSession().getProcessDefinition(id);
+ if (processDefinition == null) {
+ try {
+ response.sendError(404, "Process definition " + id
+ " does not exist");
+ facesContext.responseComplete();
+ break;
+ } catch (IOException e) {
+ log.log(Level.SEVERE, "Failed to send 404 Not Found to
client", e);
+ }
+ }
+ if (!processDefinition.getFileDefinition().hasFile(file)) {
+ try {
+ response.sendError(404, "Process definition " + id
+ " does not contain file '" + file + "'");
+ facesContext.responseComplete();
+ break;
+ } catch (IOException e) {
+ log.log(Level.SEVERE, "Failed to send 404 Not Found to
client", e);
+ }
+ }
+ final byte[] bytes;
+ bytes = processDefinition.getFileDefinition().getBytes(file);
+ response.setContentLength(bytes.length);
+ response.setContentType(contentType);
+ try {
+ final OutputStream outputStream = response.getOutputStream();
+ try {
+ outputStream.write(bytes);
+ outputStream.flush();
+ } finally {
+ try {
+ outputStream.close();
+ } catch (IOException e) {
+ log.log(Level.WARNING, "Failed to close output
stream", e);
+ }
+ }
+ } catch (IOException e) {
+ log.log(Level.SEVERE, "Failed to send process file",
e);
+ }
+ facesContext.responseComplete();
+ if (log.isLoggable(Level.FINE)) {
+ log.fine("Sent process file '" + path +
"'");
+ }
+ break;
+ } finally {
+ jbpmContext.close();
+ }
+ }
+ }
+ }
+
+ public void afterPhase(PhaseEvent event) {
+ // nothing
+ }
+
+ public PhaseId getPhaseId() {
+ return PhaseId.RENDER_RESPONSE;
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/ui/UITaskForm.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/ui/UITaskForm.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/core/ui/UITaskForm.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,22 @@
+package org.jbpm.jsf.core.ui;
+
+import org.jboss.gravel.common.ui.HasJsfCoreAttributes;
+
+import javax.faces.component.UICommand;
+
+/**
+ *
+ */
+public final class UITaskForm extends UICommand implements HasJsfCoreAttributes {
+ public static final String COMPONENT_FAMILY = "jbpm4jsf.core";
+ public static final String COMPONENT_TYPE = "jbpm4jsf.core.TaskForm";
+ public static final String RENDERER_TYPE = null;
+
+ public UITaskForm() {
+ setRendererType(RENDERER_TYPE);
+ }
+
+ public String getFamily() {
+ return COMPONENT_FAMILY;
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/IdentityLibrary.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/IdentityLibrary.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/IdentityLibrary.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,40 @@
+package org.jbpm.jsf.identity;
+
+import org.jbpm.jsf.identity.handler.AddMembershipHandler;
+import org.jbpm.jsf.identity.handler.CreateGroupHandler;
+import org.jbpm.jsf.identity.handler.CreateUserHandler;
+import org.jbpm.jsf.identity.handler.DeleteGroupHandler;
+import org.jbpm.jsf.identity.handler.DeleteMembershipHandler;
+import org.jbpm.jsf.identity.handler.DeleteUserHandler;
+import org.jbpm.jsf.identity.handler.ListGroupsHandler;
+import org.jbpm.jsf.identity.handler.ListUsersHandler;
+import org.jbpm.jsf.identity.handler.LoadGroupByNameHandler;
+import org.jbpm.jsf.identity.handler.LoadGroupHandler;
+import org.jbpm.jsf.identity.handler.LoadUserHandler;
+import org.jbpm.jsf.identity.handler.VerifyUserHandler;
+
+import com.sun.facelets.tag.AbstractTagLibrary;
+
+/**
+ *
+ */
+public final class IdentityLibrary extends AbstractTagLibrary {
+ public IdentityLibrary() {
+
super("http://jbpm.org/jbpm4jsf/identity");
+
+ // Actions
+
+ addTagHandler("loadUser", LoadUserHandler.class);
+ addTagHandler("loadGroup", LoadGroupHandler.class);
+ addTagHandler("loadGroupByName", LoadGroupByNameHandler.class);
+ addTagHandler("createUser", CreateUserHandler.class);
+ addTagHandler("createGroup", CreateGroupHandler.class);
+ addTagHandler("addMembership", AddMembershipHandler.class);
+ addTagHandler("verifyUser", VerifyUserHandler.class);
+ addTagHandler("listUsers", ListUsersHandler.class);
+ addTagHandler("listGroups", ListGroupsHandler.class);
+ addTagHandler("deleteUser", DeleteUserHandler.class);
+ addTagHandler("deleteMembership", DeleteMembershipHandler.class);
+ addTagHandler("deleteGroup", DeleteGroupHandler.class);
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/action/AddMembershipActionListener.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/action/AddMembershipActionListener.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/action/AddMembershipActionListener.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,81 @@
+package org.jbpm.jsf.identity.action;
+
+import org.jbpm.identity.Group;
+import org.jbpm.identity.Membership;
+import org.jbpm.identity.User;
+import org.jbpm.jsf.JbpmActionListener;
+import org.jbpm.jsf.JbpmJsfContext;
+
+import javax.el.ELContext;
+import javax.el.ValueExpression;
+import javax.faces.context.FacesContext;
+import javax.faces.event.ActionEvent;
+
+/**
+ *
+ */
+public final class AddMembershipActionListener implements JbpmActionListener {
+
+ private final ValueExpression userExpression;
+ private final ValueExpression groupExpression;
+ private final ValueExpression roleExpression;
+ private final ValueExpression targetExpression;
+
+ public AddMembershipActionListener(final ValueExpression userExpression, final
ValueExpression groupExpression, final ValueExpression roleExpression, final
ValueExpression targetExpression) {
+ this.userExpression = userExpression;
+ this.groupExpression = groupExpression;
+ this.roleExpression = roleExpression;
+ this.targetExpression = targetExpression;
+ }
+
+ public String getName() {
+ return "addMembership";
+ }
+
+ public void handleAction(JbpmJsfContext context, ActionEvent event) {
+ try {
+ final FacesContext facesContext = FacesContext.getCurrentInstance();
+ final ELContext elContext = facesContext.getELContext();
+ final User user;
+ if (userExpression == null) {
+ context.setError("Error adding membership", "User
expression is required");
+ return;
+ }
+ final Object userValue = userExpression.getValue(elContext);
+ if (userValue == null) {
+ context.setError("Error adding membership", "User value is
null");
+ return;
+ }
+ user = (User) userValue;
+ final Group group;
+ if (groupExpression == null) {
+ context.setError("Error adding membership", "Group
expression is required");
+ return;
+ }
+ final Object groupValue = groupExpression.getValue(elContext);
+ if (groupValue == null) {
+ context.setError("Error adding membership", "Group value
is null");
+ return;
+ }
+ group = (Group) groupValue;
+ final Membership membership = Membership.create(user, group);
+ if (roleExpression != null) {
+ final Object roleValue = roleExpression.getValue(elContext);
+ if (roleValue != null) {
+ final String roleValueString = roleValue.toString();
+ if (roleValueString.length() > 0) {
+ membership.setRole(roleValueString);
+ }
+ }
+ }
+ if (targetExpression != null) {
+ targetExpression.setValue(elContext, membership);
+ }
+ context.selectOutcome("success");
+ context.addSuccessMessage("Successfully added membership");
+ } catch (Exception ex) {
+ context.setError("Error adding membership", ex);
+ return;
+ }
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/action/CreateGroupActionListener.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/action/CreateGroupActionListener.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/action/CreateGroupActionListener.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,77 @@
+package org.jbpm.jsf.identity.action;
+
+import org.jbpm.identity.Group;
+import org.jbpm.identity.hibernate.IdentitySession;
+import org.jbpm.jsf.JbpmActionListener;
+import org.jbpm.jsf.JbpmJsfContext;
+
+import javax.el.ELContext;
+import javax.el.ValueExpression;
+import javax.faces.context.FacesContext;
+import javax.faces.event.ActionEvent;
+
+/**
+ *
+ */
+public final class CreateGroupActionListener implements JbpmActionListener {
+
+ private final ValueExpression groupNameExpression;
+ private final ValueExpression parentGroupExpression;
+ private final ValueExpression typeExpression;
+ private final ValueExpression targetExpression;
+
+ public CreateGroupActionListener(final ValueExpression groupNameExpression, final
ValueExpression parentGroupExpression, final ValueExpression typeExpression, final
ValueExpression targetExpression) {
+ this.groupNameExpression = groupNameExpression;
+ this.parentGroupExpression = parentGroupExpression;
+ this.typeExpression = typeExpression;
+ this.targetExpression = targetExpression;
+ }
+
+ public String getName() {
+ return "createGroup";
+ }
+
+ public void handleAction(JbpmJsfContext context, ActionEvent event) {
+ try {
+ final FacesContext facesContext = FacesContext.getCurrentInstance();
+ final ELContext elContext = facesContext.getELContext();
+ final IdentitySession identitySession = new
IdentitySession(context.getJbpmContext().getSession());
+ if (groupNameExpression == null) {
+ context.setError("Error creating group", "The group name
expression is missing");
+ return;
+ }
+ final Object groupNameValue = groupNameExpression.getValue(elContext);
+ if (groupNameValue == null) {
+ context.setError("Error creating group", "The group name
value is null");
+ return;
+ }
+ final Group group = new Group(groupNameValue.toString());
+ if (parentGroupExpression != null) {
+ final Object parentGroupValue =
parentGroupExpression.getValue(elContext);
+ if (parentGroupValue instanceof Group) {
+ group.setParent((Group)parentGroupValue);
+ } else if (parentGroupValue != null) {
+ context.setError("Error creating group", "The parent
group is not a Group instance");
+ return;
+ }
+ }
+ if (typeExpression != null) {
+ final Object typeValue = typeExpression.getValue(elContext);
+ if (typeValue == null) {
+ context.setError("Error creating group", "The type
value is null");
+ return;
+ }
+ group.setType(typeValue.toString());
+ }
+ identitySession.saveGroup(group);
+ if (targetExpression != null) {
+ targetExpression.setValue(elContext, group);
+ }
+ context.selectOutcome("success");
+ context.addSuccessMessage("Group created successfully");
+ } catch (Exception ex) {
+ context.setError("Error loading group", ex);
+ return;
+ }
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/action/CreateUserActionListener.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/action/CreateUserActionListener.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/action/CreateUserActionListener.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,85 @@
+package org.jbpm.jsf.identity.action;
+
+import org.jbpm.identity.User;
+import org.jbpm.identity.hibernate.IdentitySession;
+import org.jbpm.jsf.JbpmActionListener;
+import org.jbpm.jsf.JbpmJsfContext;
+
+import javax.el.ELContext;
+import javax.el.ValueExpression;
+import javax.faces.context.FacesContext;
+import javax.faces.event.ActionEvent;
+
+/**
+ *
+ */
+public final class CreateUserActionListener implements JbpmActionListener {
+
+ private final ValueExpression userNameExpression;
+ private final ValueExpression passwordExpression;
+ private final ValueExpression passwordConfirmExpression;
+ private final ValueExpression emailExpression;
+ private final ValueExpression targetExpression;
+
+ public CreateUserActionListener(final ValueExpression userNameExpression, final
ValueExpression passwordExpression, final ValueExpression passwordConfirmExpression, final
ValueExpression emailExpression, final ValueExpression targetExpression) {
+ this.userNameExpression = userNameExpression;
+ this.passwordExpression = passwordExpression;
+ this.passwordConfirmExpression = passwordConfirmExpression;
+ this.emailExpression = emailExpression;
+ this.targetExpression = targetExpression;
+ }
+
+ public String getName() {
+ return "createUser";
+ }
+
+ public void handleAction(JbpmJsfContext context, ActionEvent event) {
+ try {
+ final FacesContext facesContext = FacesContext.getCurrentInstance();
+ final ELContext elContext = facesContext.getELContext();
+ final IdentitySession identitySession = new
IdentitySession(context.getJbpmContext().getSession());
+ if (userNameExpression == null) {
+ context.setError("Error creating user", "The user name
expression is missing");
+ return;
+ }
+ final Object userNameValue = userNameExpression.getValue(elContext);
+ if (userNameValue == null) {
+ context.setError("Error creating user", "The user name
value is null");
+ return;
+ }
+ final User user = new User(userNameValue.toString());
+ if (passwordExpression != null) {
+ final Object passwordValue = passwordExpression.getValue(elContext);
+ if (passwordValue == null) {
+ context.setError("Error creating user", "The password
value is null");
+ return;
+ }
+ if (passwordConfirmExpression != null) {
+ final Object passwordConfirmValue =
passwordConfirmExpression.getValue(elContext);
+ if (! passwordValue.equals(passwordConfirmValue)) {
+ context.setError("Error creating user", "The
password confirmation value does not match the password value");
+ return;
+ }
+ }
+ user.setPassword(passwordValue.toString());
+ }
+ if (emailExpression != null) {
+ final Object emailValue = emailExpression.getValue(elContext);
+ if (emailValue == null) {
+ context.setError("Error creating user", "The email
value is null");
+ return;
+ }
+ user.setEmail(emailValue.toString());
+ }
+ identitySession.saveUser(user);
+ if (targetExpression != null) {
+ targetExpression.setValue(elContext, user);
+ }
+ context.selectOutcome("success");
+ context.addSuccessMessage("User created successfully");
+ } catch (Exception ex) {
+ context.setError("Error loading user", ex);
+ return;
+ }
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/action/DeleteGroupActionListener.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/action/DeleteGroupActionListener.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/action/DeleteGroupActionListener.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,37 @@
+package org.jbpm.jsf.identity.action;
+
+import org.jbpm.identity.Group;
+import org.jbpm.jsf.JbpmActionListener;
+import org.jbpm.jsf.JbpmJsfContext;
+
+import javax.el.ELContext;
+import javax.el.ValueExpression;
+import javax.faces.context.FacesContext;
+import javax.faces.event.ActionEvent;
+
+/**
+ *
+ */
+public final class DeleteGroupActionListener implements JbpmActionListener {
+ private final ValueExpression groupExpression;
+
+ public DeleteGroupActionListener(final ValueExpression groupExpression) {
+ this.groupExpression = groupExpression;
+ }
+
+ public String getName() {
+ return "deleteGroup";
+ }
+
+ public void handleAction(JbpmJsfContext context, ActionEvent event) {
+ try {
+ final FacesContext facesContext = FacesContext.getCurrentInstance();
+ final ELContext elContext = facesContext.getELContext();
+ final Group group = (Group) groupExpression.getValue(elContext);
+ context.getJbpmContext().getSession().delete(group);
+ context.addSuccessMessage("Successfully deleted group");
+ } catch (Exception ex) {
+ context.setError("Failed to delete group", ex);
+ }
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/action/DeleteMembershipActionListener.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/action/DeleteMembershipActionListener.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/action/DeleteMembershipActionListener.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,55 @@
+package org.jbpm.jsf.identity.action;
+
+import java.util.Iterator;
+import java.util.Set;
+import org.jbpm.identity.Membership;
+import org.jbpm.identity.User;
+import org.jbpm.identity.hibernate.IdentitySession;
+import org.jbpm.jsf.JbpmActionListener;
+import org.jbpm.jsf.JbpmJsfContext;
+
+import javax.el.ELContext;
+import javax.el.ValueExpression;
+import javax.faces.context.FacesContext;
+import javax.faces.event.ActionEvent;
+
+/**
+ *
+ */
+public final class DeleteMembershipActionListener implements JbpmActionListener {
+ private final ValueExpression userExpression;
+ private final ValueExpression membershipIdExpression;
+
+
+ public DeleteMembershipActionListener(final ValueExpression userExpression, final
ValueExpression membershipIdExpression) {
+ this.userExpression = userExpression;
+ this.membershipIdExpression = membershipIdExpression;
+ }
+
+ public String getName() {
+ return "deleteMembership";
+ }
+
+ @SuppressWarnings ({"unchecked"})
+ public void handleAction(JbpmJsfContext context, ActionEvent event) {
+ try {
+ final FacesContext facesContext = FacesContext.getCurrentInstance();
+ final ELContext elContext = facesContext.getELContext();
+ final User user = (User) userExpression.getValue(elContext);
+ final long membershipId =
((Long)membershipIdExpression.getValue(elContext)).longValue();
+ final Set<Membership> membershipSet = (Set<Membership>)
user.getMemberships();
+ final Iterator<Membership> it = membershipSet.iterator();
+ while (it.hasNext()) {
+ Membership membership = it.next();
+ if (membership.getId() == membershipId) {
+ it.remove();
+ context.getJbpmContext().getSession().delete(membership);
+ break;
+ }
+ }
+ context.addSuccessMessage("Successfully deleted membership");
+ } catch (Exception ex) {
+ context.setError("Failed to delete membership", ex);
+ }
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/action/DeleteUserActionListener.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/action/DeleteUserActionListener.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/action/DeleteUserActionListener.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,40 @@
+package org.jbpm.jsf.identity.action;
+
+import org.hibernate.Session;
+import org.jbpm.identity.User;
+import org.jbpm.jsf.JbpmActionListener;
+import org.jbpm.jsf.JbpmJsfContext;
+
+import javax.el.ELContext;
+import javax.el.ValueExpression;
+import javax.faces.context.FacesContext;
+import javax.faces.event.ActionEvent;
+
+/**
+ *
+ */
+public final class DeleteUserActionListener implements JbpmActionListener {
+ private final ValueExpression userExpression;
+
+ public DeleteUserActionListener(final ValueExpression userExpression) {
+ this.userExpression = userExpression;
+ }
+
+ public String getName() {
+ return "deleteUser";
+ }
+
+ @SuppressWarnings ({"unchecked"})
+ public void handleAction(JbpmJsfContext context, ActionEvent event) {
+ try {
+ final FacesContext facesContext = FacesContext.getCurrentInstance();
+ final ELContext elContext = facesContext.getELContext();
+ final User user = (User) userExpression.getValue(elContext);
+ final Session session = context.getJbpmContext().getSession();
+ session.delete(user);
+ context.addSuccessMessage("Successfully deleted user");
+ } catch (Exception ex) {
+ context.setError("Failed to delete user", ex);
+ }
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/action/ListGroupsActionListener.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/action/ListGroupsActionListener.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/action/ListGroupsActionListener.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,37 @@
+package org.jbpm.jsf.identity.action;
+
+import org.jbpm.jsf.JbpmActionListener;
+import org.jbpm.jsf.JbpmJsfContext;
+
+import javax.el.ELContext;
+import javax.el.ValueExpression;
+import javax.faces.context.FacesContext;
+import javax.faces.event.ActionEvent;
+
+/**
+ *
+ */
+public final class ListGroupsActionListener implements JbpmActionListener {
+ private final ValueExpression targetExpression;
+
+ public ListGroupsActionListener(final ValueExpression targetExpression) {
+ this.targetExpression = targetExpression;
+ }
+
+ public String getName() {
+ return "listGroups";
+ }
+
+ public void handleAction(JbpmJsfContext context, ActionEvent event) {
+ try {
+ final FacesContext facesContext = FacesContext.getCurrentInstance();
+ final ELContext elContext = facesContext.getELContext();
+ // TODO - This should be an API method
+ targetExpression.setValue(elContext,
context.getJbpmContext().getSession().createQuery("from
org.jbpm.identity.Group").list());
+ context.selectOutcome("success");
+ } catch (Exception ex) {
+ context.setError("Error loading group list", ex);
+ return;
+ }
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/action/ListUsersActionListener.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/action/ListUsersActionListener.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/action/ListUsersActionListener.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,38 @@
+package org.jbpm.jsf.identity.action;
+
+import org.jbpm.identity.hibernate.IdentitySession;
+import org.jbpm.jsf.JbpmActionListener;
+import org.jbpm.jsf.JbpmJsfContext;
+
+import javax.el.ELContext;
+import javax.el.ValueExpression;
+import javax.faces.context.FacesContext;
+import javax.faces.event.ActionEvent;
+
+/**
+ *
+ */
+public final class ListUsersActionListener implements JbpmActionListener {
+ private final ValueExpression targetExpression;
+
+ public ListUsersActionListener(final ValueExpression targetExpression) {
+ this.targetExpression = targetExpression;
+ }
+
+ public String getName() {
+ return "listUsers";
+ }
+
+ public void handleAction(JbpmJsfContext context, ActionEvent event) {
+ try {
+ final FacesContext facesContext = FacesContext.getCurrentInstance();
+ final ELContext elContext = facesContext.getELContext();
+ final IdentitySession identitySession = new
IdentitySession(context.getJbpmContext().getSession());
+ targetExpression.setValue(elContext, identitySession.getUsers());
+ context.selectOutcome("success");
+ } catch (Exception ex) {
+ context.setError("Error loading user list", ex);
+ return;
+ }
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/action/LoadGroupActionListener.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/action/LoadGroupActionListener.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/action/LoadGroupActionListener.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,58 @@
+package org.jbpm.jsf.identity.action;
+
+import org.jbpm.identity.Group;
+import org.jbpm.identity.hibernate.IdentitySession;
+import org.jbpm.jsf.JbpmActionListener;
+import org.jbpm.jsf.JbpmJsfContext;
+
+import javax.el.ELContext;
+import javax.el.ValueExpression;
+import javax.faces.context.FacesContext;
+import javax.faces.event.ActionEvent;
+
+/**
+ *
+ */
+public final class LoadGroupActionListener implements JbpmActionListener {
+
+ private final ValueExpression idExpression;
+ private final ValueExpression targetExpression;
+
+ public LoadGroupActionListener(final ValueExpression idExpression, final
ValueExpression targetExpression) {
+ this.idExpression = idExpression;
+ this.targetExpression = targetExpression;
+ }
+
+ public String getName() {
+ return "loadGroup";
+ }
+
+ public void handleAction(JbpmJsfContext context, ActionEvent event) {
+ try {
+ final FacesContext facesContext = FacesContext.getCurrentInstance();
+ final ELContext elContext = facesContext.getELContext();
+ final Object idValue = idExpression.getValue(elContext);
+ final IdentitySession identitySession = new
IdentitySession(context.getJbpmContext().getSession());
+ if (idValue == null) {
+ context.setError("Error loading group", "The ID value is
null");
+ return;
+ }
+ final long id;
+ if (idValue instanceof Long) {
+ id = ((Long)idValue).longValue();
+ } else {
+ id = Long.valueOf(idValue.toString()).longValue();
+ }
+ final Group group = identitySession.loadGroup(id);
+ if (group == null) {
+ context.setError("Error loading group", "No group was
found with an ID of " + id);
+ return;
+ }
+ targetExpression.setValue(elContext, group);
+ context.selectOutcome("success");
+ } catch (Exception ex) {
+ context.setError("Error loading group", ex);
+ return;
+ }
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/action/LoadGroupByNameActionListener.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/action/LoadGroupByNameActionListener.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/action/LoadGroupByNameActionListener.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,53 @@
+package org.jbpm.jsf.identity.action;
+
+import org.jbpm.identity.Group;
+import org.jbpm.identity.hibernate.IdentitySession;
+import org.jbpm.jsf.JbpmActionListener;
+import org.jbpm.jsf.JbpmJsfContext;
+
+import javax.el.ELContext;
+import javax.el.ValueExpression;
+import javax.faces.context.FacesContext;
+import javax.faces.event.ActionEvent;
+
+/**
+ *
+ */
+public final class LoadGroupByNameActionListener implements JbpmActionListener {
+
+ private final ValueExpression groupNameExpression;
+ private final ValueExpression targetExpression;
+
+ public LoadGroupByNameActionListener(final ValueExpression groupNameExpression, final
ValueExpression targetExpression) {
+ this.groupNameExpression = groupNameExpression;
+ this.targetExpression = targetExpression;
+ }
+
+ public String getName() {
+ return "loadGroupByName";
+ }
+
+ public void handleAction(JbpmJsfContext context, ActionEvent event) {
+ try {
+ final FacesContext facesContext = FacesContext.getCurrentInstance();
+ final ELContext elContext = facesContext.getELContext();
+ final Object nameValue = groupNameExpression.getValue(elContext);
+ final IdentitySession identitySession = new
IdentitySession(context.getJbpmContext().getSession());
+ if (nameValue == null) {
+ context.setError("Error loading group", "The group name
value is null");
+ return;
+ }
+ final String groupName = nameValue.toString();
+ final Group group = identitySession.getGroupByName(groupName);
+ if (group == null) {
+ context.setError("Error loading group", "No group was
found named '" + groupName + "'");
+ return;
+ }
+ targetExpression.setValue(elContext, group);
+ context.selectOutcome("success");
+ } catch (Exception ex) {
+ context.setError("Error loading group", ex);
+ return;
+ }
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/action/LoadUserActionListener.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/action/LoadUserActionListener.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/action/LoadUserActionListener.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,58 @@
+package org.jbpm.jsf.identity.action;
+
+import org.jbpm.jsf.JbpmActionListener;
+import org.jbpm.jsf.JbpmJsfContext;
+import org.jbpm.identity.User;
+import org.jbpm.identity.hibernate.IdentitySession;
+
+import javax.faces.event.ActionEvent;
+import javax.faces.context.FacesContext;
+import javax.el.ValueExpression;
+import javax.el.ELContext;
+
+/**
+ *
+ */
+public final class LoadUserActionListener implements JbpmActionListener {
+
+ private final ValueExpression idExpression;
+ private final ValueExpression targetExpression;
+
+ public LoadUserActionListener(final ValueExpression idExpression, final
ValueExpression targetExpression) {
+ this.idExpression = idExpression;
+ this.targetExpression = targetExpression;
+ }
+
+ public String getName() {
+ return "loadUser";
+ }
+
+ public void handleAction(JbpmJsfContext context, ActionEvent event) {
+ try {
+ final FacesContext facesContext = FacesContext.getCurrentInstance();
+ final ELContext elContext = facesContext.getELContext();
+ final Object idValue = idExpression.getValue(elContext);
+ final IdentitySession identitySession = new
IdentitySession(context.getJbpmContext().getSession());
+ if (idValue == null) {
+ context.setError("Error loading user", "The ID value is
null");
+ return;
+ }
+ final long id;
+ if (idValue instanceof Long) {
+ id = ((Long)idValue).longValue();
+ } else {
+ id = Long.valueOf(idValue.toString()).longValue();
+ }
+ final User user = identitySession.loadUser(id);
+ if (user == null) {
+ context.setError("Error loading user", "No user was found
with an ID of " + id);
+ return;
+ }
+ targetExpression.setValue(elContext, user);
+ context.selectOutcome("success");
+ } catch (Exception ex) {
+ context.setError("Error loading user", ex);
+ return;
+ }
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/action/VerifyUserActionListener.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/action/VerifyUserActionListener.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/action/VerifyUserActionListener.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,59 @@
+package org.jbpm.jsf.identity.action;
+
+import org.jbpm.jsf.JbpmActionListener;
+import org.jbpm.jsf.JbpmJsfContext;
+import org.jbpm.identity.hibernate.IdentitySession;
+
+import javax.el.ValueExpression;
+import javax.el.ELContext;
+import javax.faces.event.ActionEvent;
+import javax.faces.context.FacesContext;
+
+/**
+ *
+ */
+public final class VerifyUserActionListener implements JbpmActionListener {
+ private final ValueExpression userNameExpression;
+ private final ValueExpression passwordExpression;
+ private final ValueExpression userIdTargetExpression;
+
+ public VerifyUserActionListener(final ValueExpression userNameExpression, final
ValueExpression passwordExpression, final ValueExpression userIdTargetExpression) {
+ this.userNameExpression = userNameExpression;
+ this.passwordExpression = passwordExpression;
+ this.userIdTargetExpression = userIdTargetExpression;
+ }
+
+ public String getName() {
+ return "verifyUser";
+ }
+
+ public void handleAction(JbpmJsfContext context, ActionEvent event) {
+ try {
+ final FacesContext facesContext = FacesContext.getCurrentInstance();
+ final ELContext elContext = facesContext.getELContext();
+ final IdentitySession identitySession = new
IdentitySession(context.getJbpmContext().getSession());
+ final Object userNameValue = userNameExpression.getValue(elContext);
+ if (userNameValue == null) {
+ context.setError("Error verifying user", "User name is
null");
+ return;
+ }
+ final Object passwordValue = passwordExpression.getValue(elContext);
+ if (passwordValue == null) {
+ context.setError("Error verifying user", "Password is
null");
+ return;
+ }
+ final Object id = identitySession.verify(userNameValue.toString(),
passwordValue.toString());
+ if (id == null) {
+ context.setError("Invalid user name or password");
+ return;
+ }
+ if (userIdTargetExpression != null) {
+ userIdTargetExpression.setValue(elContext, id);
+ }
+ context.selectOutcome("success");
+ } catch (Exception ex) {
+ context.setError("Error verifying user", ex);
+ return;
+ }
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/handler/AddMembershipHandler.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/handler/AddMembershipHandler.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/handler/AddMembershipHandler.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,69 @@
+package org.jbpm.jsf.identity.handler;
+
+import org.jboss.gravel.common.annotation.TldTag;
+import org.jboss.gravel.common.annotation.TldAttribute;
+import org.jbpm.identity.User;
+import org.jbpm.identity.Group;
+import org.jbpm.identity.Membership;
+import org.jbpm.jsf.core.handler.AbstractHandler;
+import org.jbpm.jsf.JbpmActionListener;
+import org.jbpm.jsf.identity.action.AddMembershipActionListener;
+
+import com.sun.facelets.tag.TagAttribute;
+import com.sun.facelets.tag.TagConfig;
+import com.sun.facelets.FaceletContext;
+
+/**
+ *
+ */
+@TldTag (
+ name = "addMembership",
+ description = "Add a group membership to a user.",
+ attributes = {
+ @TldAttribute (
+ name = "user",
+ required = true,
+ description = "The user to whom the membership is granted.",
+ deferredType = User.class
+ ),
+ @TldAttribute (
+ name = "group",
+ required = true,
+ description = "The group that the user should become a member
of.",
+ deferredType = Group.class
+ ),
+ @TldAttribute (
+ name = "role",
+ description = "The name of the role."
+ ),
+ @TldAttribute (
+ name = "target",
+ description = "An EL expression into which the created membership should
be stored.",
+ deferredType = Membership.class
+ )
+ }
+)
+public final class AddMembershipHandler extends AbstractHandler {
+
+ private final TagAttribute userTagAttribute;
+ private final TagAttribute groupTagAttribute;
+ private final TagAttribute roleTagAttribute;
+ private final TagAttribute targetTagAttribute;
+
+ public AddMembershipHandler(final TagConfig config) {
+ super(config);
+ userTagAttribute = getRequiredAttribute("user");
+ groupTagAttribute = getRequiredAttribute("group");
+ roleTagAttribute = getAttribute("role");
+ targetTagAttribute = getAttribute("target");
+ }
+
+ protected JbpmActionListener getListener(final FaceletContext ctx) {
+ return new AddMembershipActionListener(
+ getValueExpression(userTagAttribute, ctx, User.class),
+ getValueExpression(groupTagAttribute, ctx, Group.class),
+ getValueExpression(roleTagAttribute, ctx, String.class),
+ getValueExpression(targetTagAttribute, ctx, Membership.class)
+ );
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/handler/CreateGroupHandler.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/handler/CreateGroupHandler.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/handler/CreateGroupHandler.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,64 @@
+package org.jbpm.jsf.identity.handler;
+
+import org.jboss.gravel.common.annotation.TldAttribute;
+import org.jboss.gravel.common.annotation.TldTag;
+import org.jbpm.identity.Group;
+import org.jbpm.jsf.JbpmActionListener;
+import org.jbpm.jsf.core.handler.AbstractHandler;
+import org.jbpm.jsf.identity.action.CreateGroupActionListener;
+
+import com.sun.facelets.FaceletContext;
+import com.sun.facelets.tag.TagAttribute;
+import com.sun.facelets.tag.TagConfig;
+
+/**
+ *
+ */
+@TldTag (
+ name = "createGroup",
+ description = "Create a new group and save it in the database.",
+ attributes = {
+ @TldAttribute (
+ name = "groupName",
+ required = true,
+ description = "The name of the group to create."
+ ),
+ @TldAttribute (
+ name = "parentGroup",
+ description = "The parent group, if any.",
+ deferredType = Group.class
+ ),
+ @TldAttribute (
+ name = "type",
+ description = "The type of the new group."
+ ),
+ @TldAttribute (
+ name = "target",
+ description = "An EL expression into which the created group should be
stored.",
+ deferredType = Group.class
+ )
+ }
+)
+public final class CreateGroupHandler extends AbstractHandler {
+ private final TagAttribute groupNameTagAttribute;
+ private final TagAttribute parentGroupTagAttribute;
+ private final TagAttribute typeTagAttribute;
+ private final TagAttribute targetTagAttribute;
+
+ public CreateGroupHandler(final TagConfig config) {
+ super(config);
+ groupNameTagAttribute = getRequiredAttribute("groupName");
+ parentGroupTagAttribute = getAttribute("parentGroup");
+ typeTagAttribute = getRequiredAttribute("type");
+ targetTagAttribute = getAttribute("target");
+ }
+
+ protected JbpmActionListener getListener(final FaceletContext ctx) {
+ return new CreateGroupActionListener(
+ getValueExpression(groupNameTagAttribute, ctx, String.class),
+ getValueExpression(parentGroupTagAttribute, ctx, Group.class),
+ getValueExpression(typeTagAttribute, ctx, String.class),
+ getValueExpression(targetTagAttribute, ctx, Group.class)
+ );
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/handler/CreateUserHandler.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/handler/CreateUserHandler.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/handler/CreateUserHandler.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,71 @@
+package org.jbpm.jsf.identity.handler;
+
+import org.jboss.gravel.common.annotation.TldAttribute;
+import org.jboss.gravel.common.annotation.TldTag;
+import org.jbpm.identity.User;
+import org.jbpm.jsf.JbpmActionListener;
+import org.jbpm.jsf.core.handler.AbstractHandler;
+import org.jbpm.jsf.identity.action.CreateUserActionListener;
+
+import com.sun.facelets.FaceletContext;
+import com.sun.facelets.tag.TagAttribute;
+import com.sun.facelets.tag.TagConfig;
+
+/**
+ *
+ */
+@TldTag (
+ name = "createUser",
+ description = "Create a new user and save it in the database.",
+ attributes = {
+ @TldAttribute (
+ name = "userName",
+ required = true,
+ description = "The user name of the user to create."
+ ),
+ @TldAttribute (
+ name = "password",
+ description = "The password of the new user."
+ ),
+ @TldAttribute (
+ name = "passwordConfirm",
+ description = "The password of the new user again. If this value does
not match the value of the " +
+ "<code>password</code> attribute, user creation will
fail."
+ ),
+ @TldAttribute (
+ name = "email",
+ description = "The email of the new user."
+ ),
+ @TldAttribute (
+ name = "target",
+ description = "An EL expression into which the created user should be
stored.",
+ deferredType = User.class
+ )
+ }
+)
+public final class CreateUserHandler extends AbstractHandler {
+ private final TagAttribute userNameTagAttribute;
+ private final TagAttribute passwordTagAttribute;
+ private final TagAttribute passwordConfirmTagAttribute;
+ private final TagAttribute emailTagAttribute;
+ private final TagAttribute targetTagAttribute;
+
+ public CreateUserHandler(final TagConfig config) {
+ super(config);
+ userNameTagAttribute = getRequiredAttribute("userName");
+ passwordTagAttribute = getAttribute("password");
+ passwordConfirmTagAttribute = getAttribute("passwordConfirm");
+ emailTagAttribute = getAttribute("email");
+ targetTagAttribute = getAttribute("target");
+ }
+
+ protected JbpmActionListener getListener(final FaceletContext ctx) {
+ return new CreateUserActionListener(
+ getValueExpression(userNameTagAttribute, ctx, String.class),
+ getValueExpression(passwordTagAttribute, ctx, String.class),
+ getValueExpression(passwordConfirmTagAttribute, ctx, String.class),
+ getValueExpression(emailTagAttribute, ctx, String.class),
+ getValueExpression(targetTagAttribute, ctx, User.class)
+ );
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/handler/DeleteGroupHandler.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/handler/DeleteGroupHandler.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/handler/DeleteGroupHandler.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,42 @@
+package org.jbpm.jsf.identity.handler;
+
+import org.jboss.gravel.common.annotation.TldAttribute;
+import org.jboss.gravel.common.annotation.TldTag;
+import org.jbpm.identity.Group;
+import org.jbpm.jsf.JbpmActionListener;
+import org.jbpm.jsf.core.handler.AbstractHandler;
+import org.jbpm.jsf.identity.action.DeleteGroupActionListener;
+
+import com.sun.facelets.FaceletContext;
+import com.sun.facelets.tag.TagAttribute;
+import com.sun.facelets.tag.TagConfig;
+
+/**
+ *
+ */
+@TldTag (
+ name = "deleteGroup",
+ description = "Delete a group from the database.",
+ attributes = {
+ @TldAttribute (
+ name = "group",
+ description = "The group to delete.",
+ required = true,
+ deferredType = Group.class
+ )
+ }
+)
+public final class DeleteGroupHandler extends AbstractHandler {
+ private final TagAttribute groupAttribute;
+
+ public DeleteGroupHandler(final TagConfig config) {
+ super(config);
+ groupAttribute = getRequiredAttribute("group");
+ }
+
+ protected JbpmActionListener getListener(final FaceletContext ctx) {
+ return new DeleteGroupActionListener(
+ getValueExpression(groupAttribute, ctx, Group.class)
+ );
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/handler/DeleteMembershipHandler.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/handler/DeleteMembershipHandler.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/handler/DeleteMembershipHandler.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,51 @@
+package org.jbpm.jsf.identity.handler;
+
+import org.jboss.gravel.common.annotation.TldAttribute;
+import org.jboss.gravel.common.annotation.TldTag;
+import org.jbpm.identity.User;
+import org.jbpm.jsf.JbpmActionListener;
+import org.jbpm.jsf.core.handler.AbstractHandler;
+import org.jbpm.jsf.identity.action.DeleteMembershipActionListener;
+
+import com.sun.facelets.FaceletContext;
+import com.sun.facelets.tag.TagAttribute;
+import com.sun.facelets.tag.TagConfig;
+
+/**
+ *
+ */
+@TldTag (
+ name = "deleteMembership",
+ description = "Delete a membership from the database.",
+ attributes = {
+ @TldAttribute (
+ name = "user",
+ description = "The user containing the membership to delete.",
+ required = true,
+ deferredType = User.class
+ ),
+ @TldAttribute (
+ name = "membershipId",
+ description = "The ID of the membership to delete.",
+ required = true,
+ deferredType = long.class
+ )
+ }
+)
+public final class DeleteMembershipHandler extends AbstractHandler {
+ private final TagAttribute userAttribute;
+ private final TagAttribute membershipIdAttribute;
+
+ public DeleteMembershipHandler(final TagConfig config) {
+ super(config);
+ userAttribute = getRequiredAttribute("user");
+ membershipIdAttribute = getRequiredAttribute("membershipId");
+ }
+
+ protected JbpmActionListener getListener(final FaceletContext ctx) {
+ return new DeleteMembershipActionListener(
+ getValueExpression(userAttribute, ctx, User.class),
+ getValueExpression(membershipIdAttribute, ctx, Long.class)
+ );
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/handler/DeleteUserHandler.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/handler/DeleteUserHandler.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/handler/DeleteUserHandler.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,42 @@
+package org.jbpm.jsf.identity.handler;
+
+import org.jboss.gravel.common.annotation.TldAttribute;
+import org.jboss.gravel.common.annotation.TldTag;
+import org.jbpm.identity.User;
+import org.jbpm.jsf.JbpmActionListener;
+import org.jbpm.jsf.core.handler.AbstractHandler;
+import org.jbpm.jsf.identity.action.DeleteUserActionListener;
+
+import com.sun.facelets.FaceletContext;
+import com.sun.facelets.tag.TagAttribute;
+import com.sun.facelets.tag.TagConfig;
+
+/**
+ *
+ */
+@TldTag (
+ name = "deleteUser",
+ description = "Delete a user from the database.",
+ attributes = {
+ @TldAttribute (
+ name = "user",
+ description = "The user to delete.",
+ required = true,
+ deferredType = User.class
+ )
+ }
+)
+public final class DeleteUserHandler extends AbstractHandler {
+ private final TagAttribute userAttribute;
+
+ public DeleteUserHandler(final TagConfig config) {
+ super(config);
+ userAttribute = getRequiredAttribute("user");
+ }
+
+ protected JbpmActionListener getListener(final FaceletContext ctx) {
+ return new DeleteUserActionListener(
+ getValueExpression(userAttribute, ctx, User.class)
+ );
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/handler/ListGroupsHandler.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/handler/ListGroupsHandler.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/handler/ListGroupsHandler.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,42 @@
+package org.jbpm.jsf.identity.handler;
+
+import java.util.List;
+import org.jboss.gravel.common.annotation.TldAttribute;
+import org.jboss.gravel.common.annotation.TldTag;
+import org.jbpm.jsf.JbpmActionListener;
+import org.jbpm.jsf.core.handler.AbstractHandler;
+import org.jbpm.jsf.identity.action.ListGroupsActionListener;
+
+import com.sun.facelets.FaceletContext;
+import com.sun.facelets.tag.TagAttribute;
+import com.sun.facelets.tag.TagConfig;
+
+/**
+ *
+ */
+@TldTag (
+ name = "listGroups",
+ description = "Read the list of groups from the database.",
+ attributes = {
+ @TldAttribute (
+ name = "target",
+ description = "An EL expression into which the group list should be
stored.",
+ required = true,
+ deferredType = List.class
+ )
+ }
+)
+public final class ListGroupsHandler extends AbstractHandler {
+ private final TagAttribute targetTagAttribute;
+
+ public ListGroupsHandler(final TagConfig config) {
+ super(config);
+ targetTagAttribute = getRequiredAttribute("target");
+ }
+
+ protected JbpmActionListener getListener(final FaceletContext ctx) {
+ return new ListGroupsActionListener(
+ getValueExpression(targetTagAttribute, ctx, List.class)
+ );
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/handler/ListUsersHandler.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/handler/ListUsersHandler.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/handler/ListUsersHandler.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,42 @@
+package org.jbpm.jsf.identity.handler;
+
+import java.util.List;
+import org.jboss.gravel.common.annotation.TldAttribute;
+import org.jboss.gravel.common.annotation.TldTag;
+import org.jbpm.jsf.JbpmActionListener;
+import org.jbpm.jsf.core.handler.AbstractHandler;
+import org.jbpm.jsf.identity.action.ListUsersActionListener;
+
+import com.sun.facelets.FaceletContext;
+import com.sun.facelets.tag.TagAttribute;
+import com.sun.facelets.tag.TagConfig;
+
+/**
+ *
+ */
+@TldTag (
+ name = "listUsers",
+ description = "Read the list of users from the database.",
+ attributes = {
+ @TldAttribute (
+ name = "target",
+ description = "An EL expression into which the user list should be
stored.",
+ required = true,
+ deferredType = List.class
+ )
+ }
+)
+public final class ListUsersHandler extends AbstractHandler {
+ private final TagAttribute targetTagAttribute;
+
+ public ListUsersHandler(final TagConfig config) {
+ super(config);
+ targetTagAttribute = getRequiredAttribute("target");
+ }
+
+ protected JbpmActionListener getListener(final FaceletContext ctx) {
+ return new ListUsersActionListener(
+ getValueExpression(targetTagAttribute, ctx, List.class)
+ );
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/handler/LoadGroupByNameHandler.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/handler/LoadGroupByNameHandler.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/handler/LoadGroupByNameHandler.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,50 @@
+package org.jbpm.jsf.identity.handler;
+
+import org.jboss.gravel.common.annotation.TldAttribute;
+import org.jboss.gravel.common.annotation.TldTag;
+import org.jbpm.identity.Group;
+import org.jbpm.jsf.JbpmActionListener;
+import org.jbpm.jsf.core.handler.AbstractHandler;
+import org.jbpm.jsf.identity.action.LoadGroupByNameActionListener;
+
+import com.sun.facelets.FaceletContext;
+import com.sun.facelets.tag.TagAttribute;
+import com.sun.facelets.tag.TagConfig;
+
+/**
+ *
+ */
+@TldTag (
+ name = "loadGroupByName",
+ description = "Read a group from the database by name.",
+ attributes = {
+ @TldAttribute (
+ name = "groupName",
+ description = "The name of the group to load.",
+ required = true
+ ),
+ @TldAttribute (
+ name = "target",
+ description = "An EL expression into which the group should be
stored.",
+ required = true,
+ deferredType = Group.class
+ )
+ }
+)
+public final class LoadGroupByNameHandler extends AbstractHandler {
+ private final TagAttribute groupNameTagAttribute;
+ private final TagAttribute targetTagAttribute;
+
+ public LoadGroupByNameHandler(final TagConfig config) {
+ super(config);
+ groupNameTagAttribute = getRequiredAttribute("groupName");
+ targetTagAttribute = getRequiredAttribute("target");
+ }
+
+ protected JbpmActionListener getListener(final FaceletContext ctx) {
+ return new LoadGroupByNameActionListener(
+ getValueExpression(groupNameTagAttribute, ctx, String.class),
+ getValueExpression(targetTagAttribute, ctx, Group.class)
+ );
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/handler/LoadGroupHandler.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/handler/LoadGroupHandler.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/handler/LoadGroupHandler.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,51 @@
+package org.jbpm.jsf.identity.handler;
+
+import org.jbpm.jsf.core.handler.AbstractHandler;
+import org.jbpm.jsf.JbpmActionListener;
+import org.jbpm.jsf.identity.action.LoadGroupActionListener;
+import org.jbpm.identity.Group;
+import org.jboss.gravel.common.annotation.TldTag;
+import org.jboss.gravel.common.annotation.TldAttribute;
+
+import com.sun.facelets.tag.TagAttribute;
+import com.sun.facelets.tag.TagConfig;
+import com.sun.facelets.FaceletContext;
+
+/**
+ *
+ */
+@TldTag (
+ name = "loadGroup",
+ description = "Read a group from the database.",
+ attributes = {
+ @TldAttribute (
+ name = "id",
+ description = "The ID of the group to load.",
+ required = true,
+ deferredType = long.class
+ ),
+ @TldAttribute (
+ name = "target",
+ description = "An EL expression into which the group should be
stored.",
+ required = true,
+ deferredType = Group.class
+ )
+ }
+)
+public final class LoadGroupHandler extends AbstractHandler {
+ private final TagAttribute idTagAttribute;
+ private final TagAttribute targetTagAttribute;
+
+ public LoadGroupHandler(final TagConfig config) {
+ super(config);
+ idTagAttribute = getRequiredAttribute("id");
+ targetTagAttribute = getRequiredAttribute("target");
+ }
+
+ protected JbpmActionListener getListener(final FaceletContext ctx) {
+ return new LoadGroupActionListener(
+ getValueExpression(idTagAttribute, ctx, Long.class),
+ getValueExpression(targetTagAttribute, ctx, Group.class)
+ );
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/handler/LoadUserHandler.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/handler/LoadUserHandler.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/handler/LoadUserHandler.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,51 @@
+package org.jbpm.jsf.identity.handler;
+
+import org.jbpm.jsf.core.handler.AbstractHandler;
+import org.jbpm.jsf.JbpmActionListener;
+import org.jbpm.jsf.identity.action.LoadUserActionListener;
+import org.jbpm.identity.User;
+import org.jboss.gravel.common.annotation.TldTag;
+import org.jboss.gravel.common.annotation.TldAttribute;
+
+import com.sun.facelets.FaceletContext;
+import com.sun.facelets.tag.TagConfig;
+import com.sun.facelets.tag.TagAttribute;
+
+/**
+ *
+ */
+@TldTag (
+ name = "loadUser",
+ description = "Read a user from the database.",
+ attributes = {
+ @TldAttribute (
+ name = "id",
+ description = "The ID of the user to load.",
+ required = true,
+ deferredType = long.class
+ ),
+ @TldAttribute (
+ name = "target",
+ description = "An EL expression into which the user should be
stored.",
+ required = true,
+ deferredType = User.class
+ )
+ }
+)
+public final class LoadUserHandler extends AbstractHandler {
+ private final TagAttribute idTagAttribute;
+ private final TagAttribute targetTagAttribute;
+
+ public LoadUserHandler(final TagConfig config) {
+ super(config);
+ idTagAttribute = getRequiredAttribute("id");
+ targetTagAttribute = getRequiredAttribute("target");
+ }
+
+ protected JbpmActionListener getListener(final FaceletContext ctx) {
+ return new LoadUserActionListener(
+ getValueExpression(idTagAttribute, ctx, Long.class),
+ getValueExpression(targetTagAttribute, ctx, User.class)
+ );
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/handler/VerifyUserHandler.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/handler/VerifyUserHandler.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/handler/VerifyUserHandler.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,33 @@
+package org.jbpm.jsf.identity.handler;
+
+import org.jbpm.jsf.core.handler.AbstractHandler;
+import org.jbpm.jsf.JbpmActionListener;
+import org.jbpm.jsf.identity.action.VerifyUserActionListener;
+
+import com.sun.facelets.FaceletContext;
+import com.sun.facelets.tag.TagConfig;
+import com.sun.facelets.tag.TagAttribute;
+
+/**
+ *
+ */
+public final class VerifyUserHandler extends AbstractHandler {
+ private final TagAttribute userNameTagAttribute;
+ private final TagAttribute passwordTagAttribute;
+ private final TagAttribute userIdTargetTagAttribute;
+
+ public VerifyUserHandler(final TagConfig config) {
+ super(config);
+ userNameTagAttribute = getRequiredAttribute("userName");
+ passwordTagAttribute = getRequiredAttribute("password");
+ userIdTargetTagAttribute = getRequiredAttribute("userIdTarget");
+ }
+
+ protected JbpmActionListener getListener(final FaceletContext ctx) {
+ return new VerifyUserActionListener(
+ getValueExpression(userNameTagAttribute, ctx, String.class),
+ getValueExpression(passwordTagAttribute, ctx, String.class),
+ getValueExpression(userIdTargetTagAttribute, ctx, Long.class)
+ );
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/package-info.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/package-info.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/identity/package-info.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,9 @@
+/**
+ * JSF Tag Library for jBPM applications.
+ */
+(a)org.jboss.gravel.common.annotation.TldTagLib(
+ fileName = "identity.tld",
+ shortName = "id",
+ uri = "http://jbpm.org/jbpm4jsf/identity"
+)
+package org.jbpm.jsf.identity;
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/taskform/TaskFormBaseLibrary.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/taskform/TaskFormBaseLibrary.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/taskform/TaskFormBaseLibrary.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,29 @@
+package org.jbpm.jsf.taskform;
+
+import org.jbpm.jsf.taskform.ui.UITaskFormCancelButton;
+import org.jbpm.jsf.taskform.ui.UITaskFormSaveButton;
+import org.jbpm.jsf.taskform.ui.UITaskFormTransitionButton;
+
+import com.sun.facelets.tag.AbstractTagLibrary;
+
+import javax.faces.context.FacesContext;
+import javax.faces.application.Application;
+
+/**
+ *
+ */
+public abstract class TaskFormBaseLibrary extends AbstractTagLibrary {
+ public TaskFormBaseLibrary(final String namespace) {
+ super(namespace);
+
+ final FacesContext facesContext = FacesContext.getCurrentInstance();
+ final Application application = facesContext.getApplication();
+
+ application.addComponent(UITaskFormCancelButton.COMPONENT_TYPE,
UITaskFormCancelButton.class.getName());
+ addComponent("cancelButton", UITaskFormCancelButton.COMPONENT_TYPE,
"javax.faces.Button");
+ application.addComponent(UITaskFormSaveButton.COMPONENT_TYPE,
UITaskFormSaveButton.class.getName());
+ addComponent("saveButton", UITaskFormSaveButton.COMPONENT_TYPE,
"javax.faces.Button");
+ application.addComponent(UITaskFormTransitionButton.COMPONENT_TYPE,
UITaskFormTransitionButton.class.getName());
+ addComponent("transitionButton",
UITaskFormTransitionButton.COMPONENT_TYPE, "javax.faces.Button");
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/taskform/TaskFormCompatLibrary.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/taskform/TaskFormCompatLibrary.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/taskform/TaskFormCompatLibrary.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,10 @@
+package org.jbpm.jsf.taskform;
+
+/**
+ *
+ */
+public final class TaskFormCompatLibrary extends TaskFormBaseLibrary {
+ public TaskFormCompatLibrary() {
+
super("http://jbpm.org/jsf/tf");
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/taskform/TaskFormLibrary.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/taskform/TaskFormLibrary.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/taskform/TaskFormLibrary.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,12 @@
+package org.jbpm.jsf.taskform;
+
+/**
+ *
+ */
+public final class TaskFormLibrary extends TaskFormBaseLibrary {
+ public TaskFormLibrary() {
+
super("http://jbpm.org/jbpm4jsf/tf");
+
+
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/taskform/package-info.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/taskform/package-info.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/taskform/package-info.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,9 @@
+/**
+ * Components pertaining to task form data and command elements.
+ */
+(a)org.jboss.gravel.common.annotation.TldTagLib(
+ fileName = "tf.tld",
+ shortName = "tf",
+ uri = "http://jbpm.org/jbpm4jsf/tf"
+)
+package org.jbpm.jsf.taskform;
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/taskform/ui/UITaskFormButtonBase.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/taskform/ui/UITaskFormButtonBase.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/taskform/ui/UITaskFormButtonBase.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,62 @@
+package org.jbpm.jsf.taskform.ui;
+
+import org.jbpm.jsf.core.ui.UITaskForm;
+
+import javax.faces.component.html.HtmlCommandButton;
+import javax.faces.component.UIComponent;
+import javax.faces.event.ActionListener;
+import javax.faces.event.FacesEvent;
+import javax.faces.event.AbortProcessingException;
+import javax.faces.FacesException;
+import javax.el.MethodExpression;
+
+/**
+ *
+ */
+public abstract class UITaskFormButtonBase extends HtmlCommandButton {
+
+ private UITaskForm enclosingForm;
+
+ private UITaskForm getEnclosingForm() {
+ if (enclosingForm != null) {
+ return enclosingForm;
+ }
+ UIComponent c = getParent();
+ do {
+ if (c instanceof UITaskForm) {
+ enclosingForm = (UITaskForm) c;
+ return enclosingForm;
+ }
+ c = c.getParent();
+ } while (c != null);
+ throw new FacesException("Task form buttons must be includede within a task
form");
+ }
+
+ public MethodExpression getActionExpression() {
+ return getEnclosingForm().getActionExpression();
+ }
+
+ public void setActionExpression(MethodExpression actionExpression) {
+ getEnclosingForm().setActionExpression(actionExpression);
+ }
+
+ public void addActionListener(ActionListener listener) {
+ getEnclosingForm().addActionListener(listener);
+ }
+
+ public ActionListener[] getActionListeners() {
+ return getEnclosingForm().getActionListeners();
+ }
+
+ public void removeActionListener(ActionListener listener) {
+ getEnclosingForm().removeActionListener(listener);
+ }
+
+ public void broadcast(FacesEvent event) throws AbortProcessingException {
+ getEnclosingForm().broadcast(event);
+ }
+
+ public void queueEvent(FacesEvent e) {
+ getEnclosingForm().queueEvent(e);
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/taskform/ui/UITaskFormCancelButton.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/taskform/ui/UITaskFormCancelButton.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/taskform/ui/UITaskFormCancelButton.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,8 @@
+package org.jbpm.jsf.taskform.ui;
+
+/**
+ *
+ */
+public final class UITaskFormCancelButton extends UITaskFormButtonBase {
+ public static final String COMPONENT_TYPE = "jbpm4jsf.tf.CancelButton";
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/taskform/ui/UITaskFormSaveButton.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/taskform/ui/UITaskFormSaveButton.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/taskform/ui/UITaskFormSaveButton.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,8 @@
+package org.jbpm.jsf.taskform.ui;
+
+/**
+ *
+ */
+public final class UITaskFormSaveButton extends UITaskFormButtonBase {
+ public static final String COMPONENT_TYPE = "jbpm4jsf.tf.SaveButton";
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/taskform/ui/UITaskFormTransitionButton.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/taskform/ui/UITaskFormTransitionButton.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/taskform/ui/UITaskFormTransitionButton.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,59 @@
+package org.jbpm.jsf.taskform.ui;
+
+import java.io.Serializable;
+
+import javax.el.ValueExpression;
+import javax.faces.context.FacesContext;
+
+import org.jbpm.jsf.taskform.ui.UITaskFormButtonBase;
+
+/**
+ *
+ */
+public final class UITaskFormTransitionButton extends UITaskFormButtonBase {
+ public static final String COMPONENT_TYPE =
"jbpm4jsf.tf.TransitionButton";
+
+ private String transition;
+
+ public String getTransition() {
+ if (transition != null) {
+ return transition;
+ } else {
+ final ValueExpression transitionExpression =
getValueExpression("transition");
+ if (transitionExpression == null) {
+ return null;
+ }
+ return
(String)transitionExpression.getValue(getFacesContext().getELContext());
+ }
+ }
+
+ public void setTransition(final String transition) {
+ this.transition = transition;
+ }
+
+
+ private State state;
+
+ public Object saveState(FacesContext context) {
+ if (state == null) {
+ state = new State();
+ }
+ state.superState = super.saveState(context);
+ state.transition = transition;
+ return state;
+ }
+
+ public void restoreState(FacesContext context, Object object) {
+ state = (State) object;
+ super.restoreState(context, state.superState);
+ transition = state.transition;
+ }
+
+ private static final class State implements Serializable {
+ private static final long serialVersionUID = 1L;
+
+ private Object superState;
+ private String transition;
+ }
+
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/taskformlayout/TaskFormLayoutBaseLibrary.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/taskformlayout/TaskFormLayoutBaseLibrary.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/taskformlayout/TaskFormLayoutBaseLibrary.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,39 @@
+package org.jbpm.jsf.taskformlayout;
+
+import org.jbpm.jsf.taskformlayout.ui.UIDataForm;
+import org.jbpm.jsf.taskformlayout.ui.UIDataCell;
+import org.jbpm.jsf.taskformlayout.ui.UIDataArea;
+import org.jbpm.jsf.taskformlayout.ui.UIDataSection;
+import org.jbpm.jsf.taskformlayout.renderer.DataFormRenderer;
+
+import com.sun.facelets.tag.AbstractTagLibrary;
+
+import javax.faces.context.FacesContext;
+import javax.faces.application.Application;
+import javax.faces.render.RenderKit;
+
+/**
+ *
+ */
+public abstract class TaskFormLayoutBaseLibrary extends AbstractTagLibrary {
+ public TaskFormLayoutBaseLibrary(final String namespace) {
+ super(namespace);
+
+ final FacesContext facesContext = FacesContext.getCurrentInstance();
+ final Application application = facesContext.getApplication();
+ final RenderKit renderKit = facesContext.getRenderKit();
+
+ application.addComponent(UIDataForm.COMPONENT_TYPE, UIDataForm.class.getName());
+ addComponent("dataform", UIDataForm.COMPONENT_TYPE,
UIDataForm.RENDERER_TYPE);
+ renderKit.addRenderer(UIDataForm.COMPONENT_FAMILY, UIDataForm.RENDERER_TYPE, new
DataFormRenderer());
+
+ application.addComponent(UIDataArea.COMPONENT_TYPE, UIDataArea.class.getName());
+ addComponent("dataarea", UIDataArea.COMPONENT_TYPE,
UIDataArea.RENDERER_TYPE);
+
+ application.addComponent(UIDataSection.COMPONENT_TYPE,
UIDataSection.class.getName());
+ addComponent("datasection", UIDataSection.COMPONENT_TYPE,
UIDataSection.RENDERER_TYPE);
+
+ application.addComponent(UIDataCell.COMPONENT_TYPE, UIDataCell.class.getName());
+ addComponent("datacell", UIDataCell.COMPONENT_TYPE,
UIDataCell.RENDERER_TYPE);
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/taskformlayout/TaskFormLayoutCompatLibrary.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/taskformlayout/TaskFormLayoutCompatLibrary.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/taskformlayout/TaskFormLayoutCompatLibrary.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,10 @@
+package org.jbpm.jsf.taskformlayout;
+
+/**
+ *
+ */
+public final class TaskFormLayoutCompatLibrary extends TaskFormLayoutBaseLibrary {
+ public TaskFormLayoutCompatLibrary() {
+
super("http://jbpm.org/jsf");
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/taskformlayout/TaskFormLayoutLibrary.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/taskformlayout/TaskFormLayoutLibrary.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/taskformlayout/TaskFormLayoutLibrary.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,10 @@
+package org.jbpm.jsf.taskformlayout;
+
+/**
+ *
+ */
+public final class TaskFormLayoutLibrary extends TaskFormLayoutBaseLibrary {
+ public TaskFormLayoutLibrary() {
+
super("http://jbpm.org/jbpm4jsf/tfl");
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/taskformlayout/package-info.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/taskformlayout/package-info.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/taskformlayout/package-info.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,9 @@
+/**
+ * Components pertaining to task form layout and formatting.
+ */
+(a)org.jboss.gravel.common.annotation.TldTagLib(
+ fileName = "tfl.tld",
+ shortName = "tfl",
+ uri = "http://jbpm.org/jbpm4jsf/tfl"
+)
+package org.jbpm.jsf.taskformlayout;
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/taskformlayout/renderer/DataFormRenderer.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/taskformlayout/renderer/DataFormRenderer.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/taskformlayout/renderer/DataFormRenderer.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,173 @@
+package org.jbpm.jsf.taskformlayout.renderer;
+
+import org.jboss.gravel.common.renderer.RendererBase;
+import org.jboss.gravel.common.renderer.Element;
+import org.jbpm.jsf.taskformlayout.ui.UIDataArea;
+import org.jbpm.jsf.taskformlayout.ui.UIDataCell;
+import org.jbpm.jsf.taskformlayout.ui.UIDataForm;
+import org.jbpm.jsf.taskformlayout.ui.UIDataSection;
+
+import javax.faces.context.FacesContext;
+import javax.faces.component.UIComponent;
+
+import java.io.IOException;
+import java.util.Iterator;
+
+/**
+ *
+ */
+public final class DataFormRenderer extends RendererBase {
+
+ public void encodeBegin(FacesContext context, UIComponent component) throws
IOException {
+ // delegate to encodeChildren
+ }
+
+ public void encodeChildren(FacesContext context, UIComponent component) throws
IOException {
+ if (! component.isRendered()) {
+ return;
+ }
+
+ UIDataForm dataForm = ((UIDataForm)component);
+ final int columns = dataForm.getColumns();
+ final int colspan = columns * 2;
+
+ final Element<UIDataForm> table = writeElement(context, "table",
dataForm);
+ table.writeId();
+ table.addClass(dataForm.getStyleClass()).writeClass();
+ table.addStyle(dataForm.getStyle()).writeStyle();
+
+ for (int i = 0; i < columns; i ++) {
+ final Element<UIDataForm> colgroup =
table.writeElement("colgroup");
+ colgroup.writeAttribute("span", 2);
+ colgroup.close();
+ }
+
+ final UIComponent dataFormHeader = dataForm.getFacet("header");
+ final UIComponent dataFormFooter = dataForm.getFacet("footer");
+
+ if (dataFormHeader != null) {
+ final Element<UIComponent> thead =
table.writeElement("thead", dataFormHeader);
+ thead.addClass(dataForm.getHeaderClass()).writeClass();
+ thead.addStyle(dataForm.getHeaderStyle()).writeClass();
+ final Element<UIComponent> tr = thead.writeElement("tr");
+ final Element<UIComponent> th = tr.writeElement("th");
+ th.writeAttribute("colspan", colspan);
+ th.doEncode();
+ th.close();
+ tr.close();
+ thead.close();
+ }
+ if (dataFormFooter != null) {
+ final Element<UIComponent> tfoot =
table.writeElement("tfoot", dataFormFooter);
+ tfoot.addClass(dataForm.getFooterClass()).writeClass();
+ tfoot.addStyle(dataForm.getFooterStyle()).writeClass();
+ final Element<UIComponent> tr = tfoot.writeElement("tr");
+ final Element<UIComponent> th = tr.writeElement("th");
+ th.writeAttribute("colspan", colspan);
+ th.doEncode();
+ th.close();
+ tr.close();
+ tfoot.close();
+ }
+
+ final Iterator<UIDataSection> sectionIter =
dataForm.getChildrenOfType(UIDataSection.class);
+ boolean sections = false;
+ while (sectionIter.hasNext()) {
+ sections = true;
+ final UIDataSection section = sectionIter.next();
+ final Element<UIDataSection> tbody =
table.writeElement("tbody", section);
+
+ final UIComponent sectionHeader = section.getFacet("header");
+ final UIComponent sectionFooter = section.getFacet("footer");
+
+ if (sectionHeader != null) {
+ final Element<UIComponent> tr = tbody.writeElement("tr",
sectionHeader);
+ final Element<UIComponent> th = tr.writeElement("th");
+ th.writeAttribute("scope", "rowgroup");
+ th.writeAttribute("colspan", colspan);
+ th.doEncode();
+ th.close();
+ tr.close();
+ }
+
+ if (section instanceof UIDataArea) {
+ final Element<UIDataSection> tr =
tbody.writeElement("tr");
+ final Element<UIDataSection> td = tr.writeElement("td");
+ td.writeAttribute("colspan", colspan);
+ td.doEncode();
+ td.close();
+ tr.close();
+ } else {
+ encodeCells(tbody, section.getChildrenOfType(UIDataCell.class),
columns);
+ }
+
+ if (sectionFooter != null) {
+ final Element<UIComponent> tr = tbody.writeElement("tr",
sectionFooter);
+ final Element<UIComponent> th = tr.writeElement("th");
+ th.writeAttribute("colspan", colspan);
+ th.doEncode();
+ th.close();
+ tr.close();
+ }
+ tbody.close();
+ }
+ if (! sections) {
+ final Element<UIDataForm> tbody =
table.writeElement("tbody");
+ encodeCells(tbody, dataForm.getChildrenOfType(UIDataCell.class), columns);
+ tbody.close();
+ }
+ table.close();
+ }
+
+ public <T extends UIComponent> void encodeCells(final Element<T> tbody,
Iterator<UIDataCell> cellIterator, final int columns) throws IOException {
+ int column = 0;
+
+ Element<T> tr = null;
+ while (cellIterator.hasNext()) {
+ final UIDataCell dataCell = cellIterator.next();
+ if (column == 0) {
+ tr = tbody.writeElement("tr");
+ }
+
+ final UIComponent headerFacet = dataCell.getFacet("header");
+ if (headerFacet != null) {
+ Element<UIComponent> th = tr.writeElement("th",
headerFacet);
+ th.writeAttribute("scope", "colgroup");
+ th.addClass(dataCell.getHeaderClass()).writeClass();
+ th.addStyle(dataCell.getHeaderStyle()).writeStyle();
+ th.doEncode();
+ th.close();
+ } else {
+ tr.writeElement("th").close();
+ }
+
+ final Element<UIDataCell> td = tr.writeElement("td",
dataCell);
+ td.writeId();
+ td.addClass(dataCell.getStyleClass()).writeClass();
+ td.addStyle(dataCell.getStyle()).writeStyle();
+ td.doEncode();
+ td.close();
+
+ column = (column + 1) % columns;
+ if (column == 0) {
+ tr.close();
+ }
+ }
+
+ if (column > 0) {
+ while (column < columns) {
+ tr.writeElement("th").close();
+ tr.writeElement("td").close();
+ }
+ tr.close();
+ }
+ }
+
+ public void encodeEnd(FacesContext context, UIComponent component) throws IOException
{
+ // delegate to encodeChildren
+ }
+
+ public boolean getRendersChildren() {
+ return true;
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/taskformlayout/ui/UIDataArea.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/taskformlayout/ui/UIDataArea.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/taskformlayout/ui/UIDataArea.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,19 @@
+package org.jbpm.jsf.taskformlayout.ui;
+
+/**
+ *
+ */
+public final class UIDataArea extends UIDataSection {
+
+ public static final String COMPONENT_TYPE = "jbpm4jsf.tfl.DataArea";
+ public static final String COMPONENT_FAMILY = "jbpm4jsf.tfl";
+ public static final String RENDERER_TYPE = null;
+
+ public UIDataArea() {
+ setRendererType(RENDERER_TYPE);
+ }
+
+ public String getFamily() {
+ return COMPONENT_FAMILY;
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/taskformlayout/ui/UIDataCell.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/taskformlayout/ui/UIDataCell.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/taskformlayout/ui/UIDataCell.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,100 @@
+package org.jbpm.jsf.taskformlayout.ui;
+
+import org.jboss.gravel.common.ui.UIGravelBase;
+
+import javax.faces.context.FacesContext;
+
+import java.io.Serializable;
+
+/**
+ *
+ */
+public final class UIDataCell extends UIGravelBase {
+
+ public static final String COMPONENT_TYPE = "jbpm4jsf.tfl.DataCell";
+ public static final String COMPONENT_FAMILY = "jbpm4jsf.tfl";
+ public static final String RENDERER_TYPE = null;
+
+ public UIDataCell() {
+ setRendererType(RENDERER_TYPE);
+ }
+
+ public String getFamily() {
+ return COMPONENT_FAMILY;
+ }
+
+ // properties
+
+ private String headerClass;
+ private String headerStyle;
+ private String styleClass;
+ private String style;
+
+ public String getHeaderClass() {
+ return headerClass;
+ }
+
+ public void setHeaderClass(final String headerClass) {
+ this.headerClass = headerClass;
+ }
+
+ public String getHeaderStyle() {
+ return getAttributeValue("headerStyle", headerStyle);
+ }
+
+ public void setHeaderStyle(final String headerStyle) {
+ this.headerStyle = headerStyle;
+ }
+
+ public String getStyleClass() {
+ return getAttributeValue("styleClass", styleClass);
+ }
+
+ public void setStyleClass(final String styleClass) {
+ this.styleClass = styleClass;
+ }
+
+ public String getStyle() {
+ return getAttributeValue("style", style);
+ }
+
+ public void setStyle(final String style) {
+ this.style = style;
+ }
+
+ // state mgmt
+
+ private State state;
+
+ public Object saveState(FacesContext context) {
+ if (state == null) {
+ state = new State();
+ }
+ state.superState = super.saveState(context);
+ state.headerClass = headerClass;
+ state.headerStyle = headerStyle;
+ state.styleClass = styleClass;
+ state.style = style;
+ return state;
+ }
+
+ public void restoreState(FacesContext context, Object stateObject) {
+ state = ((State)stateObject);
+ headerClass = state.headerClass;
+ headerStyle = state.headerStyle;
+ styleClass = state.styleClass;
+ style = state.style;
+ super.restoreState(context, state.superState);
+ }
+
+ public static class State implements Serializable {
+ private static final long serialVersionUID = 1L;
+
+ private Object superState;
+
+ private String headerClass;
+ private String headerStyle;
+ private String styleClass;
+ private String style;
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/taskformlayout/ui/UIDataForm.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/taskformlayout/ui/UIDataForm.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/taskformlayout/ui/UIDataForm.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,141 @@
+package org.jbpm.jsf.taskformlayout.ui;
+
+import org.jboss.gravel.common.ui.UIGravelBase;
+import java.io.Serializable;
+
+import javax.faces.context.FacesContext;
+
+/**
+ *
+ */
+public final class UIDataForm extends UIGravelBase {
+
+ public static final String COMPONENT_TYPE = "jbpm4jsf.tfl.DataForm";
+ public static final String COMPONENT_FAMILY = "jbpm4jsf.tfl";
+ public static final String RENDERER_TYPE = "jbpm4jsf.tlf.DataForm";
+
+ public UIDataForm() {
+ setRendererType(RENDERER_TYPE);
+ }
+
+ public String getFamily() {
+ return COMPONENT_FAMILY;
+ }
+
+ // properties
+
+ private int columns;
+ private boolean columnsSet;
+ private String headerClass;
+ private String headerStyle;
+ private String footerClass;
+ private String footerStyle;
+ private String styleClass;
+ private String style;
+
+ public int getColumns() {
+ final int value = getAttributeValue("columns", columns, columnsSet,
1);
+ return value < 1 ? 1 : value;
+ }
+
+ public void setColumns(final int columns) {
+ this.columns = columns;
+ columnsSet = true;
+ }
+
+ public String getHeaderClass() {
+ return getAttributeValue("headerClass", headerClass);
+ }
+
+ public void setHeaderClass(final String headerClass) {
+ this.headerClass = headerClass;
+ }
+
+ public String getHeaderStyle() {
+ return getAttributeValue("headerStyle", headerStyle);
+ }
+
+ public void setHeaderStyle(final String headerStyle) {
+ this.headerStyle = headerStyle;
+ }
+
+ public String getFooterClass() {
+ return getAttributeValue("footerClass", footerClass);
+ }
+
+ public void setFooterClass(final String footerClass) {
+ this.footerClass = footerClass;
+ }
+
+ public String getFooterStyle() {
+ return getAttributeValue("footerStyle", footerStyle);
+ }
+
+ public void setFooterStyle(final String footerStyle) {
+ this.footerStyle = footerStyle;
+ }
+
+ public String getStyleClass() {
+ return getAttributeValue("styleClass", styleClass,
"dataform");
+ }
+
+ public void setStyleClass(final String styleClass) {
+ this.styleClass = styleClass;
+ }
+
+ public String getStyle() {
+ return getAttributeValue("style", style);
+ }
+
+ public void setStyle(final String style) {
+ this.style = style;
+ }
+
+ // state mgmt
+
+ private State state;
+
+ public Object saveState(FacesContext context) {
+ if (state == null) {
+ state = new State();
+ }
+ state.superState = super.saveState(context);
+ state.columns = columns;
+ state.columnsSet = columnsSet;
+ state.headerClass = headerClass;
+ state.headerStyle = headerStyle;
+ state.footerClass = footerClass;
+ state.footerStyle = footerStyle;
+ state.styleClass = styleClass;
+ state.style = style;
+ return state;
+ }
+
+ public void restoreState(FacesContext context, Object stateObject) {
+ state = ((State)stateObject);
+ columns = state.columns;
+ columnsSet = state.columnsSet;
+ headerClass = state.headerClass;
+ headerStyle = state.headerStyle;
+ footerClass = state.footerClass;
+ footerStyle = state.footerStyle;
+ styleClass = state.styleClass;
+ style = state.style;
+ super.restoreState(context, state.superState);
+ }
+
+ public static class State implements Serializable {
+ private static final long serialVersionUID = 1L;
+
+ private Object superState;
+
+ private int columns;
+ private boolean columnsSet;
+ private String headerClass;
+ private String headerStyle;
+ private String footerClass;
+ private String footerStyle;
+ private String styleClass;
+ private String style;
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/taskformlayout/ui/UIDataSection.java
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/taskformlayout/ui/UIDataSection.java
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/java/org/jbpm/jsf/taskformlayout/ui/UIDataSection.java 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,124 @@
+package org.jbpm.jsf.taskformlayout.ui;
+
+import org.jboss.gravel.common.ui.UIGravelBase;
+
+import javax.faces.context.FacesContext;
+
+import java.io.Serializable;
+
+/**
+ *
+ */
+public class UIDataSection extends UIGravelBase {
+
+ public static final String COMPONENT_TYPE = "jbpm4jsf.tfl.DataSection";
+ public static final String COMPONENT_FAMILY = "jbpm4jsf.tfl";
+ public static final String RENDERER_TYPE = null;
+
+ public UIDataSection() {
+ setRendererType(RENDERER_TYPE);
+ }
+
+ public String getFamily() {
+ return COMPONENT_FAMILY;
+ }
+
+ // properties
+
+ private String headerClass;
+ private String headerStyle;
+ private String footerClass;
+ private String footerStyle;
+ private String styleClass;
+ private String style;
+
+ public String getHeaderClass() {
+ return getAttributeValue("headerClass", headerClass);
+ }
+
+ public void setHeaderClass(final String headerClass) {
+ this.headerClass = headerClass;
+ }
+
+ public String getHeaderStyle() {
+ return getAttributeValue("headerStyle", headerStyle);
+ }
+
+ public void setHeaderStyle(final String headerStyle) {
+ this.headerStyle = headerStyle;
+ }
+
+ public String getFooterClass() {
+ return getAttributeValue("footerClass", footerClass);
+ }
+
+ public void setFooterClass(final String footerClass) {
+ this.footerClass = footerClass;
+ }
+
+ public String getFooterStyle() {
+ return getAttributeValue("footerStyle", footerStyle);
+ }
+
+ public void setFooterStyle(final String footerStyle) {
+ this.footerStyle = footerStyle;
+ }
+
+ public String getStyleClass() {
+ return getAttributeValue("styleClass", styleClass);
+ }
+
+ public void setStyleClass(final String styleClass) {
+ this.styleClass = styleClass;
+ }
+
+ public String getStyle() {
+ return getAttributeValue("style", style);
+ }
+
+ public void setStyle(final String style) {
+ this.style = style;
+ }
+
+ // state mgmt
+
+ private State state;
+
+ public Object saveState(FacesContext context) {
+ if (state == null) {
+ state = new State();
+ }
+ state.superState = super.saveState(context);
+ state.headerClass = headerClass;
+ state.headerStyle = headerStyle;
+ state.footerClass = footerClass;
+ state.footerStyle = footerStyle;
+ state.styleClass = styleClass;
+ state.style = style;
+ return state;
+ }
+
+ public void restoreState(FacesContext context, Object stateObject) {
+ state = ((State)stateObject);
+ headerClass = state.headerClass;
+ headerStyle = state.headerStyle;
+ footerClass = state.footerClass;
+ footerStyle = state.footerStyle;
+ styleClass = state.styleClass;
+ style = state.style;
+ super.restoreState(context, state.superState);
+ }
+
+ public static class State implements Serializable {
+ private static final long serialVersionUID = 1L;
+
+ private Object superState;
+
+ private String headerClass;
+ private String headerStyle;
+ private String footerClass;
+ private String footerStyle;
+ private String styleClass;
+ private String style;
+ }
+}
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/resources/META-INF/core.taglib.xml
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/resources/META-INF/core.taglib.xml
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/resources/META-INF/core.taglib.xml 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,26 @@
+<!--
+ jBPM4JSF - jBPM component library for JSF
+ Copyright (C) 2007 JBoss, a division of Red Hat, Inc.
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+-->
+
+<!DOCTYPE facelet-taglib PUBLIC
+ "-//Sun Microsystems, Inc.//DTD Facelet Taglib 1.0//EN"
+ "http://java.sun.com/dtd/facelet-taglib_1_0.dtd">
+
+<facelet-taglib>
+ <library-class>org.jbpm.jsf.core.CoreLibrary</library-class>
+</facelet-taglib>
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/resources/META-INF/faces-config.xml
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/resources/META-INF/faces-config.xml
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/resources/META-INF/faces-config.xml 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,11 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<faces-config
xmlns="http://java.sun.com/xml/ns/javaee"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd"
+ version="1.2">
+ <lifecycle>
+
<phase-listener>org.jbpm.jsf.core.phase.JbpmPhaseListener</phase-listener>
+
<phase-listener>org.jbpm.jsf.core.phase.ProcessFilePhaseListener</phase-listener>
+ </lifecycle>
+
+</faces-config>
\ No newline at end of file
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/resources/META-INF/identity.taglib.xml
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/resources/META-INF/identity.taglib.xml
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/resources/META-INF/identity.taglib.xml 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,26 @@
+<!--
+ jBPM4JSF - jBPM component library for JSF
+ Copyright (C) 2007 JBoss, a division of Red Hat, Inc.
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+-->
+
+<!DOCTYPE facelet-taglib PUBLIC
+ "-//Sun Microsystems, Inc.//DTD Facelet Taglib 1.0//EN"
+ "http://java.sun.com/dtd/facelet-taglib_1_0.dtd">
+
+<facelet-taglib>
+ <library-class>org.jbpm.jsf.identity.IdentityLibrary</library-class>
+</facelet-taglib>
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/resources/META-INF/tf-compat.taglib.xml
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/resources/META-INF/tf-compat.taglib.xml
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/resources/META-INF/tf-compat.taglib.xml 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,26 @@
+<!--
+ jBPM4JSF - jBPM component library for JSF
+ Copyright (C) 2007 JBoss, a division of Red Hat, Inc.
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+-->
+
+<!DOCTYPE facelet-taglib PUBLIC
+ "-//Sun Microsystems, Inc.//DTD Facelet Taglib 1.0//EN"
+ "http://java.sun.com/dtd/facelet-taglib_1_0.dtd">
+
+<facelet-taglib>
+ <library-class>org.jbpm.jsf.taskform.TaskFormCompatLibrary</library-class>
+</facelet-taglib>
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/resources/META-INF/tf.taglib.xml
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/resources/META-INF/tf.taglib.xml
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/resources/META-INF/tf.taglib.xml 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,26 @@
+<!--
+ jBPM4JSF - jBPM component library for JSF
+ Copyright (C) 2007 JBoss, a division of Red Hat, Inc.
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+-->
+
+<!DOCTYPE facelet-taglib PUBLIC
+ "-//Sun Microsystems, Inc.//DTD Facelet Taglib 1.0//EN"
+ "http://java.sun.com/dtd/facelet-taglib_1_0.dtd">
+
+<facelet-taglib>
+ <library-class>org.jbpm.jsf.taskform.TaskFormLibrary</library-class>
+</facelet-taglib>
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/resources/META-INF/tfl-compat.taglib.xml
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/resources/META-INF/tfl-compat.taglib.xml
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/resources/META-INF/tfl-compat.taglib.xml 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,26 @@
+<!--
+ jBPM4JSF - jBPM component library for JSF
+ Copyright (C) 2007 JBoss, a division of Red Hat, Inc.
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+-->
+
+<!DOCTYPE facelet-taglib PUBLIC
+ "-//Sun Microsystems, Inc.//DTD Facelet Taglib 1.0//EN"
+ "http://java.sun.com/dtd/facelet-taglib_1_0.dtd">
+
+<facelet-taglib>
+
<library-class>org.jbpm.jsf.taskformlayout.TaskFormLayoutCompatLibrary</library-class>
+</facelet-taglib>
Added:
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/resources/META-INF/tfl.taglib.xml
===================================================================
---
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/resources/META-INF/tfl.taglib.xml
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/resources/META-INF/tfl.taglib.xml 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,26 @@
+<!--
+ jBPM4JSF - jBPM component library for JSF
+ Copyright (C) 2007 JBoss, a division of Red Hat, Inc.
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+-->
+
+<!DOCTYPE facelet-taglib PUBLIC
+ "-//Sun Microsystems, Inc.//DTD Facelet Taglib 1.0//EN"
+ "http://java.sun.com/dtd/facelet-taglib_1_0.dtd">
+
+<facelet-taglib>
+
<library-class>org.jbpm.jsf.taskformlayout.TaskFormLayoutLibrary</library-class>
+</facelet-taglib>
Added: projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/tld/core.tld
===================================================================
--- projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/tld/core.tld
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/tld/core.tld 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,1944 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library
1.2//EN" "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
+
+<taglib
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-jsptaglibrary_2_1.xsd"
version="2.1">
+ <tlib-version>1.2</tlib-version>
+ <short-name>jbpm</short-name>
+ <
uri>http://jbpm.org/jbpm4jsf/core</uri>
+ <description><![CDATA[JSF Tag Library for jBPM
applications.]]></description>
+
+ <tag>
+ <name>addComment</name>
+ <tag-class/>
+ <tei-class/>
+ <body-content>JSP</body-content>
+ <description><![CDATA[Add a comment to a task or
token.]]></description>
+ <attribute>
+ <name>comment</name>
+ <required>true</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[An EL expression that returns the comment text
to add.]]></description>
+ <deferred-value>
+ <type>java.lang.String</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>name</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A different name to use for this action.
Action names are used by some navigation handlers.]]></description>
+ <deferred-value>
+ <type>java.lang.String</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>navigate</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A boolean expression that can be used to
control whether navigation will be attempted after this action
completes.]]></description>
+ <deferred-value>
+ <type>boolean</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>target</name>
+ <required>true</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[An EL expression that returns the node to add
a comment to.]]></description>
+ <deferred-value>
+ <type>org.jbpm.graph.def.GraphElement</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>unless</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A boolean expression that, if true, will
prevent this action from being run.]]></description>
+ <deferred-value>
+ <type>boolean</type>
+ </deferred-value>
+ </attribute>
+ </tag>
+
+ <tag>
+ <name>applyVariableMap</name>
+ <tag-class/>
+ <tei-class/>
+ <body-content>JSP</body-content>
+ <description><![CDATA[Apply a variable map to a token, task, or process
instance]]></description>
+ <attribute>
+ <name>name</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A different name to use for this action.
Action names are used by some navigation handlers.]]></description>
+ <deferred-value>
+ <type>java.lang.String</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>navigate</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A boolean expression that can be used to
control whether navigation will be attempted after this action
completes.]]></description>
+ <deferred-value>
+ <type>boolean</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>target</name>
+ <required>true</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[The token, task, or process instance to apply
the variables to.]]></description>
+ <deferred-value>
+ <type>java.lang.Object</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>unless</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A boolean expression that, if true, will
prevent this action from being run.]]></description>
+ <deferred-value>
+ <type>boolean</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>variableMap</name>
+ <required>true</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[The variable map to
apply.]]></description>
+ <deferred-value>
+ <type>org.jbpm.jsf.core.impl.UpdatesHashMap</type>
+ </deferred-value>
+ </attribute>
+ </tag>
+
+ <tag>
+ <name>assignTask</name>
+ <tag-class/>
+ <tei-class/>
+ <body-content>JSP</body-content>
+ <description><![CDATA[Assign a task to an
actor.]]></description>
+ <attribute>
+ <name>actorId</name>
+ <required>true</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[The actor ID to which the task should be
assigned.]]></description>
+ <deferred-value>
+ <type>java.lang.String</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>name</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A different name to use for this action.
Action names are used by some navigation handlers.]]></description>
+ <deferred-value>
+ <type>java.lang.String</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>navigate</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A boolean expression that can be used to
control whether navigation will be attempted after this action
completes.]]></description>
+ <deferred-value>
+ <type>boolean</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>overwriteSwimlane</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A flag that indicates whether the swimlane
should be overwritten.]]></description>
+ <deferred-value>
+ <type>boolean</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>task</name>
+ <required>true</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[The task instance to
assign.]]></description>
+ <deferred-value>
+ <type>org.jbpm.taskmgmt.exe.TaskInstance</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>unless</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A boolean expression that, if true, will
prevent this action from being run.]]></description>
+ <deferred-value>
+ <type>boolean</type>
+ </deferred-value>
+ </attribute>
+ </tag>
+
+ <tag>
+ <name>cancel</name>
+ <tag-class/>
+ <tei-class/>
+ <body-content>JSP</body-content>
+ <description><![CDATA[Cancel a running task instance, token, or process
instance.]]></description>
+ <attribute>
+ <name>name</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A different name to use for this action.
Action names are used by some navigation handlers.]]></description>
+ <deferred-value>
+ <type>java.lang.String</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>navigate</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A boolean expression that can be used to
control whether navigation will be attempted after this action
completes.]]></description>
+ <deferred-value>
+ <type>boolean</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>unless</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A boolean expression that, if true, will
prevent this action from being run.]]></description>
+ <deferred-value>
+ <type>boolean</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>value</name>
+ <required>true</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[The item to cancel.]]></description>
+ <deferred-value>
+ <type>java.lang.Object</type>
+ </deferred-value>
+ </attribute>
+ </tag>
+
+ <tag>
+ <name>completeTask</name>
+ <tag-class/>
+ <tei-class/>
+ <body-content>JSP</body-content>
+ <description><![CDATA[Complete a task.]]></description>
+ <attribute>
+ <name>name</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A different name to use for this action.
Action names are used by some navigation handlers.]]></description>
+ <deferred-value>
+ <type>java.lang.String</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>navigate</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A boolean expression that can be used to
control whether navigation will be attempted after this action
completes.]]></description>
+ <deferred-value>
+ <type>boolean</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>task</name>
+ <required>true</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[An EL expression that resolves to the task
instance to complete.]]></description>
+ <deferred-value>
+ <type>org.jbpm.taskmgmt.exe.TaskInstance</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>transition</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[An EL expression that resolves to either the
name of a transition, or the transition object to take upon completing this
task.]]></description>
+ <deferred-value>
+ <type>java.lang.Object</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>unless</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A boolean expression that, if true, will
prevent this action from being run.]]></description>
+ <deferred-value>
+ <type>boolean</type>
+ </deferred-value>
+ </attribute>
+ </tag>
+
+ <tag>
+ <name>delete</name>
+ <tag-class/>
+ <tei-class/>
+ <body-content>JSP</body-content>
+ <description><![CDATA[Delete a process, process instance, or
job.]]></description>
+ <attribute>
+ <name>name</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A different name to use for this action.
Action names are used by some navigation handlers.]]></description>
+ <deferred-value>
+ <type>java.lang.String</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>navigate</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A boolean expression that can be used to
control whether navigation will be attempted after this action
completes.]]></description>
+ <deferred-value>
+ <type>boolean</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>unless</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A boolean expression that, if true, will
prevent this action from being run.]]></description>
+ <deferred-value>
+ <type>boolean</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>value</name>
+ <required>true</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[The item to delete.]]></description>
+ <deferred-value>
+ <type>java.lang.Object</type>
+ </deferred-value>
+ </attribute>
+ </tag>
+
+ <tag>
+ <name>deployProcess</name>
+ <tag-class/>
+ <tei-class/>
+ <body-content>JSP</body-content>
+ <description><![CDATA[Deploy a new process
archive.]]></description>
+ <attribute>
+ <name>archive</name>
+ <required>true</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[The source of the archive, as an input stream
or a byte array.]]></description>
+ <deferred-value>
+ <type>java.lang.Object</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>name</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A different name to use for this action.
Action names are used by some navigation handlers.]]></description>
+ <deferred-value>
+ <type>java.lang.String</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>navigate</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A boolean expression that can be used to
control whether navigation will be attempted after this action
completes.]]></description>
+ <deferred-value>
+ <type>boolean</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>target</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[An EL expression into which the new process
definition will be inserted.]]></description>
+ <deferred-value>
+ <type>org.jbpm.graph.def.ProcessDefinition</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>unless</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A boolean expression that, if true, will
prevent this action from being run.]]></description>
+ <deferred-value>
+ <type>boolean</type>
+ </deferred-value>
+ </attribute>
+ </tag>
+
+ <tag>
+ <name>getDiagramInfo</name>
+ <tag-class/>
+ <tei-class/>
+ <body-content>JSP</body-content>
+ <description><![CDATA[Read process definition diagram information from
the database.]]></description>
+ <attribute>
+ <name>name</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A different name to use for this action.
Action names are used by some navigation handlers.]]></description>
+ <deferred-value>
+ <type>java.lang.String</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>navigate</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A boolean expression that can be used to
control whether navigation will be attempted after this action
completes.]]></description>
+ <deferred-value>
+ <type>boolean</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>process</name>
+ <required>true</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[The the process definition to read diagram
information for.]]></description>
+ <deferred-value>
+ <type>org.jbpm.graph.def.ProcessDefinition</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>target</name>
+ <required>true</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[An EL expression into which the diagram
information should be stored.]]></description>
+ <deferred-value>
+ <type>java.lang.Object</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>unless</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A boolean expression that, if true, will
prevent this action from being run.]]></description>
+ <deferred-value>
+ <type>boolean</type>
+ </deferred-value>
+ </attribute>
+ </tag>
+
+ <tag>
+ <name>getProcessLogs</name>
+ <tag-class/>
+ <tei-class/>
+ <body-content>JSP</body-content>
+ <description><![CDATA[Get the process logs from a process
instance.]]></description>
+ <attribute>
+ <name>name</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A different name to use for this action.
Action names are used by some navigation handlers.]]></description>
+ <deferred-value>
+ <type>java.lang.String</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>navigate</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A boolean expression that can be used to
control whether navigation will be attempted after this action
completes.]]></description>
+ <deferred-value>
+ <type>boolean</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>processInstance</name>
+ <required>true</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[The process instance whose process logs are to
be read.]]></description>
+ <deferred-value>
+ <type>org.jbpm.graph.exe.ProcessInstance</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>type</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[The process log type. This may be a literal
Class object, or the name of a class, or one of the following shortcut
names:<ul><li><code>variable</code></li><li><code>variableUpdate</code></li><li><code>variableCreate</code></li><li><code>variableDelete</code></li><li><code>action</code></li><li><code>node</code></li><li><code>processInstanceCreate</code></li><li><code>processInstanceEnd</code></li><li><code>processState</code></li><li><code>signal</code></li><li><code>tokenCreate</code></li><li><code>tokenEnd</code></li><li><code>transition</code></li><li><code>composite</code></li><li><code>message</code></li><li><code>swimlane</code></li><li><code>swimlaneAssign</code></li><li><code>swimlaneCreate</code></li><li><code>task</code></li><li><code>taskAssign</code></li><li><code>taskCreate</code></li><li><code>taskEnd</code></li></ul>]]></description>
+ <deferred-value>
+ <type>java.lang.Object</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>unless</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A boolean expression that, if true, will
prevent this action from being run.]]></description>
+ <deferred-value>
+ <type>boolean</type>
+ </deferred-value>
+ </attribute>
+ </tag>
+
+ <tag>
+ <name>getTaskFormInfo</name>
+ <tag-class/>
+ <tei-class/>
+ <body-content>JSP</body-content>
+ <description><![CDATA[Read process definition task form information from
the database.]]></description>
+ <attribute>
+ <name>name</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A different name to use for this action.
Action names are used by some navigation handlers.]]></description>
+ <deferred-value>
+ <type>java.lang.String</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>navigate</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A boolean expression that can be used to
control whether navigation will be attempted after this action
completes.]]></description>
+ <deferred-value>
+ <type>boolean</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>process</name>
+ <required>true</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[The the process definition to read task form
information for.]]></description>
+ <deferred-value>
+ <type>org.jbpm.graph.def.ProcessDefinition</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>target</name>
+ <required>true</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[An EL expression into which the task form
information should be stored. This will be in the form of a map whose keys are task names
and whose values are the name of the task form file, if any.]]></description>
+ <deferred-value>
+ <type>java.util.Map</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>unless</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A boolean expression that, if true, will
prevent this action from being run.]]></description>
+ <deferred-value>
+ <type>boolean</type>
+ </deferred-value>
+ </attribute>
+ </tag>
+
+ <tag>
+ <name>getVariable</name>
+ <tag-class/>
+ <tei-class/>
+ <body-content>JSP</body-content>
+ <description><![CDATA[Get the value of a process
variable.]]></description>
+ <attribute>
+ <name>entity</name>
+ <required>true</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[The token, task, or process instance from
which the variable value should be retrieved.]]></description>
+ <deferred-value>
+ <type>java.lang.Object</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>name</name>
+ <required>true</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[The name of the variable to
remove.]]></description>
+ <deferred-value>
+ <type>java.lang.String</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>name</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A different name to use for this action.
Action names are used by some navigation handlers.]]></description>
+ <deferred-value>
+ <type>java.lang.String</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>navigate</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A boolean expression that can be used to
control whether navigation will be attempted after this action
completes.]]></description>
+ <deferred-value>
+ <type>boolean</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>target</name>
+ <required>true</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[An EL expression into which the variable value
will be stored.]]></description>
+ <deferred-value>
+ <type>java.lang.Object</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>unless</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A boolean expression that, if true, will
prevent this action from being run.]]></description>
+ <deferred-value>
+ <type>boolean</type>
+ </deferred-value>
+ </attribute>
+ </tag>
+
+ <tag>
+ <name>getVariableMap</name>
+ <tag-class/>
+ <tei-class/>
+ <body-content>JSP</body-content>
+ <description><![CDATA[Get the variable map from a token, process
instance, or task.]]></description>
+ <attribute>
+ <name>name</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A different name to use for this action.
Action names are used by some navigation handlers.]]></description>
+ <deferred-value>
+ <type>java.lang.String</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>navigate</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A boolean expression that can be used to
control whether navigation will be attempted after this action
completes.]]></description>
+ <deferred-value>
+ <type>boolean</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>target</name>
+ <required>true</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[An EL expression into which the variable map
will be stored.]]></description>
+ <deferred-value>
+ <type>java.util.Map</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>unless</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A boolean expression that, if true, will
prevent this action from being run.]]></description>
+ <deferred-value>
+ <type>boolean</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>value</name>
+ <required>true</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[The entity from which the variable should be
retrieved.]]></description>
+ <deferred-value>
+ <type>java.lang.Object</type>
+ </deferred-value>
+ </attribute>
+ </tag>
+
+ <tag>
+ <name>includeProcessFile</name>
+ <tag-class/>
+ <tei-class/>
+ <body-content>JSP</body-content>
+ <description><![CDATA[Include a process file.]]></description>
+ <attribute>
+ <name>file</name>
+ <required>true</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[The name of a file within the process to
include.]]></description>
+ <deferred-value>
+ <type>java.lang.String</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>process</name>
+ <required>true</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[The process definition from which the file
should be read.]]></description>
+ <deferred-value>
+ <type>org.jbpm.graph.def.ProcessDefinition</type>
+ </deferred-value>
+ </attribute>
+ </tag>
+
+ <tag>
+ <name>jbpmActionListener</name>
+ <tag-class/>
+ <tei-class/>
+ <body-content>JSP</body-content>
+ <description><![CDATA[Call a user-defined action, providing the action
with a JbpmJsfContext.]]></description>
+ <attribute>
+ <name>listener</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[An EL expression that resolves to the listener
to execute. Either this or the 'type' attribute must be
given.]]></description>
+ <deferred-value>
+ <type>org.jbpm.jsf.JbpmActionListener</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>name</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A different name to use for this action.
Action names are used by some navigation handlers.]]></description>
+ <deferred-value>
+ <type>java.lang.String</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>navigate</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A boolean expression that can be used to
control whether navigation will be attempted after this action
completes.]]></description>
+ <deferred-value>
+ <type>boolean</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>type</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[The type of the action. Can be an EL
expression which resolves to a literal Class object, or the name of a class as a String.
Either this or the 'listener' attribute must be given.]]></description>
+ <deferred-value>
+ <type>java.lang.Object</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>unless</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A boolean expression that, if true, will
prevent this action from being run.]]></description>
+ <deferred-value>
+ <type>boolean</type>
+ </deferred-value>
+ </attribute>
+ </tag>
+
+ <tag>
+ <name>listJobs</name>
+ <tag-class/>
+ <tei-class/>
+ <body-content>JSP</body-content>
+ <description><![CDATA[List all jobs in the
database.]]></description>
+ <attribute>
+ <name>name</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A different name to use for this action.
Action names are used by some navigation handlers.]]></description>
+ <deferred-value>
+ <type>java.lang.String</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>navigate</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A boolean expression that can be used to
control whether navigation will be attempted after this action
completes.]]></description>
+ <deferred-value>
+ <type>boolean</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>target</name>
+ <required>true</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[An EL expression into which the list will be
stored.]]></description>
+ <deferred-value>
+ <type>java.util.List</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>unless</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A boolean expression that, if true, will
prevent this action from being run.]]></description>
+ <deferred-value>
+ <type>boolean</type>
+ </deferred-value>
+ </attribute>
+ </tag>
+
+ <tag>
+ <name>listProcesses</name>
+ <tag-class/>
+ <tei-class/>
+ <body-content>JSP</body-content>
+ <description><![CDATA[Read a list of process definitions from the
database.]]></description>
+ <attribute>
+ <name>name</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A different name to use for this action.
Action names are used by some navigation handlers.]]></description>
+ <deferred-value>
+ <type>java.lang.String</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>navigate</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A boolean expression that can be used to
control whether navigation will be attempted after this action
completes.]]></description>
+ <deferred-value>
+ <type>boolean</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>target</name>
+ <required>true</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[An EL expression into which the process
definition list should be stored.]]></description>
+ <deferred-value>
+ <type>java.util.List</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>unless</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A boolean expression that, if true, will
prevent this action from being run.]]></description>
+ <deferred-value>
+ <type>boolean</type>
+ </deferred-value>
+ </attribute>
+ </tag>
+
+ <tag>
+ <name>listProcessInstances</name>
+ <tag-class/>
+ <tei-class/>
+ <body-content>JSP</body-content>
+ <description><![CDATA[Read a list of process instances from a process
definition.]]></description>
+ <attribute>
+ <name>name</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A different name to use for this action.
Action names are used by some navigation handlers.]]></description>
+ <deferred-value>
+ <type>java.lang.String</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>navigate</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A boolean expression that can be used to
control whether navigation will be attempted after this action
completes.]]></description>
+ <deferred-value>
+ <type>boolean</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>processId</name>
+ <required>true</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[The numeric ID of the process definition whose
instances are to be read.]]></description>
+ <deferred-value>
+ <type>long</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>target</name>
+ <required>true</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[An EL expression into which the process
instance list should be stored.]]></description>
+ <deferred-value>
+ <type>java.util.List</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>unless</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A boolean expression that, if true, will
prevent this action from being run.]]></description>
+ <deferred-value>
+ <type>boolean</type>
+ </deferred-value>
+ </attribute>
+ </tag>
+
+ <tag>
+ <name>listTasks</name>
+ <tag-class/>
+ <tei-class/>
+ <body-content>JSP</body-content>
+ <description><![CDATA[Read a list of task instances from the
database.]]></description>
+ <attribute>
+ <name>includeEnded</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A flag specifying whether ended tasks should
be included.]]></description>
+ <deferred-value>
+ <type>boolean</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>name</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A different name to use for this action.
Action names are used by some navigation handlers.]]></description>
+ <deferred-value>
+ <type>java.lang.String</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>navigate</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A boolean expression that can be used to
control whether navigation will be attempted after this action
completes.]]></description>
+ <deferred-value>
+ <type>boolean</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>target</name>
+ <required>true</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[An EL expression into which the task instance
list should be stored.]]></description>
+ <deferred-value>
+ <type>java.util.List</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>unless</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A boolean expression that, if true, will
prevent this action from being run.]]></description>
+ <deferred-value>
+ <type>boolean</type>
+ </deferred-value>
+ </attribute>
+ </tag>
+
+ <tag>
+ <name>listTasksForActor</name>
+ <tag-class/>
+ <tei-class/>
+ <body-content>JSP</body-content>
+ <description><![CDATA[Read a list of task instances assigned to an actor
ID.]]></description>
+ <attribute>
+ <name>actorId</name>
+ <required>true</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[The actor ID whose task instances are to be
read.]]></description>
+ <deferred-value>
+ <type>java.lang.String</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>name</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A different name to use for this action.
Action names are used by some navigation handlers.]]></description>
+ <deferred-value>
+ <type>java.lang.String</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>navigate</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A boolean expression that can be used to
control whether navigation will be attempted after this action
completes.]]></description>
+ <deferred-value>
+ <type>boolean</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>target</name>
+ <required>true</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[An EL expression into which the task instance
list should be stored.]]></description>
+ <deferred-value>
+ <type>java.util.List</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>unless</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A boolean expression that, if true, will
prevent this action from being run.]]></description>
+ <deferred-value>
+ <type>boolean</type>
+ </deferred-value>
+ </attribute>
+ </tag>
+
+ <tag>
+ <name>listTasksForProcess</name>
+ <tag-class/>
+ <tei-class/>
+ <body-content>JSP</body-content>
+ <description><![CDATA[Read a list of task instances from a process
definition.]]></description>
+ <attribute>
+ <name>name</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A different name to use for this action.
Action names are used by some navigation handlers.]]></description>
+ <deferred-value>
+ <type>java.lang.String</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>navigate</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A boolean expression that can be used to
control whether navigation will be attempted after this action
completes.]]></description>
+ <deferred-value>
+ <type>boolean</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>process</name>
+ <required>true</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[The process whose task instances are to be
read.]]></description>
+ <deferred-value>
+ <type>org.jbpm.graph.def.ProcessDefinition</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>target</name>
+ <required>true</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[An EL expression into which the task instance
list should be stored.]]></description>
+ <deferred-value>
+ <type>java.util.List</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>unless</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A boolean expression that, if true, will
prevent this action from being run.]]></description>
+ <deferred-value>
+ <type>boolean</type>
+ </deferred-value>
+ </attribute>
+ </tag>
+
+ <tag>
+ <name>listTasksForProcessInstance</name>
+ <tag-class/>
+ <tei-class/>
+ <body-content>JSP</body-content>
+ <description><![CDATA[Read a list of task instances from a process
instance.]]></description>
+ <attribute>
+ <name>name</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A different name to use for this action.
Action names are used by some navigation handlers.]]></description>
+ <deferred-value>
+ <type>java.lang.String</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>navigate</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A boolean expression that can be used to
control whether navigation will be attempted after this action
completes.]]></description>
+ <deferred-value>
+ <type>boolean</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>processInstance</name>
+ <required>true</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[The process instance whose task instances are
to be read.]]></description>
+ <deferred-value>
+ <type>org.jbpm.graph.exe.ProcessInstance</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>target</name>
+ <required>true</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[An EL expression into which the task instance
list should be stored.]]></description>
+ <deferred-value>
+ <type>java.util.List</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>unless</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A boolean expression that, if true, will
prevent this action from being run.]]></description>
+ <deferred-value>
+ <type>boolean</type>
+ </deferred-value>
+ </attribute>
+ </tag>
+
+ <tag>
+ <name>listTokens</name>
+ <tag-class/>
+ <tei-class/>
+ <body-content>JSP</body-content>
+ <description><![CDATA[Read a token list from a process
instance.]]></description>
+ <attribute>
+ <name>name</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A different name to use for this action.
Action names are used by some navigation handlers.]]></description>
+ <deferred-value>
+ <type>java.lang.String</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>navigate</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A boolean expression that can be used to
control whether navigation will be attempted after this action
completes.]]></description>
+ <deferred-value>
+ <type>boolean</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>processInstance</name>
+ <required>true</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[The process instalce to read the token list
from.]]></description>
+ <deferred-value>
+ <type>org.jbpm.graph.exe.ProcessInstance</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>target</name>
+ <required>true</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[An EL expression into which the token list
should be stored.]]></description>
+ <deferred-value>
+ <type>java.util.List</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>unless</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A boolean expression that, if true, will
prevent this action from being run.]]></description>
+ <deferred-value>
+ <type>boolean</type>
+ </deferred-value>
+ </attribute>
+ </tag>
+
+ <tag>
+ <name>loadJob</name>
+ <tag-class/>
+ <tei-class/>
+ <body-content>JSP</body-content>
+ <description><![CDATA[Read a job instance from the
database.]]></description>
+ <attribute>
+ <name>id</name>
+ <required>true</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[The ID of the job to
load.]]></description>
+ <deferred-value>
+ <type>long</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>name</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A different name to use for this action.
Action names are used by some navigation handlers.]]></description>
+ <deferred-value>
+ <type>java.lang.String</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>navigate</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A boolean expression that can be used to
control whether navigation will be attempted after this action
completes.]]></description>
+ <deferred-value>
+ <type>boolean</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>target</name>
+ <required>true</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[An EL expression into which the job should be
stored.]]></description>
+ <deferred-value>
+ <type>org.jbpm.job.Job</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>unless</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A boolean expression that, if true, will
prevent this action from being run.]]></description>
+ <deferred-value>
+ <type>boolean</type>
+ </deferred-value>
+ </attribute>
+ </tag>
+
+ <tag>
+ <name>loadProcess</name>
+ <tag-class/>
+ <tei-class/>
+ <body-content>JSP</body-content>
+ <description><![CDATA[Read a process definition from the
database.]]></description>
+ <attribute>
+ <name>id</name>
+ <required>true</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[The ID of the process definition to
load.]]></description>
+ <deferred-value>
+ <type>long</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>name</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A different name to use for this action.
Action names are used by some navigation handlers.]]></description>
+ <deferred-value>
+ <type>java.lang.String</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>navigate</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A boolean expression that can be used to
control whether navigation will be attempted after this action
completes.]]></description>
+ <deferred-value>
+ <type>boolean</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>target</name>
+ <required>true</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[An EL expression into which the process
definition should be stored.]]></description>
+ <deferred-value>
+ <type>org.jbpm.graph.def.ProcessDefinition</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>unless</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A boolean expression that, if true, will
prevent this action from being run.]]></description>
+ <deferred-value>
+ <type>boolean</type>
+ </deferred-value>
+ </attribute>
+ </tag>
+
+ <tag>
+ <name>loadProcessInstance</name>
+ <tag-class/>
+ <tei-class/>
+ <body-content>JSP</body-content>
+ <description><![CDATA[Read a process instance from the
database.]]></description>
+ <attribute>
+ <name>forUpdate</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A boolean that controls whether the process
instance is to be read for update. This typically entails using a <code>SELECT ...
FOR UPDATE</code> statement, when database persistence is involved. By default,
this flag is <code>false</code> if the action is invoked during the
<code>RENDER_RESPONSE</code> phase, and <code>true</code>
otherwise.]]></description>
+ <deferred-value>
+ <type>boolean</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>id</name>
+ <required>true</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[The ID of the process instance to
load.]]></description>
+ <deferred-value>
+ <type>long</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>name</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A different name to use for this action.
Action names are used by some navigation handlers.]]></description>
+ <deferred-value>
+ <type>java.lang.String</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>navigate</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A boolean expression that can be used to
control whether navigation will be attempted after this action
completes.]]></description>
+ <deferred-value>
+ <type>boolean</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>target</name>
+ <required>true</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[An EL expression into which the process
instance should be stored.]]></description>
+ <deferred-value>
+ <type>org.jbpm.graph.exe.ProcessInstance</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>unless</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A boolean expression that, if true, will
prevent this action from being run.]]></description>
+ <deferred-value>
+ <type>boolean</type>
+ </deferred-value>
+ </attribute>
+ </tag>
+
+ <tag>
+ <name>loadTask</name>
+ <tag-class/>
+ <tei-class/>
+ <body-content>JSP</body-content>
+ <description><![CDATA[Read a task instance from the
database.]]></description>
+ <attribute>
+ <name>forUpdate</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A boolean that controls whether the task
instance is to be read for update. This typically entails using a <code>SELECT ...
FOR UPDATE</code> statement, when database persistence is involved. By default,
this flag is <code>false</code> if the action is invoked during the
<code>RENDER_RESPONSE</code> phase, and <code>true</code>
otherwise.]]></description>
+ <deferred-value>
+ <type>boolean</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>id</name>
+ <required>true</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[The ID of the task instance to
load.]]></description>
+ <deferred-value>
+ <type>long</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>name</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A different name to use for this action.
Action names are used by some navigation handlers.]]></description>
+ <deferred-value>
+ <type>java.lang.String</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>navigate</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A boolean expression that can be used to
control whether navigation will be attempted after this action
completes.]]></description>
+ <deferred-value>
+ <type>boolean</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>target</name>
+ <required>true</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[An EL expression into which the task instance
should be stored.]]></description>
+ <deferred-value>
+ <type>org.jbpm.taskmgmt.exe.TaskInstance</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>unless</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A boolean expression that, if true, will
prevent this action from being run.]]></description>
+ <deferred-value>
+ <type>boolean</type>
+ </deferred-value>
+ </attribute>
+ </tag>
+
+ <tag>
+ <name>loadToken</name>
+ <tag-class/>
+ <tei-class/>
+ <body-content>JSP</body-content>
+ <description><![CDATA[Read a token from the
database.]]></description>
+ <attribute>
+ <name>forUpdate</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A boolean that controls whether the token is
to be read for update. This typically entails using a <code>SELECT ... FOR
UPDATE</code> statement, when database persistence is involved. By default, this
flag is <code>false</code> if the action is invoked during the
<code>RENDER_RESPONSE</code> phase, and <code>true</code>
otherwise.]]></description>
+ <deferred-value>
+ <type>boolean</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>id</name>
+ <required>true</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[The ID of the token to
load.]]></description>
+ <deferred-value>
+ <type>long</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>name</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A different name to use for this action.
Action names are used by some navigation handlers.]]></description>
+ <deferred-value>
+ <type>java.lang.String</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>navigate</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A boolean expression that can be used to
control whether navigation will be attempted after this action
completes.]]></description>
+ <deferred-value>
+ <type>boolean</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>target</name>
+ <required>true</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[An EL expression into which the token should
be stored.]]></description>
+ <deferred-value>
+ <type>org.jbpm.graph.exe.Token</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>unless</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A boolean expression that, if true, will
prevent this action from being run.]]></description>
+ <deferred-value>
+ <type>boolean</type>
+ </deferred-value>
+ </attribute>
+ </tag>
+
+ <tag>
+ <name>moveToken</name>
+ <tag-class/>
+ <tei-class/>
+ <body-content>JSP</body-content>
+ <description><![CDATA[Move a token to a new node. Note that this does
not affect any tasks that may be active and associated with this
token.]]></description>
+ <attribute>
+ <name>name</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A different name to use for this action.
Action names are used by some navigation handlers.]]></description>
+ <deferred-value>
+ <type>java.lang.String</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>navigate</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A boolean expression that can be used to
control whether navigation will be attempted after this action
completes.]]></description>
+ <deferred-value>
+ <type>boolean</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>node</name>
+ <required>true</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[An EL expression which resolves to the node to
move the token to, or the name of the node.]]></description>
+ <deferred-value>
+ <type>java.lang.Object</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>token</name>
+ <required>true</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[An EL expression which resolves to the token
that is to be moved.]]></description>
+ <deferred-value>
+ <type>org.jbpm.graph.exe.Token</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>unless</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A boolean expression that, if true, will
prevent this action from being run.]]></description>
+ <deferred-value>
+ <type>boolean</type>
+ </deferred-value>
+ </attribute>
+ </tag>
+
+ <tag>
+ <name>removeVariable</name>
+ <tag-class/>
+ <tei-class/>
+ <body-content>JSP</body-content>
+ <description><![CDATA[Remove a process variable. Optionally store the
old value into an EL expression.]]></description>
+ <attribute>
+ <name>entity</name>
+ <required>true</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[The token, task, or process instance from
which the variable should be removed.]]></description>
+ <deferred-value>
+ <type>java.lang.Object</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>name</name>
+ <required>true</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[The name of the variable to
remove.]]></description>
+ <deferred-value>
+ <type>java.lang.String</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>name</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A different name to use for this action.
Action names are used by some navigation handlers.]]></description>
+ <deferred-value>
+ <type>java.lang.String</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>navigate</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A boolean expression that can be used to
control whether navigation will be attempted after this action
completes.]]></description>
+ <deferred-value>
+ <type>boolean</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>target</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[An optional EL expression into which the old
variable value will be stored.]]></description>
+ <deferred-value>
+ <type>java.lang.Object</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>unless</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A boolean expression that, if true, will
prevent this action from being run.]]></description>
+ <deferred-value>
+ <type>boolean</type>
+ </deferred-value>
+ </attribute>
+ </tag>
+
+ <tag>
+ <name>resume</name>
+ <tag-class/>
+ <tei-class/>
+ <body-content>JSP</body-content>
+ <description><![CDATA[Resume a running task, token, or process
instance.]]></description>
+ <attribute>
+ <name>name</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A different name to use for this action.
Action names are used by some navigation handlers.]]></description>
+ <deferred-value>
+ <type>java.lang.String</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>navigate</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A boolean expression that can be used to
control whether navigation will be attempted after this action
completes.]]></description>
+ <deferred-value>
+ <type>boolean</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>unless</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A boolean expression that, if true, will
prevent this action from being run.]]></description>
+ <deferred-value>
+ <type>boolean</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>value</name>
+ <required>true</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[The item to resume.]]></description>
+ <deferred-value>
+ <type>java.lang.Object</type>
+ </deferred-value>
+ </attribute>
+ </tag>
+
+ <tag>
+ <name>signal</name>
+ <tag-class/>
+ <tei-class/>
+ <body-content>JSP</body-content>
+ <description><![CDATA[Signal a token or process instance. Optionally
specify the transition.]]></description>
+ <attribute>
+ <name>name</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A different name to use for this action.
Action names are used by some navigation handlers.]]></description>
+ <deferred-value>
+ <type>java.lang.String</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>navigate</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A boolean expression that can be used to
control whether navigation will be attempted after this action
completes.]]></description>
+ <deferred-value>
+ <type>boolean</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>transition</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[The transition, or transition name, to signal
the item along.]]></description>
+ <deferred-value>
+ <type>java.lang.Object</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>unless</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A boolean expression that, if true, will
prevent this action from being run.]]></description>
+ <deferred-value>
+ <type>boolean</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>value</name>
+ <required>true</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[The item to signal.]]></description>
+ <deferred-value>
+ <type>java.lang.Object</type>
+ </deferred-value>
+ </attribute>
+ </tag>
+
+ <tag>
+ <name>startProcess</name>
+ <tag-class/>
+ <tei-class/>
+ <body-content>JSP</body-content>
+ <description><![CDATA[Start a process.]]></description>
+ <attribute>
+ <name>name</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A different name to use for this action.
Action names are used by some navigation handlers.]]></description>
+ <deferred-value>
+ <type>java.lang.String</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>navigate</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A boolean expression that can be used to
control whether navigation will be attempted after this action
completes.]]></description>
+ <deferred-value>
+ <type>boolean</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>process</name>
+ <required>true</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[The process definition to begin
executing.]]></description>
+ <deferred-value>
+ <type>org.jbpm.graph.def.ProcessDefinition</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>target</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[An EL expression into which the new process
instance will be stored.]]></description>
+ <deferred-value>
+ <type>org.jbpm.graph.exe.ProcessInstance</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>unless</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A boolean expression that, if true, will
prevent this action from being run.]]></description>
+ <deferred-value>
+ <type>boolean</type>
+ </deferred-value>
+ </attribute>
+ </tag>
+
+ <tag>
+ <name>startTask</name>
+ <tag-class/>
+ <tei-class/>
+ <body-content>JSP</body-content>
+ <description><![CDATA[Mark a task as started.]]></description>
+ <attribute>
+ <name>actorId</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[The actor to assign the task to. If not
given, the current actor is not changed.]]></description>
+ <deferred-value>
+ <type>java.lang.String</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>name</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A different name to use for this action.
Action names are used by some navigation handlers.]]></description>
+ <deferred-value>
+ <type>java.lang.String</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>navigate</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A boolean expression that can be used to
control whether navigation will be attempted after this action
completes.]]></description>
+ <deferred-value>
+ <type>boolean</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>overwriteSwimlane</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A flag specifying whether the swimlane will be
overwritten.]]></description>
+ <deferred-value>
+ <type>boolean</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>task</name>
+ <required>true</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[The task to mark as
started.]]></description>
+ <deferred-value>
+ <type>org.jbpm.taskmgmt.exe.TaskInstance</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>unless</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A boolean expression that, if true, will
prevent this action from being run.]]></description>
+ <deferred-value>
+ <type>boolean</type>
+ </deferred-value>
+ </attribute>
+ </tag>
+
+ <tag>
+ <name>suspend</name>
+ <tag-class/>
+ <tei-class/>
+ <body-content>JSP</body-content>
+ <description><![CDATA[Suspend a running task, token, or process
instance.]]></description>
+ <attribute>
+ <name>name</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A different name to use for this action.
Action names are used by some navigation handlers.]]></description>
+ <deferred-value>
+ <type>java.lang.String</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>navigate</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A boolean expression that can be used to
control whether navigation will be attempted after this action
completes.]]></description>
+ <deferred-value>
+ <type>boolean</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>unless</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A boolean expression that, if true, will
prevent this action from being run.]]></description>
+ <deferred-value>
+ <type>boolean</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>value</name>
+ <required>true</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[The item to
suspend.]]></description>
+ <deferred-value>
+ <type>java.lang.Object</type>
+ </deferred-value>
+ </attribute>
+ </tag>
+
+ <tag>
+ <name>taskForm</name>
+ <tag-class/>
+ <tei-class/>
+ <body-content>JSP</body-content>
+ <description><![CDATA[Represents the task form action
source.]]></description>
+ <attribute>
+ <name>buttonTarget</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[An EL expression into which the type of button
clicked will be stored. It will be one of:
<ul><li><code>cancel</code></li><li><code>save</code></li><li><code>transition</code></li></ul>]]></description>
+ <deferred-value>
+ <type>java.lang.String</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>transitionTarget</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[An EL expression into which the submitted
transition name will be stored (if any).]]></description>
+ <deferred-value>
+ <type>java.lang.String</type>
+ </deferred-value>
+ </attribute>
+ </tag>
+
+ <tag>
+ <name>updateTaskStart</name>
+ <tag-class/>
+ <tei-class/>
+ <body-content>JSP</body-content>
+ <description><![CDATA[Update the start date of a started
task.]]></description>
+ <attribute>
+ <name>name</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A different name to use for this action.
Action names are used by some navigation handlers.]]></description>
+ <deferred-value>
+ <type>java.lang.String</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>navigate</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A boolean expression that can be used to
control whether navigation will be attempted after this action
completes.]]></description>
+ <deferred-value>
+ <type>boolean</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>startDate</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[The start date to assign. If not given, the
current date will be used.]]></description>
+ <deferred-value>
+ <type>java.util.Date</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>task</name>
+ <required>true</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[The task instance to
update.]]></description>
+ <deferred-value>
+ <type>org.jbpm.taskmgmt.exe.TaskInstance</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>unless</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A boolean expression that, if true, will
prevent this action from being run.]]></description>
+ <deferred-value>
+ <type>boolean</type>
+ </deferred-value>
+ </attribute>
+ </tag>
+
+ <tag>
+ <name>updateVariable</name>
+ <tag-class/>
+ <tei-class/>
+ <body-content>JSP</body-content>
+ <description><![CDATA[Update a process variable. Optionally store the
old value into an EL expression.]]></description>
+ <attribute>
+ <name>entity</name>
+ <required>true</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[The token, task, or process instance for which
the variable should be updated.]]></description>
+ <deferred-value>
+ <type>java.lang.Object</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>name</name>
+ <required>true</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[The name of the variable to
update.]]></description>
+ <deferred-value>
+ <type>java.lang.String</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>name</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A different name to use for this action.
Action names are used by some navigation handlers.]]></description>
+ <deferred-value>
+ <type>java.lang.String</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>navigate</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A boolean expression that can be used to
control whether navigation will be attempted after this action
completes.]]></description>
+ <deferred-value>
+ <type>boolean</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>target</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[An optional EL expression into which the old
variable value will be stored.]]></description>
+ <deferred-value>
+ <type>java.lang.Object</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>unless</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A boolean expression that, if true, will
prevent this action from being run.]]></description>
+ <deferred-value>
+ <type>boolean</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>value</name>
+ <required>true</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[The new variable
value.]]></description>
+ <deferred-value>
+ <type>java.lang.Object</type>
+ </deferred-value>
+ </attribute>
+ </tag>
+</taglib>
Added: projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/tld/identity.tld
===================================================================
--- projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/tld/identity.tld
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/tld/identity.tld 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,620 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library
1.2//EN" "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
+
+<taglib
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-jsptaglibrary_2_1.xsd"
version="2.1">
+ <tlib-version>1.2</tlib-version>
+ <short-name>id</short-name>
+ <
uri>http://jbpm.org/jbpm4jsf/identity</uri>
+ <description><![CDATA[JSF Tag Library for jBPM
applications.]]></description>
+
+ <tag>
+ <name>addMembership</name>
+ <tag-class/>
+ <tei-class/>
+ <body-content>JSP</body-content>
+ <description><![CDATA[Add a group membership to a
user.]]></description>
+ <attribute>
+ <name>group</name>
+ <required>true</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[The group that the user should become a member
of.]]></description>
+ <deferred-value>
+ <type>org.jbpm.identity.Group</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>name</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A different name to use for this action.
Action names are used by some navigation handlers.]]></description>
+ <deferred-value>
+ <type>java.lang.String</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>navigate</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A boolean expression that can be used to
control whether navigation will be attempted after this action
completes.]]></description>
+ <deferred-value>
+ <type>boolean</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>role</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[The name of the
role.]]></description>
+ <deferred-value>
+ <type>java.lang.String</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>target</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[An EL expression into which the created
membership should be stored.]]></description>
+ <deferred-value>
+ <type>org.jbpm.identity.Membership</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>unless</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A boolean expression that, if true, will
prevent this action from being run.]]></description>
+ <deferred-value>
+ <type>boolean</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>user</name>
+ <required>true</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[The user to whom the membership is
granted.]]></description>
+ <deferred-value>
+ <type>org.jbpm.identity.User</type>
+ </deferred-value>
+ </attribute>
+ </tag>
+
+ <tag>
+ <name>createGroup</name>
+ <tag-class/>
+ <tei-class/>
+ <body-content>JSP</body-content>
+ <description><![CDATA[Create a new group and save it in the
database.]]></description>
+ <attribute>
+ <name>groupName</name>
+ <required>true</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[The name of the group to
create.]]></description>
+ <deferred-value>
+ <type>java.lang.String</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>name</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A different name to use for this action.
Action names are used by some navigation handlers.]]></description>
+ <deferred-value>
+ <type>java.lang.String</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>navigate</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A boolean expression that can be used to
control whether navigation will be attempted after this action
completes.]]></description>
+ <deferred-value>
+ <type>boolean</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>parentGroup</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[The parent group, if
any.]]></description>
+ <deferred-value>
+ <type>org.jbpm.identity.Group</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>target</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[An EL expression into which the created group
should be stored.]]></description>
+ <deferred-value>
+ <type>org.jbpm.identity.Group</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>type</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[The type of the new
group.]]></description>
+ <deferred-value>
+ <type>java.lang.String</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>unless</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A boolean expression that, if true, will
prevent this action from being run.]]></description>
+ <deferred-value>
+ <type>boolean</type>
+ </deferred-value>
+ </attribute>
+ </tag>
+
+ <tag>
+ <name>createUser</name>
+ <tag-class/>
+ <tei-class/>
+ <body-content>JSP</body-content>
+ <description><![CDATA[Create a new user and save it in the
database.]]></description>
+ <attribute>
+ <name>email</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[The email of the new
user.]]></description>
+ <deferred-value>
+ <type>java.lang.String</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>name</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A different name to use for this action.
Action names are used by some navigation handlers.]]></description>
+ <deferred-value>
+ <type>java.lang.String</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>navigate</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A boolean expression that can be used to
control whether navigation will be attempted after this action
completes.]]></description>
+ <deferred-value>
+ <type>boolean</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>password</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[The password of the new
user.]]></description>
+ <deferred-value>
+ <type>java.lang.String</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>passwordConfirm</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[The password of the new user again. If this
value does not match the value of the <code>password</code> attribute, user
creation will fail.]]></description>
+ <deferred-value>
+ <type>java.lang.String</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>target</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[An EL expression into which the created user
should be stored.]]></description>
+ <deferred-value>
+ <type>org.jbpm.identity.User</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>unless</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A boolean expression that, if true, will
prevent this action from being run.]]></description>
+ <deferred-value>
+ <type>boolean</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>userName</name>
+ <required>true</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[The user name of the user to
create.]]></description>
+ <deferred-value>
+ <type>java.lang.String</type>
+ </deferred-value>
+ </attribute>
+ </tag>
+
+ <tag>
+ <name>deleteGroup</name>
+ <tag-class/>
+ <tei-class/>
+ <body-content>JSP</body-content>
+ <description><![CDATA[Delete a group from the
database.]]></description>
+ <attribute>
+ <name>group</name>
+ <required>true</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[The group to
delete.]]></description>
+ <deferred-value>
+ <type>org.jbpm.identity.Group</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>name</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A different name to use for this action.
Action names are used by some navigation handlers.]]></description>
+ <deferred-value>
+ <type>java.lang.String</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>navigate</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A boolean expression that can be used to
control whether navigation will be attempted after this action
completes.]]></description>
+ <deferred-value>
+ <type>boolean</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>unless</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A boolean expression that, if true, will
prevent this action from being run.]]></description>
+ <deferred-value>
+ <type>boolean</type>
+ </deferred-value>
+ </attribute>
+ </tag>
+
+ <tag>
+ <name>deleteMembership</name>
+ <tag-class/>
+ <tei-class/>
+ <body-content>JSP</body-content>
+ <description><![CDATA[Delete a membership from the
database.]]></description>
+ <attribute>
+ <name>membershipId</name>
+ <required>true</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[The ID of the membership to
delete.]]></description>
+ <deferred-value>
+ <type>long</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>name</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A different name to use for this action.
Action names are used by some navigation handlers.]]></description>
+ <deferred-value>
+ <type>java.lang.String</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>navigate</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A boolean expression that can be used to
control whether navigation will be attempted after this action
completes.]]></description>
+ <deferred-value>
+ <type>boolean</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>unless</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A boolean expression that, if true, will
prevent this action from being run.]]></description>
+ <deferred-value>
+ <type>boolean</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>user</name>
+ <required>true</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[The user containing the membership to
delete.]]></description>
+ <deferred-value>
+ <type>org.jbpm.identity.User</type>
+ </deferred-value>
+ </attribute>
+ </tag>
+
+ <tag>
+ <name>deleteUser</name>
+ <tag-class/>
+ <tei-class/>
+ <body-content>JSP</body-content>
+ <description><![CDATA[Delete a user from the
database.]]></description>
+ <attribute>
+ <name>name</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A different name to use for this action.
Action names are used by some navigation handlers.]]></description>
+ <deferred-value>
+ <type>java.lang.String</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>navigate</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A boolean expression that can be used to
control whether navigation will be attempted after this action
completes.]]></description>
+ <deferred-value>
+ <type>boolean</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>unless</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A boolean expression that, if true, will
prevent this action from being run.]]></description>
+ <deferred-value>
+ <type>boolean</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>user</name>
+ <required>true</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[The user to delete.]]></description>
+ <deferred-value>
+ <type>org.jbpm.identity.User</type>
+ </deferred-value>
+ </attribute>
+ </tag>
+
+ <tag>
+ <name>listGroups</name>
+ <tag-class/>
+ <tei-class/>
+ <body-content>JSP</body-content>
+ <description><![CDATA[Read the list of groups from the
database.]]></description>
+ <attribute>
+ <name>name</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A different name to use for this action.
Action names are used by some navigation handlers.]]></description>
+ <deferred-value>
+ <type>java.lang.String</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>navigate</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A boolean expression that can be used to
control whether navigation will be attempted after this action
completes.]]></description>
+ <deferred-value>
+ <type>boolean</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>target</name>
+ <required>true</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[An EL expression into which the group list
should be stored.]]></description>
+ <deferred-value>
+ <type>java.util.List</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>unless</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A boolean expression that, if true, will
prevent this action from being run.]]></description>
+ <deferred-value>
+ <type>boolean</type>
+ </deferred-value>
+ </attribute>
+ </tag>
+
+ <tag>
+ <name>listUsers</name>
+ <tag-class/>
+ <tei-class/>
+ <body-content>JSP</body-content>
+ <description><![CDATA[Read the list of users from the
database.]]></description>
+ <attribute>
+ <name>name</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A different name to use for this action.
Action names are used by some navigation handlers.]]></description>
+ <deferred-value>
+ <type>java.lang.String</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>navigate</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A boolean expression that can be used to
control whether navigation will be attempted after this action
completes.]]></description>
+ <deferred-value>
+ <type>boolean</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>target</name>
+ <required>true</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[An EL expression into which the user list
should be stored.]]></description>
+ <deferred-value>
+ <type>java.util.List</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>unless</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A boolean expression that, if true, will
prevent this action from being run.]]></description>
+ <deferred-value>
+ <type>boolean</type>
+ </deferred-value>
+ </attribute>
+ </tag>
+
+ <tag>
+ <name>loadGroup</name>
+ <tag-class/>
+ <tei-class/>
+ <body-content>JSP</body-content>
+ <description><![CDATA[Read a group from the
database.]]></description>
+ <attribute>
+ <name>id</name>
+ <required>true</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[The ID of the group to
load.]]></description>
+ <deferred-value>
+ <type>long</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>name</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A different name to use for this action.
Action names are used by some navigation handlers.]]></description>
+ <deferred-value>
+ <type>java.lang.String</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>navigate</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A boolean expression that can be used to
control whether navigation will be attempted after this action
completes.]]></description>
+ <deferred-value>
+ <type>boolean</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>target</name>
+ <required>true</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[An EL expression into which the group should
be stored.]]></description>
+ <deferred-value>
+ <type>org.jbpm.identity.Group</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>unless</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A boolean expression that, if true, will
prevent this action from being run.]]></description>
+ <deferred-value>
+ <type>boolean</type>
+ </deferred-value>
+ </attribute>
+ </tag>
+
+ <tag>
+ <name>loadGroupByName</name>
+ <tag-class/>
+ <tei-class/>
+ <body-content>JSP</body-content>
+ <description><![CDATA[Read a group from the database by
name.]]></description>
+ <attribute>
+ <name>groupName</name>
+ <required>true</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[The name of the group to
load.]]></description>
+ <deferred-value>
+ <type>java.lang.String</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>name</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A different name to use for this action.
Action names are used by some navigation handlers.]]></description>
+ <deferred-value>
+ <type>java.lang.String</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>navigate</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A boolean expression that can be used to
control whether navigation will be attempted after this action
completes.]]></description>
+ <deferred-value>
+ <type>boolean</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>target</name>
+ <required>true</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[An EL expression into which the group should
be stored.]]></description>
+ <deferred-value>
+ <type>org.jbpm.identity.Group</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>unless</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A boolean expression that, if true, will
prevent this action from being run.]]></description>
+ <deferred-value>
+ <type>boolean</type>
+ </deferred-value>
+ </attribute>
+ </tag>
+
+ <tag>
+ <name>loadUser</name>
+ <tag-class/>
+ <tei-class/>
+ <body-content>JSP</body-content>
+ <description><![CDATA[Read a user from the
database.]]></description>
+ <attribute>
+ <name>id</name>
+ <required>true</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[The ID of the user to
load.]]></description>
+ <deferred-value>
+ <type>long</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>name</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A different name to use for this action.
Action names are used by some navigation handlers.]]></description>
+ <deferred-value>
+ <type>java.lang.String</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>navigate</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A boolean expression that can be used to
control whether navigation will be attempted after this action
completes.]]></description>
+ <deferred-value>
+ <type>boolean</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>target</name>
+ <required>true</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[An EL expression into which the user should be
stored.]]></description>
+ <deferred-value>
+ <type>org.jbpm.identity.User</type>
+ </deferred-value>
+ </attribute>
+ <attribute>
+ <name>unless</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <description><![CDATA[A boolean expression that, if true, will
prevent this action from being run.]]></description>
+ <deferred-value>
+ <type>boolean</type>
+ </deferred-value>
+ </attribute>
+ </tag>
+</taglib>
Added: projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/tld/tf.tld
===================================================================
--- projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/tld/tf.tld
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/tld/tf.tld 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library
1.2//EN" "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
+
+<taglib
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-jsptaglibrary_2_1.xsd"
version="2.1">
+ <tlib-version>1.2</tlib-version>
+ <short-name>tf</short-name>
+ <
uri>http://jbpm.org/jbpm4jsf/tf</uri>
+ <description><![CDATA[Components pertaining to task form data and command
elements.]]></description>
+</taglib>
Added: projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/tld/tfl.tld
===================================================================
--- projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/tld/tfl.tld
(rev 0)
+++
projects/jsf-console/branches/jsf-console-3.2.x/jbpm4jsf/src/main/tld/tfl.tld 2008-10-28
13:39:17 UTC (rev 2646)
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library
1.2//EN" "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd">
+
+<taglib
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-jsptaglibrary_2_1.xsd"
version="2.1">
+ <tlib-version>1.2</tlib-version>
+ <short-name>tfl</short-name>
+ <
uri>http://jbpm.org/jbpm4jsf/tfl</uri>
+ <description><![CDATA[Components pertaining to task form layout and
formatting.]]></description>
+</taglib>