|
||||||||||
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 usesWMIterator
.
Method Summary | |
void |
abortProcessInstance(java.lang.String procInstId)
Aborts a process instance. |
void |
abortProcessInstances(java.lang.String procDefId,
WMFilter filter)
Aborts a group of process instances. |
void |
assignActivityInstanceAttribute(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(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(java.lang.String procInstId,
java.lang.String attrName,
java.lang.Object attrValue)
Sets the specified process instance attribute value. |
void |
assignProcessInstancesAttribute(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(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(java.lang.String procDefId,
java.lang.String actDefId,
WMFilter filter,
WMActivityInstanceState newState)
Changes the state of selected activity instances. |
void |
changeActivityInstanceState(java.lang.String procInstId,
java.lang.String actInstId,
WMActivityInstanceState newState)
Changes the state of an activity instance. |
void |
changeProcessDefinitionState(java.lang.String procDefId,
WMProcessDefinitionState newState)
Changes the process definition state. |
void |
changeProcessInstancesState(java.lang.String procDefId,
WMFilter filter,
WMProcessInstanceState newState)
Changes the state of selected process instances. |
void |
changeProcessInstanceState(java.lang.String procInstId,
WMProcessInstanceState newState)
Changes the state of a process instance. |
void |
changeWorkItemState(java.lang.String procInstId,
java.lang.String workItemId,
WMWorkItemState newState)
Changes the state of a work item. |
void |
completeWorkItem(java.lang.String procInstId,
java.lang.String workItemId)
Completes the specified work item. |
void |
connect(WMConnectInfo connectInfo)
Connects to a workflow service. |
java.lang.String |
createProcessInstance(java.lang.String procDefId,
java.lang.String procInstName)
Creates a new process instance for the given process definition. |
void |
disconnect()
Disconnects from the workflow service. |
WMActivityInstance |
getActivityInstance(java.lang.String procInstId,
java.lang.String actInstId)
Retrieves an activity instance. |
WMAttribute |
getActivityInstanceAttributeValue(java.lang.String procInstId,
java.lang.String actInstId,
java.lang.String attrName)
Gets the value of an activity instance attribute. |
WMProcessInstance |
getProcessInstance(java.lang.String procInstId)
Retrieves a process instance. |
WMAttribute |
getProcessInstanceAttributeValue(java.lang.String procInstId,
java.lang.String attrName)
Gets the specified process instance attribute value. |
WMWorkItem |
getWorkItem(java.lang.String procInstId,
java.lang.String workItemId)
Retrieves a work item. |
WMAttribute |
getWorkItemAttributeValue(java.lang.String procInstId,
java.lang.String workItemId,
java.lang.String attrName)
Retrieves the value of a work item attribute. |
void |
invokeApplication(int toolAgentHandle,
java.lang.String appName,
java.lang.String procInstId,
java.lang.String workItemId,
java.lang.Object[] parameters,
int appMode)
Invokes a client-side tool. |
WMAttributeIterator |
listActivityInstanceAttributes(java.lang.String procInstId,
java.lang.String actInstId,
WMFilter filter,
boolean countFlag)
Opens a list of activity instance attributes. |
WMActivityInstanceIterator |
listActivityInstances(WMFilter filter,
boolean countFlag)
Opens a list of activity instances. |
WMActivityInstanceStateIterator |
listActivityInstanceStates(java.lang.String procInstId,
java.lang.String actInstId,
WMFilter filter,
boolean countFlag)
Opens a list of process instance states. |
WMProcessDefinitionIterator |
listProcessDefinitions(WMFilter filter,
boolean countFlag)
Opens a list of process definitions. |
WMProcessDefinitionStateIterator |
listProcessDefinitionStates(java.lang.String procDefId,
WMFilter filter,
boolean countFlag)
Opens a list of process definition states. |
WMAttributeIterator |
listProcessInstanceAttributes(java.lang.String procInstId,
WMFilter filter,
boolean countFlag)
Opens a list of process instance attributes. |
WMProcessInstanceIterator |
listProcessInstances(WMFilter filter,
boolean countFlag)
Opens a list of process instances. |
WMProcessInstanceStateIterator |
listProcessInstanceStates(java.lang.String procInstId,
WMFilter filter,
boolean countFlag)
Opens a list of process instance states. |
WMAttributeIterator |
listWorkItemAttributes(java.lang.String procInstId,
java.lang.String workItemId,
WMFilter filter,
boolean countFlag)
Opens a list of work item attributes. |
WMWorkItemIterator |
listWorkItems(WMFilter filter,
boolean countFlag)
Opens a worklist. |
WMWorkItemStateIterator |
listWorkItemStates(java.lang.String procInstId,
java.lang.String workItemId,
WMFilter filter,
boolean countFlag)
Opens a list of work item states. |
void |
reassignWorkItem(java.lang.String sourceUser,
java.lang.String targetUser,
java.lang.String procInstId,
java.lang.String workItemId)
Reassigns a work item to another user. |
WMAttribute[] |
requestAppStatus(int toolAgentHandle,
java.lang.String procInstId,
java.lang.String workItemId,
int[] status)
Requests the status of an invoked tool. |
java.lang.String |
startProcess(java.lang.String procInstId)
Starts a process instance. |
void |
terminateApp(int toolAgentHandle,
java.lang.String procInstId,
java.lang.String workItemId)
Terminates a running tool. |
void |
terminateProcessInstance(java.lang.String procInstId)
Terminates a process instance. |
void |
terminateProcessInstances(java.lang.String procDefId,
WMFilter filter)
Terminates a group of process instances. |
Method Detail |
public void connect(WMConnectInfo connectInfo) throws WMWorkflowException
connectInfo
- The connection info. In OBE, pass null
to skip the JAAS login and retain the current security identity (if any).
WMWorkflowException
- Workflow client exception.public void disconnect() throws WMWorkflowException
WMWorkflowException
- Workflow client exception.public WMProcessDefinitionIterator listProcessDefinitions(WMFilter filter, boolean countFlag) throws WMWorkflowException
tsNext()
method.
filter
- The filter or null.countFlag
- True to return count value.
WMProcessDefinition
objects.
WMWorkflowException
- Workflow client exception.public WMProcessDefinitionStateIterator listProcessDefinitionStates(java.lang.String procDefId, WMFilter filter, boolean countFlag) throws WMWorkflowException
tsNext()
method.
procDefId
- The unique process definition ID.filter
- The filter or null.countFlag
- True to return count value.
WMProcessDefinitionState
objects.
WMWorkflowException
- Workflow client exception.public void changeProcessDefinitionState(java.lang.String procDefId, WMProcessDefinitionState newState) throws WMWorkflowException
procDefId
- The process definition id.newState
- The new process definition state.
WMWorkflowException
- Workflow client exception.public java.lang.String createProcessInstance(java.lang.String procDefId, java.lang.String procInstName) throws WMWorkflowException
procDefId
- The process definition id.procInstName
- The name of the process instance.
WMWorkflowException
- Workflow client exception.public java.lang.String startProcess(java.lang.String procInstId) throws WMWorkflowException
createProcessInstance()
procInstId
- The process instance id retrieved in a prior
call to createProcessInstance()
.
WMWorkflowException
- Workflow client exception.public void terminateProcessInstance(java.lang.String procInstId) throws WMWorkflowException
procInstId
- The process instance id.
WMWorkflowException
- Workflow client exception.public WMProcessInstanceStateIterator listProcessInstanceStates(java.lang.String procInstId, WMFilter filter, boolean countFlag) throws WMWorkflowException
tsNext()
method.
procInstId
- The unique process instance ID.filter
- The filter or null.countFlag
- True to return count value.
WMProcessInstanceState
objects.
WMWorkflowException
- Workflow client exception.public void changeProcessInstanceState(java.lang.String procInstId, WMProcessInstanceState newState) throws WMWorkflowException
procInstId
- The process instance id.newState
- The new process instance state.
WMWorkflowException
- Workflow client exception.public WMAttributeIterator listProcessInstanceAttributes(java.lang.String procInstId, WMFilter filter, boolean countFlag) throws WMWorkflowException
tsNext()
method.
filter
- The filter or null.countFlag
- True to return count value.
WMAttribute
objects.
WMWorkflowException
- Workflow client exception.public WMAttribute getProcessInstanceAttributeValue(java.lang.String procInstId, java.lang.String attrName) throws WMWorkflowException
procInstId
- The process instance id.attrName
- The attribute name.
WMWorkflowException
- Workflow client exception.public void assignProcessInstanceAttribute(java.lang.String procInstId, java.lang.String attrName, java.lang.Object attrValue) throws WMWorkflowException
procInstId
- The process instance id.attrName
- The attribute name.attrValue
- The attribute value.
WMWorkflowException
- Workflow client exception.public WMActivityInstanceStateIterator listActivityInstanceStates(java.lang.String procInstId, java.lang.String actInstId, WMFilter filter, boolean countFlag) throws WMWorkflowException
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.
WMWorkflowException
- Workflow client exception.public void changeActivityInstanceState(java.lang.String procInstId, java.lang.String actInstId, WMActivityInstanceState newState) throws WMWorkflowException
procInstId
- The process instance id.actInstId
- The activity instance id.newState
- The new activity instance state.
WMWorkflowException
- Workflow client exception.public WMAttributeIterator listActivityInstanceAttributes(java.lang.String procInstId, java.lang.String actInstId, WMFilter filter, boolean countFlag) throws WMWorkflowException
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.
WMWorkflowException
- Workflow client exception.public WMAttribute getActivityInstanceAttributeValue(java.lang.String procInstId, java.lang.String actInstId, java.lang.String attrName) throws WMWorkflowException
procInstId
- The process instance id.actInstId
- The activity instance id.attrName
- The attribute name.
WMWorkflowException
- Workflow client exception.public void assignActivityInstanceAttribute(java.lang.String procInstId, java.lang.String actInstId, java.lang.String attrName, java.lang.Object attrValue) throws WMWorkflowException
procInstId
- The process instance id.actInstId
- The activity instance id.attrName
- The attribute name.attrValue
- The attribute value.
WMWorkflowException
- Workflow client exception.public WMProcessInstanceIterator listProcessInstances(WMFilter filter, boolean countFlag) throws WMWorkflowException
tsNext()
method.
filter
- The filter or null.countFlag
- True to return count value.
WMProcessInstance
objects.
WMWorkflowException
- Workflow client exception.public WMProcessInstance getProcessInstance(java.lang.String procInstId) throws WMWorkflowException
procInstId
- The process instance id.
WMWorkflowException
- Workflow client exception.public WMActivityInstanceIterator listActivityInstances(WMFilter filter, boolean countFlag) throws WMWorkflowException
tsNext()
method.
filter
- The filter or null.countFlag
- True to return count value.
WMActivityInstance
objects.
WMWorkflowException
- Workflow client exception.public WMActivityInstance getActivityInstance(java.lang.String procInstId, java.lang.String actInstId) throws WMWorkflowException
procInstId
- The process instance id.actInstId
- The activity instance id.
WMWorkflowException
- Workflow client exception.public WMWorkItemIterator listWorkItems(WMFilter filter, boolean countFlag) throws WMWorkflowException
tsNext()
method.
filter
- The filter or null.countFlag
- True to return count value.
WMWorkItem
objects.
WMWorkflowException
- Workflow client exception.public WMWorkItem getWorkItem(java.lang.String procInstId, java.lang.String workItemId) throws WMWorkflowException
procInstId
- The process instance id.workItemId
- The work item id.
WMWorkflowException
- Workflow client exception.public void completeWorkItem(java.lang.String procInstId, java.lang.String workItemId) throws WMWorkflowException
procInstId
- The process instance id.workItemId
- The work item id.
WMWorkflowException
- Workflow client exception.public WMWorkItemStateIterator listWorkItemStates(java.lang.String procInstId, java.lang.String workItemId, WMFilter filter, boolean countFlag) throws WMWorkflowException
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.
WMWorkflowException
- Workflow client exception.public void changeWorkItemState(java.lang.String procInstId, java.lang.String workItemId, WMWorkItemState newState) throws WMWorkflowException
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.
WMWorkflowException
- Workflow client exception.public void reassignWorkItem(java.lang.String sourceUser, java.lang.String targetUser, java.lang.String procInstId, java.lang.String workItemId) throws WMWorkflowException
sourceUser
- The current user.targetUser
- The new user.procInstId
- The process instance id.workItemId
- The work item id.
WMWorkflowException
- Workflow client exception.public WMAttributeIterator listWorkItemAttributes(java.lang.String procInstId, java.lang.String workItemId, WMFilter filter, boolean countFlag) throws WMWorkflowException
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.
WMWorkflowException
- Workflow client exception.public WMAttribute getWorkItemAttributeValue(java.lang.String procInstId, java.lang.String workItemId, java.lang.String attrName) throws WMWorkflowException
procInstId
- The process instance id.workItemId
- The work item id.attrName
- The attribute name.
WMWorkflowException
- Workflow client exception.public void assignWorkItemAttribute(java.lang.String procInstId, java.lang.String workItemId, java.lang.String attrName, java.lang.Object attrValue) throws WMWorkflowException
procInstId
- The process instance id.workItemId
- The work item id.attrName
- The attribute name.attrValue
- The attribute value.
WMWorkflowException
- Workflow client exception.public void changeProcessInstancesState(java.lang.String procDefId, WMFilter filter, WMProcessInstanceState newState) throws WMWorkflowException
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.
WMWorkflowException
- Workflow client exception.public void changeActivityInstancesState(java.lang.String procDefId, java.lang.String actDefId, WMFilter filter, WMActivityInstanceState newState) throws WMWorkflowException
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.
WMWorkflowException
- Workflow client exception.public void terminateProcessInstances(java.lang.String procDefId, WMFilter filter) throws WMWorkflowException
procDefId
- The ID of the process definition for which
instances are to be terminated.filter
- A filter specification; can be null
.
WMWorkflowException
- Workflow client exception.public void assignProcessInstancesAttribute(java.lang.String procDefId, WMFilter filter, java.lang.String attrName, java.lang.Object attrValue) throws WMWorkflowException
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.
WMWorkflowException
- Workflow client exception.public void assignActivityInstancesAttribute(java.lang.String procDefId, java.lang.String actDefId, WMFilter filter, java.lang.String attrName, java.lang.Object attrValue) throws WMWorkflowException
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.
WMWorkflowException
- Workflow client exception.public void abortProcessInstances(java.lang.String procDefId, WMFilter filter) throws WMWorkflowException
procDefId
- The ID of the process definition for which
instances are to be aborted.filter
- A filter specification; can be null
.
WMWorkflowException
- Workflow client exception.public void abortProcessInstance(java.lang.String procInstId) throws WMWorkflowException
procInstId
- The ID of the process instance to abort.
WMWorkflowException
- Workflow client exception.public void invokeApplication(int toolAgentHandle, java.lang.String appName, java.lang.String procInstId, java.lang.String workItemId, java.lang.Object[] parameters, int appMode) throws WMWorkflowException
toolAgentHandle
- appName
- The tag name of the tool.procInstId
- The ID of the associated process instance.workItemId
- The ID of the associated work item.parameters
- Parameters to pass to the tool.appMode
- Application mode, one of:
WMWorkflowException
- Workflow client exception.public WMAttribute[] requestAppStatus(int toolAgentHandle, java.lang.String procInstId, java.lang.String workItemId, int[] status) throws WMWorkflowException
toolAgentHandle
- The tool handle, returned by the prior call
to invokeApplication(int, java.lang.String, java.lang.String, java.lang.String, java.lang.Object[], int)
.procInstId
- The ID of the associated process instance.workItemId
- The ID of the associated work item.status
-
WMWorkflowException
- Workflow client exception.public void terminateApp(int toolAgentHandle, java.lang.String procInstId, java.lang.String workItemId) throws WMWorkflowException
toolAgentHandle
- procInstId
- The ID of the associated process instance.workItemId
- The ID of the associated work item.
WMWorkflowException
- Workflow client exception.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |