| org.emforge.jbpm.BpmServiceImpl
BpmServiceImpl | public class BpmServiceImpl extends JbpmTemplate implements BpmService,ApplicationContextAware(Code) | | Implementation for Bpm Web-Service
author: akakunin |
Method Summary | |
public Boolean | addComment(long i_taskId, String i_comment) | public WorkflowTO | addNewWorkflow(byte[] i_workflowContent, String comment) | public void | afterPropertiesSet() | public StepTO | assignStep(StepTO i_step, String i_newActor, String i_comment) | public boolean | canAddAttachment(long taskId) | public boolean | canAddNewWorkflow() | public boolean | canChangeStep(StepTO step) | public boolean | canChangeTask(TaskTO task) | public boolean | canCommentTask(long taskId) | public boolean | canCompleteStep(StepTO step) | public boolean | canEditTaskDescription(TaskTO task) | public boolean | canReadTask(long stepId) | public boolean | canReassignSteps(TaskTO task) | public boolean | canStartNewTask(String projectName) | public boolean | canStopTask(TaskTO task) | public StepTO | changeStepPriority(StepTO i_step, PriorityTO i_newPriority, String i_comment) | public TaskTO | completeStep(StepTO i_step, String i_transitionName, String i_comment) | public List<TaskTO> | findTasks(String i_milestoneName, TaskStatus i_status, boolean i_includeSubTasks) Find tasks We will have reporting service, allowed us to generate reports for any criteria. | public List<StepTO> | getActiveSteps(String i_projectName) | protected Collection<TaskInstance> | getAllBlockers(ProcessInstance process) | public StepTO[] | getBlockingSteps(long i_taskId) | protected static List<ProcessInstance> | getBlockingSubProcesses(JbpmContext context, ProcessInstance processInstance) | public TaskTO[] | getBlockingSubTasks(long taskId) | protected static Collection<TaskInstance> | getBlockingTasks(ProcessInstance process) | public TaskTO[] | getFinishedSubTasks(long taskId) | protected Date | getLastProcessChangesDate(ProcessInstance process) | protected TaskInstance | getParentTask(ProcessInstance i_process) | public StepTO | getStep(long stepId) | public TaskTO | getTask(long taskId) | public CommentTO[] | getTaskComments(long i_taskId) | public HistoryTO[] | getTaskHistory(long taskId) | public WorkflowTO[] | getUsedWorkflows(String name, int version) | public WorkflowTO | getWorkflowById(long i_workflowId) Return workflow by id
Parameters: workflowId - - id of workflow Workflow object for specified id. | public WorkflowTO | getWorkflowByName(String i_name, int i_version) Return workflow by name and version
Parameters: name - - name of workflow Parameters: version - - version. | public HistoryTO[] | getWorkflowHistory(String i_name, int i_version) | public byte[] | getWorkflowIcon(long workflowId) | public byte[] | getWorkflowImage(long workflowId) | public StepTO | getWorkflowStartStep(String i_name, int i_version, String i_projectName) Returns start step for specified workflow. | public WorkflowTO[] | getWorkflows() | public Boolean | hasTask(long taskId) | public Boolean | hasWorkflow(String i_name, int i_version) | public Boolean | isPossibleRequestStatus(long stepId) | public Boolean | requestStatus(long stepId, String request) | public Boolean | saveTask(TaskTO i_task, String i_comment) | public void | setApplicationContext(ApplicationContext i_applicationContext) | public static void | setDueDate(ProcessInstance processInstance, Date dueDate) | public void | setEmForgeContext(EmForgeContext i_emForgeContext) | public void | setEmailServices(EmailServices i_emailServices) | public void | setInitWorkflowsFolder(Resource i_initWorkflowsFolder) | public static void | setPriority(ProcessInstance processInstance, Integer i_priority) | public static void | setProject(ProcessInstance processInstance, ProjectDO project) | public void | setProjectService(ProjectService i_projectService) | public void | setUserDao(UserDao i_userDao) | public void | setUserFactory(UserFactory i_userFactory) | public TaskTO | startSubTask(long i_parentStepId, StepTO i_startStep, String i_transitionName, String i_tempPageName) | public TaskTO | startTask(StepTO i_startStep, String i_transitionName, String i_tempPageName) Starts new task
Parameters: startStep - - information about started task like: priority, variable values, required by start task,dueDate and so on Parameters: transitionName - - name of transition, should be used for completing start-task Parameters: tempPageName - - in case then description and attachments was specified for task, they were stored intemporare Wiki-Page. | public Boolean | stopTask(long i_taskId, String i_comment) | public String | writeWorkflowImageTable(WorkflowTO i_workflow, TaskTO i_task, StepTO i_step) |
COMMENT_FILENAME | final public static String COMMENT_FILENAME(Code) | | Change to Protected as soon as we will remove old classes
|
DATE_SEPARATOR | final protected static String DATE_SEPARATOR(Code) | | |
MESSAGE_SEPARATOR | final protected static String MESSAGE_SEPARATOR(Code) | | |
USER_SEPARATOR | final protected static String USER_SEPARATOR(Code) | | |
addNewWorkflow | public WorkflowTO addNewWorkflow(byte[] i_workflowContent, String comment) throws EmForgeException(Code) | | Add new workflow
Parameters: workflowContent - - content of par-file Parameters: comment - - comment for this deployment create workflow |
afterPropertiesSet | public void afterPropertiesSet() throws Exception(Code) | | See Also: org.springmodules.workflow.jbpm31.JbpmTemplate.afterPropertiesSet |
canAddAttachment | public boolean canAddAttachment(long taskId)(Code) | | Is Current user allowed to add attachment for task
Parameters: taskId - |
canAddNewWorkflow | public boolean canAddNewWorkflow()(Code) | | Is current user allowed to add new workflows
|
canChangeStep | public boolean canChangeStep(StepTO step)(Code) | | Is current user allowed to change the step
Parameters: stepId - |
canChangeTask | public boolean canChangeTask(TaskTO task)(Code) | | Is current user allowed to change the task
Parameters: taskId - |
canCommentTask | public boolean canCommentTask(long taskId)(Code) | | Is current user allowed to add comment for the task
Parameters: taskId - |
canCompleteStep | public boolean canCompleteStep(StepTO step)(Code) | | is current user allowed to complete specified step
Parameters: stepId - |
canEditTaskDescription | public boolean canEditTaskDescription(TaskTO task)(Code) | | Is Current User allowed to edit task description
Parameters: taskId - |
canReadTask | public boolean canReadTask(long stepId)(Code) | | is current user allowed to read specified task Currently anybody can see any task
Parameters: stepId - |
canReassignSteps | public boolean canReassignSteps(TaskTO task)(Code) | | Is Current user allowed to reassign the steps for specified task
Parameters: stepId - |
canStartNewTask | public boolean canStartNewTask(String projectName)(Code) | | Is Current user allowed to start new tasks for specified project
Parameters: projectName - |
canStopTask | public boolean canStopTask(TaskTO task)(Code) | | Is current user allowed to close the specified task
Parameters: taskId - |
completeStep | public TaskTO completeStep(StepTO i_step, String i_transitionName, String i_comment) throws EmForgeException(Code) | | Complete step
Parameters: step - - step to be completed with all required variables set Parameters: transitionName - - transaction name, should be used for completion Parameters: comment - - comment related to completion - new state of Task processed throws: EmForgeException - |
findTasks | public List<TaskTO> findTasks(String i_milestoneName, TaskStatus i_status, boolean i_includeSubTasks) throws EmForgeException(Code) | | Find tasks We will have reporting service, allowed us to generate reports for any criteria. But - we will need
also some easy-reporting - there we will able find and display list of tasks This is initial version of method,
implemented this 'easy-reporting' it's interface will be changed in future to support more options for search
Parameters: milestoneName - - Parameters: status - Parameters: includeSubTasks - |
getActiveSteps | public List<StepTO> getActiveSteps(String i_projectName) throws EmForgeException(Code) | | Returns List of Active Tasks for Logged-In user for Specified Project
Parameters: projectName - |
getAllBlockers | protected Collection<TaskInstance> getAllBlockers(ProcessInstance process)(Code) | | Parameters: process - |
getBlockingSubProcesses | protected static List<ProcessInstance> getBlockingSubProcesses(JbpmContext context, ProcessInstance processInstance)(Code) | | Returns list of blocking subprocess instances
Parameters: context - Parameters: processInstance - |
getBlockingSubTasks | public TaskTO[] getBlockingSubTasks(long taskId) throws EmForgeException(Code) | | Returns list of currently active subtasks for specified task
Parameters: taskId - - parent task id list of active sub-tasks |
getBlockingTasks | protected static Collection<TaskInstance> getBlockingTasks(ProcessInstance process)(Code) | | Get List of Blocking tasks for Process
|
getFinishedSubTasks | public TaskTO[] getFinishedSubTasks(long taskId) throws EmForgeException(Code) | | Returns list of finished subtasks for specified task
Parameters: taskId - - parent task id list of finished sub-tasks |
getLastProcessChangesDate | protected Date getLastProcessChangesDate(ProcessInstance process)(Code) | | Parameters: process - |
getParentTask | protected TaskInstance getParentTask(ProcessInstance i_process)(Code) | | Parameters: i_process - |
getStep | public StepTO getStep(long stepId) throws EmForgeException(Code) | | Returns Specific Step by ID
Parameters: stepId - - step to return step object, or null if nothing found |
getTask | public TaskTO getTask(long taskId) throws EmForgeException(Code) | | Returns Specific Task by ID
Parameters: taskId - - task to return task object, or null if nothing found |
getTaskComments | public CommentTO[] getTaskComments(long i_taskId) throws EmForgeException(Code) | | Returns Comments for Specified Task
Parameters: taskId - - id of task we need to get comments array of task comments |
getWorkflowById | public WorkflowTO getWorkflowById(long i_workflowId) throws EmForgeException(Code) | | Return workflow by id
Parameters: workflowId - - id of workflow Workflow object for specified id. Null is not found |
getWorkflowByName | public WorkflowTO getWorkflowByName(String i_name, int i_version) throws EmForgeException(Code) | | Return workflow by name and version
Parameters: name - - name of workflow Parameters: version - - version. If -1 is used - means last version of specified workflow Workflow object for specified name and version. Null is not found |
getWorkflowHistory | public HistoryTO[] getWorkflowHistory(String i_name, int i_version)(Code) | | Retunrs history for workflow versions
Parameters: name - - workflow name to get history Parameters: version - - workflow version to get history throws: EmForgeException - |
getWorkflowIcon | public byte[] getWorkflowIcon(long workflowId)(Code) | | Method used in Process Icon Servlet
Parameters: workflowId - |
getWorkflowImage | public byte[] getWorkflowImage(long workflowId)(Code) | | Returns workflow image
Parameters: workflowId - |
getWorkflowStartStep | public StepTO getWorkflowStartStep(String i_name, int i_version, String i_projectName) throws EmForgeException(Code) | | Returns start step for specified workflow. It is "empty" task - it's id is null since it is not created. It
should be used for filling required variables and any other required information, getting information about
transition, and starting new task later with passing this step back
Parameters: name - - started workflow name Parameters: version - - started workflow version Parameters: projectName - - name of project, for which workflow is created |
isPossibleRequestStatus | public Boolean isPossibleRequestStatus(long stepId) throws EmForgeException(Code) | | Is it possible for currently logged user request a status for specified step
Parameters: stepId - - step id to check true if it is possible to request status throws: EmForgeException - |
setApplicationContext | public void setApplicationContext(ApplicationContext i_applicationContext) throws BeansException(Code) | | See Also: org.springframework.context.ApplicationContextAware.setApplicationContext(org.springframework.context.ApplicationContext) |
setDueDate | public static void setDueDate(ProcessInstance processInstance, Date dueDate)(Code) | | Parameters: processInstance - Parameters: dueDate - |
setEmForgeContext | public void setEmForgeContext(EmForgeContext i_emForgeContext)(Code) | | Parameters: i_emForgeContext - |
setEmailServices | public void setEmailServices(EmailServices i_emailServices)(Code) | | Parameters: i_emailServices - |
setInitWorkflowsFolder | public void setInitWorkflowsFolder(Resource i_initWorkflowsFolder)(Code) | | Parameters: i_initWorkflowsFolder - |
setPriority | public static void setPriority(ProcessInstance processInstance, Integer i_priority)(Code) | | Set Priority into Process Instance
Parameters: i_priority - |
setProject | public static void setProject(ProcessInstance processInstance, ProjectDO project)(Code) | | Parameters: processInstance - Parameters: project - |
setProjectService | public void setProjectService(ProjectService i_projectService)(Code) | | Parameters: i_projectService - |
setUserDao | public void setUserDao(UserDao i_userDao)(Code) | | Parameters: i_userDao - |
setUserFactory | public void setUserFactory(UserFactory i_userFactory)(Code) | | Parameters: i_userFactory - |
startSubTask | public TaskTO startSubTask(long i_parentStepId, StepTO i_startStep, String i_transitionName, String i_tempPageName) throws EmForgeException(Code) | | Create subtask for specified step
Parameters: stepId - - step used as parent for subtask Parameters: name - - name of workflow used for starting task Parameters: version - - version of workflow, used to start throws: EmForgeException - |
startTask | public TaskTO startTask(StepTO i_startStep, String i_transitionName, String i_tempPageName) throws EmForgeException(Code) | | Starts new task
Parameters: startStep - - information about started task like: priority, variable values, required by start task,dueDate and so on Parameters: transitionName - - name of transition, should be used for completing start-task Parameters: tempPageName - - in case then description and attachments was specified for task, they were stored intemporare Wiki-Page. this param contains name of this page May be empty created task |
stopTask | public Boolean stopTask(long i_taskId, String i_comment) throws EmForgeException(Code) | | Stop Specified Task
Parameters: taskId - - id of task we need to stop Parameters: comment - - comment specified why task is stopped (may be empty) true is task stopped, othervise false |
writeWorkflowImageTable | public String writeWorkflowImageTable(WorkflowTO i_workflow, TaskTO i_task, StepTO i_step) throws EmForgeException(Code) | | Very specific method This code got from jBPM and used for image generation It should be used onli inside
ProcessImageComponent
Parameters: writer - Parameters: i_workflow - Parameters: i_task - Parameters: i_step - throws: DocumentException - throws: IOException - |
|
|