|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Enables client applications to connect to and interact with a workflow engine.
This interface is based on the WfMC's Interface 2 Client WAPI
specification. Some of the methods have been modified from the
original specification to fit within the normal design of Java
applications. For instance, the WfMC specification functions always
return an error object (even for success) and uses out parameters to
return values. This interface returns the value and throws an
exception when an error occurs. If no error occurs then an exception
is not thrown. The C WAPI uses query handles and iterator functions
to retrieve collections; this Java binding uses WMIterator
.
For the adoption in Shark, we have changed most of the methods signatures and switched almost all interfaces into classes, however original intention and functionality remained. We defined additional method to get immediate access to ProcessDefinition by its name.
Method Summary | |
void |
abortProcessInstance(WMSessionHandle sHandle,
java.lang.String procInstId)
Aborts a process instance. |
void |
abortProcessInstances(WMSessionHandle sHandle,
java.lang.String procDefId,
WMFilter filter)
Aborts a group of process instances. |
void |
assignActivityInstanceAttribute(WMSessionHandle sHandle,
java.lang.String procInstId,
java.lang.String actInstId,
java.lang.String attrName,
java.lang.Object attrValue)
Sets the value of an activity instance attribute. |
void |
assignActivityInstancesAttribute(WMSessionHandle sHandle,
java.lang.String procDefId,
java.lang.String actDefId,
WMFilter filter,
java.lang.String attrName,
java.lang.Object attrValue)
Assigns an attribute value for a group of process instances. |
void |
assignProcessInstanceAttribute(WMSessionHandle sHandle,
java.lang.String procInstId,
java.lang.String attrName,
java.lang.Object attrValue)
Sets the specified process instance attribute value. |
void |
assignProcessInstancesAttribute(WMSessionHandle sHandle,
java.lang.String procDefId,
WMFilter filter,
java.lang.String attrName,
java.lang.Object attrValue)
Assigns an attribute value for a group of process instances. |
void |
assignWorkItemAttribute(WMSessionHandle sHandle,
java.lang.String procInstId,
java.lang.String workItemId,
java.lang.String attrName,
java.lang.Object attrValue)
Sets the value of a work item attribute. |
void |
changeActivityInstancesState(WMSessionHandle sHandle,
java.lang.String procDefId,
java.lang.String actDefId,
WMFilter filter,
WMActivityInstanceState newState)
Changes the state of selected activity instances. |
void |
changeActivityInstanceState(WMSessionHandle sHandle,
java.lang.String procInstId,
java.lang.String actInstId,
WMActivityInstanceState newState)
Changes the state of an activity instance. |
void |
changeProcessDefinitionState(WMSessionHandle sHandle,
java.lang.String procDefId,
WMProcessDefinitionState newState)
Changes the process definition state. |
void |
changeProcessInstancesState(WMSessionHandle sHandle,
java.lang.String procDefId,
WMFilter filter,
WMProcessInstanceState newState)
Changes the state of selected process instances. |
void |
changeProcessInstanceState(WMSessionHandle sHandle,
java.lang.String procInstId,
WMProcessInstanceState newState)
Changes the state of a process instance. |
void |
changeWorkItemState(WMSessionHandle sHandle,
java.lang.String procInstId,
java.lang.String workItemId,
WMWorkItemState newState)
Changes the state of a work item. |
void |
completeWorkItem(WMSessionHandle sHandle,
java.lang.String procInstId,
java.lang.String workItemId)
Completes the specified work item. |
WMSessionHandle |
connect(WMConnectInfo connectInfo)
Connects to a workflow service. |
java.lang.String |
createProcessInstance(WMSessionHandle sHandle,
java.lang.String procDefId,
java.lang.String procInstName)
Creates a new process instance for the given process definition. |
void |
disconnect(WMSessionHandle sHandle)
Disconnects from the workflow service. |
WMActivityInstance |
getActivityInstance(WMSessionHandle sHandle,
java.lang.String procInstId,
java.lang.String actInstId)
Retrieves an activity instance. |
WMAttribute |
getActivityInstanceAttributeValue(WMSessionHandle sHandle,
java.lang.String procInstId,
java.lang.String actInstId,
java.lang.String attrName)
Gets the value of an activity instance attribute. |
WMProcessDefinition |
getProcessDefinition(WMSessionHandle sHandle,
java.lang.String procDefName)
Retrieves a process definition. |
WMProcessInstance |
getProcessInstance(WMSessionHandle sHandle,
java.lang.String procInstId)
Retrieves a process instance. |
WMAttribute |
getProcessInstanceAttributeValue(WMSessionHandle sHandle,
java.lang.String procInstId,
java.lang.String attrName)
Gets the specified process instance attribute value. |
WMWorkItem |
getWorkItem(WMSessionHandle sHandle,
java.lang.String procInstId,
java.lang.String workItemId)
Retrieves a work item. |
WMAttribute |
getWorkItemAttributeValue(WMSessionHandle sHandle,
java.lang.String procInstId,
java.lang.String workItemId,
java.lang.String attrName)
Retrieves the value of a work item attribute. |
WMAttributeIterator |
listActivityInstanceAttributes(WMSessionHandle sHandle,
java.lang.String procInstId,
java.lang.String actInstId,
WMFilter filter,
boolean countFlag)
Opens a list of activity instance attributes. |
WMActivityInstanceIterator |
listActivityInstances(WMSessionHandle sHandle,
WMFilter filter,
boolean countFlag)
Opens a list of activity instances. |
WMActivityInstanceStateIterator |
listActivityInstanceStates(WMSessionHandle sHandle,
java.lang.String procInstId,
java.lang.String actInstId,
WMFilter filter,
boolean countFlag)
Opens a list of process instance states. |
WMProcessDefinitionIterator |
listProcessDefinitions(WMSessionHandle sHandle,
WMFilter filter,
boolean countFlag)
Opens a list of process definitions. |
WMProcessDefinitionStateIterator |
listProcessDefinitionStates(WMSessionHandle sHandle,
java.lang.String procDefId,
WMFilter filter,
boolean countFlag)
Opens a list of process definition states. |
WMAttributeIterator |
listProcessInstanceAttributes(WMSessionHandle sHandle,
java.lang.String procInstId,
WMFilter filter,
boolean countFlag)
Opens a list of process instance attributes. |
WMProcessInstanceIterator |
listProcessInstances(WMSessionHandle sHandle,
WMFilter filter,
boolean countFlag)
Opens a list of process instances. |
WMProcessInstanceStateIterator |
listProcessInstanceStates(WMSessionHandle sHandle,
java.lang.String procInstId,
WMFilter filter,
boolean countFlag)
Opens a list of process instance states. |
WMAttributeIterator |
listWorkItemAttributes(WMSessionHandle sHandle,
java.lang.String procInstId,
java.lang.String workItemId,
WMFilter filter,
boolean countFlag)
Opens a list of work item attributes. |
WMWorkItemIterator |
listWorkItems(WMSessionHandle sHandle,
WMFilter filter,
boolean countFlag)
Opens a worklist. |
WMWorkItemStateIterator |
listWorkItemStates(WMSessionHandle sHandle,
java.lang.String procInstId,
java.lang.String workItemId,
WMFilter filter,
boolean countFlag)
Opens a list of work item states. |
void |
reassignWorkItem(WMSessionHandle sHandle,
java.lang.String sourceUser,
java.lang.String targetUser,
java.lang.String procInstId,
java.lang.String workItemId)
Reassigns a work item to another user. |
java.lang.String |
startProcess(WMSessionHandle sHandle,
java.lang.String procInstId)
Starts a process instance. |
void |
terminateProcessInstance(WMSessionHandle sHandle,
java.lang.String procInstId)
Terminates a process instance. |
void |
terminateProcessInstances(WMSessionHandle sHandle,
java.lang.String procDefId,
WMFilter filter)
Terminates a group of process instances. |
Method Detail |
public WMSessionHandle connect(WMConnectInfo connectInfo) throws java.lang.Exception
connectInfo
- The connection info. In OBE, pass
null
to skip the JAAS login and retain
the current security identity (if any).
java.lang.Exception
- Workflow client exception.public void disconnect(WMSessionHandle sHandle) throws java.lang.Exception
java.lang.Exception
- Workflow client exception.public WMProcessDefinitionIterator listProcessDefinitions(WMSessionHandle sHandle, WMFilter filter, boolean countFlag) throws java.lang.Exception
tsNext()
method.
filter
- The filter or null.countFlag
- True to return count value.
WMProcessDefinition
objects.
java.lang.Exception
- Workflow client exception.public WMProcessDefinitionStateIterator listProcessDefinitionStates(WMSessionHandle sHandle, java.lang.String procDefId, WMFilter filter, boolean countFlag) throws java.lang.Exception
tsNext()
method.
procDefId
- The unique process definition ID.filter
- The filter or null.countFlag
- True to return count value.
WMProcessDefinitionState
objects.
java.lang.Exception
- Workflow client exception.public void changeProcessDefinitionState(WMSessionHandle sHandle, java.lang.String procDefId, WMProcessDefinitionState newState) throws java.lang.Exception
procDefId
- The process definition id.newState
- The new process definition state.
java.lang.Exception
- Workflow client exception.public java.lang.String createProcessInstance(WMSessionHandle sHandle, java.lang.String procDefId, java.lang.String procInstName) throws java.lang.Exception
procDefId
- The process definition id.procInstName
- The name of the process instance.
java.lang.Exception
- Workflow client exception.public java.lang.String startProcess(WMSessionHandle sHandle, java.lang.String procInstId) throws java.lang.Exception
createProcessInstance()
procInstId
- The process instance id retrieved in a prior
call to createProcessInstance()
.
java.lang.Exception
- Workflow client exception.public void terminateProcessInstance(WMSessionHandle sHandle, java.lang.String procInstId) throws java.lang.Exception
procInstId
- The process instance id.
java.lang.Exception
- Workflow client exception.public WMProcessInstanceStateIterator listProcessInstanceStates(WMSessionHandle sHandle, java.lang.String procInstId, WMFilter filter, boolean countFlag) throws java.lang.Exception
tsNext()
method.
procInstId
- The unique process instance ID.filter
- The filter or null.countFlag
- True to return count value.
WMProcessInstanceState
objects.
java.lang.Exception
- Workflow client exception.public void changeProcessInstanceState(WMSessionHandle sHandle, java.lang.String procInstId, WMProcessInstanceState newState) throws java.lang.Exception
procInstId
- The process instance id.newState
- The new process instance state.
java.lang.Exception
- Workflow client exception.public WMAttributeIterator listProcessInstanceAttributes(WMSessionHandle sHandle, java.lang.String procInstId, WMFilter filter, boolean countFlag) throws java.lang.Exception
tsNext()
method.
filter
- The filter or null.countFlag
- True to return count value.
WMAttribute
objects.
java.lang.Exception
- Workflow client exception.public WMAttribute getProcessInstanceAttributeValue(WMSessionHandle sHandle, java.lang.String procInstId, java.lang.String attrName) throws java.lang.Exception
procInstId
- The process instance id.attrName
- The attribute name.
java.lang.Exception
- Workflow client exception.public void assignProcessInstanceAttribute(WMSessionHandle sHandle, java.lang.String procInstId, java.lang.String attrName, java.lang.Object attrValue) throws java.lang.Exception
procInstId
- The process instance id.attrName
- The attribute name.attrValue
- The attribute value.
java.lang.Exception
- Workflow client exception.public WMActivityInstanceStateIterator listActivityInstanceStates(WMSessionHandle sHandle, java.lang.String procInstId, java.lang.String actInstId, WMFilter filter, boolean countFlag) throws java.lang.Exception
tsNext()
method.
procInstId
- The process instance id.actInstId
- The activity instance id.filter
- The filter or null.countFlag
- True to return count value.
WMActivityInstanceState
objects.
java.lang.Exception
- Workflow client exception.public void changeActivityInstanceState(WMSessionHandle sHandle, java.lang.String procInstId, java.lang.String actInstId, WMActivityInstanceState newState) throws java.lang.Exception
procInstId
- The process instance id.actInstId
- The activity instance id.newState
- The new activity instance state.
java.lang.Exception
- Workflow client exception.public WMAttributeIterator listActivityInstanceAttributes(WMSessionHandle sHandle, java.lang.String procInstId, java.lang.String actInstId, WMFilter filter, boolean countFlag) throws java.lang.Exception
tsNext()
method.
procInstId
- The process instance id.actInstId
- The activity instance id.filter
- The filter or null.countFlag
- True to return count value.
WMAttribute
objects.
java.lang.Exception
- Workflow client exception.public WMAttribute getActivityInstanceAttributeValue(WMSessionHandle sHandle, java.lang.String procInstId, java.lang.String actInstId, java.lang.String attrName) throws java.lang.Exception
procInstId
- The process instance id.actInstId
- The activity instance id.attrName
- The attribute name.
java.lang.Exception
- Workflow client exception.public void assignActivityInstanceAttribute(WMSessionHandle sHandle, java.lang.String procInstId, java.lang.String actInstId, java.lang.String attrName, java.lang.Object attrValue) throws java.lang.Exception
procInstId
- The process instance id.actInstId
- The activity instance id.attrName
- The attribute name.attrValue
- The attribute value.
java.lang.Exception
- Workflow client exception.public WMProcessInstanceIterator listProcessInstances(WMSessionHandle sHandle, WMFilter filter, boolean countFlag) throws java.lang.Exception
tsNext()
method.
filter
- The filter or null.countFlag
- True to return count value.
WMProcessInstance
objects.
java.lang.Exception
- Workflow client exception.public WMProcessInstance getProcessInstance(WMSessionHandle sHandle, java.lang.String procInstId) throws java.lang.Exception
procInstId
- The process instance id.
java.lang.Exception
- Workflow client exception.public WMActivityInstanceIterator listActivityInstances(WMSessionHandle sHandle, WMFilter filter, boolean countFlag) throws java.lang.Exception
tsNext()
method.
filter
- The filter or null.countFlag
- True to return count value.
WMActivityInstance
objects.
java.lang.Exception
- Workflow client exception.public WMActivityInstance getActivityInstance(WMSessionHandle sHandle, java.lang.String procInstId, java.lang.String actInstId) throws java.lang.Exception
procInstId
- The process instance id.actInstId
- The activity instance id.
java.lang.Exception
- Workflow client exception.public WMWorkItemIterator listWorkItems(WMSessionHandle sHandle, WMFilter filter, boolean countFlag) throws java.lang.Exception
tsNext()
method.
filter
- The filter or null.countFlag
- True to return count value.
WMWorkItem
objects.
java.lang.Exception
- Workflow client exception.public WMWorkItem getWorkItem(WMSessionHandle sHandle, java.lang.String procInstId, java.lang.String workItemId) throws java.lang.Exception
procInstId
- The process instance id.workItemId
- The work item id.
java.lang.Exception
- Workflow client exception.public void completeWorkItem(WMSessionHandle sHandle, java.lang.String procInstId, java.lang.String workItemId) throws java.lang.Exception
procInstId
- The process instance id.workItemId
- The work item id.
java.lang.Exception
- Workflow client exception.public WMWorkItemStateIterator listWorkItemStates(WMSessionHandle sHandle, java.lang.String procInstId, java.lang.String workItemId, WMFilter filter, boolean countFlag) throws java.lang.Exception
tsNext()
method. N.B.
This function is poorly documented in the WfMC specification,
which contains several 'copy/paste' errors. N.B. The
signature of this method differs from that described in the WAPI2
specification, in that it has a procInstId parameter. This is
because the specification's definition for this function is
clearly in error, having been copied badly from that for
WMOpenProcessDefinitionStatesList. The other WAPI functions that
refer to work items invariably require the procInstId parameter.
procInstId
- The process instance id.workItemId
- The process instance id.filter
- The filter or null.countFlag
- True to return count value.
WMWorkItemState
objects.
java.lang.Exception
- Workflow client exception.public void changeWorkItemState(WMSessionHandle sHandle, java.lang.String procInstId, java.lang.String workItemId, WMWorkItemState newState) throws java.lang.Exception
procInstId
parameter.
This is because the specification's definition for this function is
clearly in error, having been badly copied from that for
WMChangeDefinitionState
. The other WAPI functions that refer
to work items invariably require the procInstId
parameter.
procInstId
- The process instance id.workItemId
- The work item id.newState
- The new work item state.
java.lang.Exception
- Workflow client exception.public void reassignWorkItem(WMSessionHandle sHandle, java.lang.String sourceUser, java.lang.String targetUser, java.lang.String procInstId, java.lang.String workItemId) throws java.lang.Exception
sourceUser
- The current user.targetUser
- The new user.procInstId
- The process instance id.workItemId
- The work item id.
java.lang.Exception
- Workflow client exception.public WMAttributeIterator listWorkItemAttributes(WMSessionHandle sHandle, java.lang.String procInstId, java.lang.String workItemId, WMFilter filter, boolean countFlag) throws java.lang.Exception
tsNext()
method.
procInstId
- The process instance id.workItemId
- The work item id.filter
- The filter or null.countFlag
- True to return count value.
WMAttribute
objects.
java.lang.Exception
- Workflow client exception.public WMAttribute getWorkItemAttributeValue(WMSessionHandle sHandle, java.lang.String procInstId, java.lang.String workItemId, java.lang.String attrName) throws java.lang.Exception
procInstId
- The process instance id.workItemId
- The work item id.attrName
- The attribute name.
java.lang.Exception
- Workflow client exception.public void assignWorkItemAttribute(WMSessionHandle sHandle, java.lang.String procInstId, java.lang.String workItemId, java.lang.String attrName, java.lang.Object attrValue) throws java.lang.Exception
procInstId
- The process instance id.workItemId
- The work item id.attrName
- The attribute name.attrValue
- The attribute value.
java.lang.Exception
- Workflow client exception.public void changeProcessInstancesState(WMSessionHandle sHandle, java.lang.String procDefId, WMFilter filter, WMProcessInstanceState newState) throws java.lang.Exception
procDefId
- The ID of the process definition for which
instances are to be changed.filter
- A filter specification; can be null
.newState
- The new state to apply.
java.lang.Exception
- Workflow client exception.public void changeActivityInstancesState(WMSessionHandle sHandle, java.lang.String procDefId, java.lang.String actDefId, WMFilter filter, WMActivityInstanceState newState) throws java.lang.Exception
procDefId
- The ID of the process definition for which
activity instances are to be changed.actDefId
- The ID of the activity definition for which
instances are to be changed.filter
- A filter specification; can be null
.newState
- The new state to apply.
java.lang.Exception
- Workflow client exception.public void terminateProcessInstances(WMSessionHandle sHandle, java.lang.String procDefId, WMFilter filter) throws java.lang.Exception
procDefId
- The ID of the process definition for which
instances are to be terminated.filter
- A filter specification; can be null
.
java.lang.Exception
- Workflow client exception.public void assignProcessInstancesAttribute(WMSessionHandle sHandle, java.lang.String procDefId, WMFilter filter, java.lang.String attrName, java.lang.Object attrValue) throws java.lang.Exception
procDefId
- The ID of the process definition for which
instance attributes are to be assigned.filter
- A filter specification; can be null
.attrName
- The attribute name.attrValue
- The attribute value.
java.lang.Exception
- Workflow client exception.public void assignActivityInstancesAttribute(WMSessionHandle sHandle, java.lang.String procDefId, java.lang.String actDefId, WMFilter filter, java.lang.String attrName, java.lang.Object attrValue) throws java.lang.Exception
procDefId
- The ID of the process definition for which
activity instance attributes are to be assigned.actDefId
- The ID of the activity definition for which
instance attributes are to be assigned.filter
- A filter specification; can be null
.attrName
- The attribute name.attrValue
- The attribute value.
java.lang.Exception
- Workflow client exception.public void abortProcessInstances(WMSessionHandle sHandle, java.lang.String procDefId, WMFilter filter) throws java.lang.Exception
procDefId
- The ID of the process definition for which
instances are to be aborted.filter
- A filter specification; can be null
.
java.lang.Exception
- Workflow client exception.public void abortProcessInstance(WMSessionHandle sHandle, java.lang.String procInstId) throws java.lang.Exception
procInstId
- The ID of the process instance to abort.
java.lang.Exception
- Workflow client exception.public WMProcessDefinition getProcessDefinition(WMSessionHandle sHandle, java.lang.String procDefName) throws java.lang.Exception
procDefName
- The process definition unique name.
java.lang.Exception
- Workflow client exception.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |