| java.lang.Object org.obe.engine.WorkflowEngine
WorkflowEngine | public class WorkflowEngine implements WorkflowEngineIntf,WorkflowService(Code) | | The workflow engine provides the means to create and execute workflow
processes, as well as means for querying open activities and work items.
N.B. Applications which embed OBE should never call WorkflowEngine
directly; instead, they should call via one of the
WMClient implementations, which provides authentication, authorization and transaction
control.
author: Adrian Price author: Anthony Eden |
Method Summary | |
ProcessInstance | _createProcessInstance(String processDefinitionId, String processInstanceName, String parentActivityInstanceId, boolean internal) | public void | abortProcessInstance(String processInstanceId) Abort the specified process instance. | public void | abortProcessInstances(String processDefinitionId, WMFilter filter) Abort the process instances which were spawned from the given
process definition and which match the specified filter. | public void | assignActivityInstanceAttribute(String processInstanceId, String activityInstanceId, String attributeName, Object attributeValue) Set the specified activity attribute value. | public void | assignActivityInstancesAttribute(String processDefinitionId, String activityDefinitionId, WMFilter filter, String attributeName, Object attributeValue) Set the specified activity attribute value for the activity instances
which were spawned from the specified process and activity definition
and which match the filter. | public void | assignProcessInstanceAttribute(String processInstanceId, String attributeName, Object attributeValue) Set the specified process instance attribute value. | public void | assignProcessInstancesAttribute(String processDefinitionId, WMFilter filter, String attributeName, Object attributeValue) Set the process instance attribute value for the process instances
spawned from the specified process definition which match the given
filter. | public void | assignWorkItemAttribute(String processInstanceId, String workItemId, String attributeName, Object attributeValue) Set the specified work item attribute value. | void | cascadeActivityInstanceState(WorkflowProcess workflow, Activity activity, ActivityInstance activityInstance, int activityState, boolean throwActivityException, int workItemState, boolean throwWorkItemException, boolean forceTransitions) | void | cascadeProcessInstanceState(WorkflowProcess workflow, ProcessInstance processInstance, int processState, boolean throwProcessException, int activityState, boolean throwActivityException, int workItemState, boolean throwWorkItemException, boolean forceTransitions) | public void | changeActivityInstanceState(String processInstanceId, String activityInstanceId, WMActivityInstanceState newState) | public void | changeActivityInstanceState(String processInstanceId, String activityInstanceId, WMActivityInstanceState newState, boolean allowAutoStart) Change the activity instance state. | public void | changeActivityInstancesState(String processDefinitionId, String activityDefinitionId, WMFilter filter, WMActivityInstanceState newState) Change the activity instance states for the activities spawned
from the given process definition which match the filter. | public void | changeProcessDefinitionState(String processDefinitionId, WMProcessDefinitionState newState) Change the process definition state. | public void | changeProcessInstanceState(String processInstanceId, WMProcessInstanceState newState) Change the process instance state. | public void | changeProcessInstancesState(String processDefinitionId, WMFilter filter, WMProcessInstanceState newState) Change the process instance state for all of the process instances
spawned from the given process definition. | public void | changeWorkItemState(String processInstanceId, String workItemId, WMWorkItemState newState) | public void | completeWorkItem(String processInstanceId, String workItemId) Complete the specified work item. | public String | createPackage(XPDLPackage pkg) | public String | createPackage(String content, String contentType) Creates a package using the supplied content.
Parameters: content - Package definition in XPDL format. Parameters: contentType - The MIME content type of the process definition. | public String | createProcessInstance(String processDefinitionId, String processInstanceName) Creates a new process instance for the given process definition. | public String | createProcessInstanceVersioned(String name, String processInstanceName) Creates a new instance of the named workflow process. | public void | createTriggers(XPDLPackage pkg) | public int | deleteAuditEntries(WMFilter filter) | public void | deletePackage(String packageId) Permanently deletes the specified package. | public void | deleteProcessInstance(String processInstanceId) Permanently deletes the specified process instance. | public void | deleteProcessInstances(String processDefinitionId, WMFilter filter) Permanently deletes the specified process instance. | public void | deleteTriggers(XPDLPackage pkg, boolean workflowTriggersOnly) | public ToolInvocation[] | executeWorkItem(String processInstanceId, String workItemId) | public void | exit() | void | findCreateWorkItems(WorkflowProcess workflow, Activity activity, ProcessInstance processInstance, ActivityInstance activityInstance, boolean refresh) | public WMActivityInstance | getActivityInstance(String processInstanceId, String activityInstanceId) Get the specified activity instance. | public WMAttribute | getActivityInstanceAttributeValue(String processInstanceId, String activityInstanceId, String attributeName) Get the specified activity instance attribute value.
Parameters: processInstanceId - The process instance id. Parameters: activityInstanceId - The activity instance id. Parameters: attributeName - The attribute name. | public static WorkflowEngine | getEngine() Returns a reference to the current thread's workflow engine. | public XPDLPackage | getPackage(String packageId) | public String | getPackageContent(String packageId, String contentType) Retrieves the content of the specified package.
Parameters: packageId - The package ID. | public WMProcessInstance | getProcessInstance(String processInstanceId) Get the specified process instance. | public WMAttribute | getProcessInstanceAttributeValue(String processInstanceId, String attributeName) Get the specified process attribute value. | public ServiceManager | getServiceManager() | public String | getServiceName() | public WMWorkItem | getWorkItem(String processInstanceId, String workItemId) Get the specified work item. | public WMAttribute | getWorkItemAttributeValue(String processInstanceId, String workItemId, String attributeName) Get the specified work item attribute value. | public void | init() | public WMAttribute[] | listActivityInstanceAttributes(String processInstanceId, String activityInstanceId, WMFilter filter, boolean countFlag) Retrieve a list of activity instance attributes.
Parameters: processInstanceId - The ID of the process instance. Parameters: activityInstanceId - The ID of the activity instance. Parameters: filter - A filter specification. | public WMActivityInstanceState[] | listActivityInstanceStates(String processInstanceId, String activityInstanceId, WMFilter filter, boolean countFlag) Retrieve a list of activity instance states.
Parameters: processInstanceId - The ID of the process instance. Parameters: activityInstanceId - The ID of the activity instance. Parameters: filter - A Filter specification. | public WMActivityInstance[] | listActivityInstances(WMFilter filter, boolean countFlag) Retrieve a list of activity instance states.
Parameters: filter - A Filter specification. | public WMAAuditEntry[] | listAuditEntries(WMFilter filter) | public WMProcessDefinitionState[] | listProcessDefinitionStates(WMFilter filter, boolean countFlag) Retrieve a list of process definition states.
Parameters: filter - A Filter specification. | public WMProcessDefinition[] | listProcessDefinitions(WMFilter filter, boolean countFlag) Retrieve a list of process definitions. | public WMAttribute[] | listProcessInstanceAttributes(String processInstanceId, WMFilter filter, boolean countFlag) Retrieve a list of process instance attributes. | public WMProcessInstanceState[] | listProcessInstanceStates(String processInstanceId, WMFilter filter, boolean countFlag) Retrieve a list of process instance states. | public WMProcessInstance[] | listProcessInstances(WMFilter filter, boolean countFlag) Retrieve a list of process instances.
Parameters: filter - A Filter specification. | public WMAttribute[] | listWorkItemAttributes(String processInstanceId, String workItemId, WMFilter filter, boolean countFlag) Retrieve a list of work item attributes.
Parameters: filter - A Filter specification. | public WMWorkItemState[] | listWorkItemStates(String processInstanceId, String workItemId, WMFilter filter, boolean countFlag) | public WMWorkItem[] | listWorkItems(WMFilter filter, boolean countFlag) Retrieve a list of work items.
Parameters: filter - A Filter specification. | public void | raiseEvent(ApplicationEvent event, String[] correlationKeys) | public void | reassignWorkItem(String sourceUser, String targetUser, String processInstanceId, String workItemId) Reassign the specified work item to another user. | void | recomputeDates(ProcessInstance procInst, ActivityInstance activityInstance) | public void | refreshWorkItems(String processInstanceId) | public void | setPackageContent(String packageId, String content, String contentType) Sets the content of the specified package. | public String | startProcess(String processInstanceId) Start a specific process. | boolean | startProcess(ProcessInstance processInstance) | public void | terminateProcessInstance(String processInstanceId) Terminates a process instance. | public void | terminateProcessInstances(String processDefinitionId, WMFilter filter) Terminates the process instances which were spawned from the specified
process definition and which match the specified filter. | public String | toString() | public void | toolFinished(String processInstanceId, String workItemId, int appStatus, Parameter[] parms) | public void | toolStarted(String processInstanceId, String workItemId) | public void | updatePackage(XPDLPackage pkg) | public void | updateTriggers(XPDLPackage pkg) |
WorkflowEngine | public WorkflowEngine()(Code) | | |
abortProcessInstances | public void abortProcessInstances(String processDefinitionId, WMFilter filter) throws WMWorkflowException(Code) | | Abort the process instances which were spawned from the given
process definition and which match the specified filter.
Parameters: processDefinitionId - The process definition ID Parameters: filter - The filter throws: WMWorkflowException - Any exception |
assignActivityInstanceAttribute | public void assignActivityInstanceAttribute(String processInstanceId, String activityInstanceId, String attributeName, Object attributeValue) throws WMWorkflowException(Code) | | Set the specified activity attribute value.
Parameters: processInstanceId - The process instance id Parameters: activityInstanceId - The activity instance id Parameters: attributeName - The attribute name Parameters: attributeValue - The attribute value throws: WMWorkflowException - Workflow client exception |
assignActivityInstancesAttribute | public void assignActivityInstancesAttribute(String processDefinitionId, String activityDefinitionId, WMFilter filter, String attributeName, Object attributeValue) throws WMWorkflowException(Code) | | Set the specified activity attribute value for the activity instances
which were spawned from the specified process and activity definition
and which match the filter.
Parameters: processDefinitionId - The process definition id Parameters: activityDefinitionId - The activity definition id Parameters: filter - The filter Parameters: attributeName - The attribute name Parameters: attributeValue - The attribute value throws: WMWorkflowException - Workflow client exception |
assignProcessInstanceAttribute | public void assignProcessInstanceAttribute(String processInstanceId, String attributeName, Object attributeValue) throws WMWorkflowException(Code) | | Set the specified process instance attribute value.
Parameters: processInstanceId - The process instance id Parameters: attributeName - The attribute name Parameters: attributeValue - The attribute value throws: WMWorkflowException - Workflow client exception |
assignProcessInstancesAttribute | public void assignProcessInstancesAttribute(String processDefinitionId, WMFilter filter, String attributeName, Object attributeValue) throws WMWorkflowException(Code) | | Set the process instance attribute value for the process instances
spawned from the specified process definition which match the given
filter.
Parameters: processDefinitionId - The process definition id Parameters: filter - The filter Parameters: attributeName - The attribute name Parameters: attributeValue - The attribute value throws: WMWorkflowException - Workflow client exception |
assignWorkItemAttribute | public void assignWorkItemAttribute(String processInstanceId, String workItemId, String attributeName, Object attributeValue) throws WMWorkflowException(Code) | | Set the specified work item attribute value.
Parameters: processInstanceId - The process instance id Parameters: workItemId - The work item id Parameters: attributeName - The attribute name Parameters: attributeValue - The attribute value throws: WMWorkflowException - Workflow client exception |
cascadeProcessInstanceState | void cascadeProcessInstanceState(WorkflowProcess workflow, ProcessInstance processInstance, int processState, boolean throwProcessException, int activityState, boolean throwActivityException, int workItemState, boolean throwWorkItemException, boolean forceTransitions) throws WMWorkflowException(Code) | | |
changeActivityInstanceState | public void changeActivityInstanceState(String processInstanceId, String activityInstanceId, WMActivityInstanceState newState, boolean allowAutoStart) throws WMWorkflowException(Code) | | Change the activity instance state.
Parameters: processInstanceId - The process instance id Parameters: activityInstanceId - The activity instance id Parameters: newState - The new activity instance state throws: WMWorkflowException - Workflow client exception |
changeActivityInstancesState | public void changeActivityInstancesState(String processDefinitionId, String activityDefinitionId, WMFilter filter, WMActivityInstanceState newState) throws WMWorkflowException(Code) | | Change the activity instance states for the activities spawned
from the given process definition which match the filter.
Parameters: processDefinitionId - The process definition ID Parameters: activityDefinitionId - The activity definition ID Parameters: filter - The filter Parameters: newState - The new state throws: WMWorkflowException - |
changeProcessDefinitionState | public void changeProcessDefinitionState(String processDefinitionId, WMProcessDefinitionState newState) throws WMWorkflowException(Code) | | Change the process definition state.
Parameters: processDefinitionId - The process definition id Parameters: newState - The new process definition state throws: WMWorkflowException - Workflow client exception |
changeProcessInstancesState | public void changeProcessInstancesState(String processDefinitionId, WMFilter filter, WMProcessInstanceState newState) throws WMWorkflowException(Code) | | Change the process instance state for all of the process instances
spawned from the given process definition.
Parameters: processDefinitionId - The process definition ID Parameters: filter - The filter Parameters: newState - The new state throws: WMWorkflowException - |
completeWorkItem | public void completeWorkItem(String processInstanceId, String workItemId) throws WMWorkflowException(Code) | | Complete the specified work item.
Parameters: processInstanceId - The process instance id Parameters: workItemId - The work item id throws: WMWorkflowException - Workflow client exception |
createProcessInstance | public String createProcessInstance(String processDefinitionId, String processInstanceName) throws WMWorkflowException(Code) | | Creates a new process instance for the given process definition.
Parameters: processDefinitionId - The process definition id Parameters: processInstanceName - The name of the process instance The process instance id throws: WMInvalidProcessDefinitionException - if the process definitiondoes not exist, or is disabled. throws: WMWorkflowException - Workflow client exception |
createProcessInstanceVersioned | public String createProcessInstanceVersioned(String name, String processInstanceName) throws WMWorkflowException(Code) | | Creates a new instance of the named workflow process. The system
instantiates the 'most valid' version of the named process, based on the
versioning metadata in the ProcessHeader (ValidFrom, ValidTo).
Parameters: name - The process definition name. Parameters: processInstanceName - The name of the process instance. The process instance id. throws: WMInvalidProcessDefinitionException - if the process definitiondoes not exist, is disabled, is under revision, or has no valid versionsas determined for the current system time. throws: WMWorkflowException - Workflow client exception |
deleteProcessInstance | public void deleteProcessInstance(String processInstanceId) throws WMWorkflowException(Code) | | Permanently deletes the specified process instance.
Parameters: processInstanceId - The ID of the process instance to delete. throws: WMWorkflowException - |
deleteProcessInstances | public void deleteProcessInstances(String processDefinitionId, WMFilter filter) throws WMWorkflowException(Code) | | Permanently deletes the specified process instance.
Parameters: processDefinitionId - The ID of the process definition for whichinstances are to be deleted. Parameters: filter - Process instance filter. throws: WMWorkflowException - |
getActivityInstance | public WMActivityInstance getActivityInstance(String processInstanceId, String activityInstanceId) throws WMWorkflowException(Code) | | Get the specified activity instance.
Parameters: processInstanceId - The process instance id Parameters: activityInstanceId - The activity instance id The activity instance throws: WMWorkflowException - Workflow client exception |
getActivityInstanceAttributeValue | public WMAttribute getActivityInstanceAttributeValue(String processInstanceId, String activityInstanceId, String attributeName) throws WMWorkflowException(Code) | | Get the specified activity instance attribute value.
Parameters: processInstanceId - The process instance id. Parameters: activityInstanceId - The activity instance id. Parameters: attributeName - The attribute name. The attribute. throws: WMWorkflowException - Workflow client exception |
getEngine | public static WorkflowEngine getEngine()(Code) | | Returns a reference to the current thread's workflow engine. Generally
speaking, the engine (which is threadsafe) will be shared amongst all
threads. This method is present to support the case where multiple,
differently configured engines are running concurrently in the same JVM.
If an engine is not currently associated with the current thread (by
virtue of there being an engine call on the JVM call stack for the
current thread), this method returns the default
WorkflowEngine , creating this if it does not already exist.
The default engine is set to the first WorkflowEngine
instance to be created. If this method creates the default engine, its
ServiceManager and repositories will have the default
configuration.
N.B. It is preferable for applications which embed an engine to create it
explicitly and retain a global reference to it rather than rely on this
method to locate the global instance.
The current engine, or the default engine if no engine call iscurrently in progress on the current thread. |
getProcessInstanceAttributeValue | public WMAttribute getProcessInstanceAttributeValue(String processInstanceId, String attributeName) throws WMWorkflowException(Code) | | Get the specified process attribute value.
Parameters: processInstanceId - The process instance id Parameters: attributeName - The attribute name The attribute throws: WMWorkflowException - Workflow client exception |
getWorkItemAttributeValue | public WMAttribute getWorkItemAttributeValue(String processInstanceId, String workItemId, String attributeName) throws WMWorkflowException(Code) | | Get the specified work item attribute value.
Parameters: processInstanceId - The process instance id Parameters: workItemId - The work item id Parameters: attributeName - The attribute name The attribute throws: WMWorkflowException - Workflow client exception |
listActivityInstanceAttributes | public WMAttribute[] listActivityInstanceAttributes(String processInstanceId, String activityInstanceId, WMFilter filter, boolean countFlag) throws WMWorkflowException(Code) | | Retrieve a list of activity instance attributes.
Parameters: processInstanceId - The ID of the process instance. Parameters: activityInstanceId - The ID of the activity instance. Parameters: filter - A filter specification. An array of matching activity instance attributes. |
listActivityInstanceStates | public WMActivityInstanceState[] listActivityInstanceStates(String processInstanceId, String activityInstanceId, WMFilter filter, boolean countFlag) throws WMWorkflowException(Code) | | Retrieve a list of activity instance states.
Parameters: processInstanceId - The ID of the process instance. Parameters: activityInstanceId - The ID of the activity instance. Parameters: filter - A Filter specification. An array of matching activity instance attributes. |
listActivityInstances | public WMActivityInstance[] listActivityInstances(WMFilter filter, boolean countFlag) throws WMWorkflowException(Code) | | Retrieve a list of activity instance states.
Parameters: filter - A Filter specification. An array of matching activity instance attributes. |
listProcessDefinitions | public WMProcessDefinition[] listProcessDefinitions(WMFilter filter, boolean countFlag) throws WMWorkflowException(Code) | | Retrieve a list of process definitions.
Parameters: filter - A Filter specification. Parameters: countFlag - The count flag An array of matching process definitions. |
listProcessInstanceAttributes | public WMAttribute[] listProcessInstanceAttributes(String processInstanceId, WMFilter filter, boolean countFlag) throws WMWorkflowException(Code) | | Retrieve a list of process instance attributes.
Parameters: processInstanceId - The process instance id Parameters: filter - The filter or null Parameters: countFlag - True to return count value The query handle throws: WMWorkflowException - Workflow client exception |
listProcessInstanceStates | public WMProcessInstanceState[] listProcessInstanceStates(String processInstanceId, WMFilter filter, boolean countFlag) throws WMWorkflowException(Code) | | Retrieve a list of process instance states.
Parameters: processInstanceId - The process instance id Parameters: filter - A Filter specification. Parameters: countFlag - True to return count value An array of matching process instance states. |
listProcessInstances | public WMProcessInstance[] listProcessInstances(WMFilter filter, boolean countFlag) throws WMWorkflowException(Code) | | Retrieve a list of process instances.
Parameters: filter - A Filter specification. An array of matching process instances. |
listWorkItemAttributes | public WMAttribute[] listWorkItemAttributes(String processInstanceId, String workItemId, WMFilter filter, boolean countFlag) throws WMWorkflowException(Code) | | Retrieve a list of work item attributes.
Parameters: filter - A Filter specification. An array of matching work item attributes. |
listWorkItems | public WMWorkItem[] listWorkItems(WMFilter filter, boolean countFlag) throws WMWorkflowException(Code) | | Retrieve a list of work items.
Parameters: filter - A Filter specification. An array of matching work items. |
reassignWorkItem | public void reassignWorkItem(String sourceUser, String targetUser, String processInstanceId, String workItemId) throws WMWorkflowException(Code) | | Reassign the specified work item to another user.
Parameters: sourceUser - The current user Parameters: targetUser - The new user Parameters: processInstanceId - The process instance id Parameters: workItemId - The work item id throws: WMWorkflowException - Workflow client exception |
startProcess | public String startProcess(String processInstanceId) throws WMWorkflowException(Code) | | Start a specific process. The process instance id is retrieved
from a previous call to createProcessInstance()
Parameters: processInstanceId - The process instance id retrieved froma previous call to createProcessInstance() The new process instance id (which may be the same asthe old. throws: WMWorkflowException - Workflow client exception |
terminateProcessInstance | public void terminateProcessInstance(String processInstanceId) throws WMWorkflowException(Code) | | Terminates a process instance.
Parameters: processInstanceId - The process instance id throws: WMWorkflowException - Workflow client exception |
terminateProcessInstances | public void terminateProcessInstances(String processDefinitionId, WMFilter filter) throws WMWorkflowException(Code) | | Terminates the process instances which were spawned from the specified
process definition and which match the specified filter.
Parameters: processDefinitionId - The process definition ID. Parameters: filter - The filter. throws: WMWorkflowException - |
|
|