| org.wfmc.wapi.WAPI
WAPI | public interface WAPI (Code) | | 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 .
author: Anthony Eden author: Adrian Price |
Method Summary | |
void | abortProcessInstance(String procInstId) Aborts a process instance. | void | abortProcessInstances(String procDefId, WMFilter filter) Aborts a group of process instances. | void | assignActivityInstanceAttribute(String procInstId, String actInstId, String attrName, Object attrValue) Sets the value of an activity instance attribute. | void | assignActivityInstancesAttribute(String procDefId, String actDefId, WMFilter filter, String attrName, Object attrValue) Assigns an attribute value for a group of process instances. | void | assignProcessInstanceAttribute(String procInstId, String attrName, Object attrValue) Sets the specified process instance attribute value. | void | assignProcessInstancesAttribute(String procDefId, WMFilter filter, String attrName, Object attrValue) Assigns an attribute value for a group of process instances. | void | assignWorkItemAttribute(String procInstId, String workItemId, String attrName, Object attrValue) Sets the value of a work item attribute. | void | changeActivityInstanceState(String procInstId, String actInstId, WMActivityInstanceState newState) Changes the state of an activity instance. | void | changeActivityInstancesState(String procDefId, String actDefId, WMFilter filter, WMActivityInstanceState newState) Changes the state of selected activity instances. | void | changeProcessDefinitionState(String procDefId, WMProcessDefinitionState newState) Changes the process definition state. | void | changeProcessInstanceState(String procInstId, WMProcessInstanceState newState) Changes the state of a process instance. | void | changeProcessInstancesState(String procDefId, WMFilter filter, WMProcessInstanceState newState) Changes the state of selected process instances. | void | changeWorkItemState(String procInstId, String workItemId, WMWorkItemState newState) Changes the state of a work item.
N.B. | void | completeWorkItem(String procInstId, String workItemId) Completes the specified work item. | void | connect(WMConnectInfo connectInfo) Connects to a workflow service.
Parameters: connectInfo - The connection info. | String | createProcessInstance(String procDefId, String procInstName) Creates a new process instance for the given process definition.
Parameters: procDefId - The process definition id. Parameters: procInstName - The name of the process instance. | void | disconnect() Disconnects from the workflow service. | WMActivityInstance | getActivityInstance(String procInstId, String actInstId) Retrieves an activity instance.
Parameters: procInstId - The process instance id. Parameters: actInstId - The activity instance id. | WMAttribute | getActivityInstanceAttributeValue(String procInstId, String actInstId, String attrName) Gets the value of an activity instance attribute.
Parameters: procInstId - The process instance id. Parameters: actInstId - The activity instance id. Parameters: attrName - The attribute name. | WMProcessInstance | getProcessInstance(String procInstId) Retrieves a process instance.
Parameters: procInstId - The process instance id. | WMAttribute | getProcessInstanceAttributeValue(String procInstId, String attrName) Gets the specified process instance attribute value.
Parameters: procInstId - The process instance id. Parameters: attrName - The attribute name. | WMWorkItem | getWorkItem(String procInstId, String workItemId) Retrieves a work item.
Parameters: procInstId - The process instance id. Parameters: workItemId - The work item id. | WMAttribute | getWorkItemAttributeValue(String procInstId, String workItemId, String attrName) Retrieves the value of a work item attribute.
Parameters: procInstId - The process instance id. Parameters: workItemId - The work item id. Parameters: attrName - The attribute name. | void | invokeApplication(int toolAgentHandle, String appName, String procInstId, String workItemId, Object[] parameters, int appMode) Invokes a client-side tool. | WMAttributeIterator | listActivityInstanceAttributes(String procInstId, String actInstId, WMFilter filter, boolean countFlag) Opens a list of activity instance attributes. | WMActivityInstanceStateIterator | listActivityInstanceStates(String procInstId, String actInstId, WMFilter filter, boolean countFlag) Opens a list of process instance states. | WMActivityInstanceIterator | listActivityInstances(WMFilter filter, boolean countFlag) Opens a list of activity instances. | WMProcessDefinitionStateIterator | listProcessDefinitionStates(String procDefId, WMFilter filter, boolean countFlag) Opens a list of process definition states. | WMProcessDefinitionIterator | listProcessDefinitions(WMFilter filter, boolean countFlag) Opens a list of process definitions. | WMAttributeIterator | listProcessInstanceAttributes(String procInstId, WMFilter filter, boolean countFlag) Opens a list of process instance attributes. | WMProcessInstanceStateIterator | listProcessInstanceStates(String procInstId, WMFilter filter, boolean countFlag) Opens a list of process instance states. | WMProcessInstanceIterator | listProcessInstances(WMFilter filter, boolean countFlag) Opens a list of process instances. | WMAttributeIterator | listWorkItemAttributes(String procInstId, String workItemId, WMFilter filter, boolean countFlag) Opens a list of work item attributes. | WMWorkItemStateIterator | listWorkItemStates(String procInstId, String workItemId, WMFilter filter, boolean countFlag) Opens a list of work item states. | WMWorkItemIterator | listWorkItems(WMFilter filter, boolean countFlag) Opens a worklist. | void | reassignWorkItem(String sourceUser, String targetUser, String procInstId, String workItemId) Reassigns a work item to another user. | WMAttribute[] | requestAppStatus(int toolAgentHandle, String procInstId, String workItemId, int[] status) Requests the status of an invoked tool. | String | startProcess(String procInstId) Starts a process instance. | void | terminateApp(int toolAgentHandle, String procInstId, String workItemId) Terminates a running tool. | void | terminateProcessInstance(String procInstId) Terminates a process instance. | void | terminateProcessInstances(String procDefId, WMFilter filter) Terminates a group of process instances. |
abortProcessInstances | void abortProcessInstances(String procDefId, WMFilter filter) throws WMWorkflowException(Code) | | Aborts a group of process instances.
Parameters: procDefId - The ID of the process definition for whichinstances are to be aborted. Parameters: filter - A filter specification; can be null . throws: WMWorkflowException - Workflow client exception. |
assignActivityInstanceAttribute | void assignActivityInstanceAttribute(String procInstId, String actInstId, String attrName, Object attrValue) throws WMWorkflowException(Code) | | Sets the value of an activity instance attribute.
Parameters: procInstId - The process instance id. Parameters: actInstId - The activity instance id. Parameters: attrName - The attribute name. Parameters: attrValue - The attribute value. throws: WMWorkflowException - Workflow client exception. |
assignActivityInstancesAttribute | void assignActivityInstancesAttribute(String procDefId, String actDefId, WMFilter filter, String attrName, Object attrValue) throws WMWorkflowException(Code) | | Assigns an attribute value for a group of process instances.
Parameters: procDefId - The ID of the process definition for whichactivity instance attributes are to be assigned. Parameters: actDefId - The ID of the activity definition for whichinstance attributes are to be assigned. Parameters: filter - A filter specification; can be null . Parameters: attrName - The attribute name. Parameters: attrValue - The attribute value. throws: WMWorkflowException - Workflow client exception. |
assignProcessInstanceAttribute | void assignProcessInstanceAttribute(String procInstId, String attrName, Object attrValue) throws WMWorkflowException(Code) | | Sets the specified process instance attribute value.
Parameters: procInstId - The process instance id. Parameters: attrName - The attribute name. Parameters: attrValue - The attribute value. throws: WMWorkflowException - Workflow client exception. |
assignProcessInstancesAttribute | void assignProcessInstancesAttribute(String procDefId, WMFilter filter, String attrName, Object attrValue) throws WMWorkflowException(Code) | | Assigns an attribute value for a group of process instances.
Parameters: procDefId - The ID of the process definition for whichinstance attributes are to be assigned. Parameters: filter - A filter specification; can be null . Parameters: attrName - The attribute name. Parameters: attrValue - The attribute value. throws: WMWorkflowException - Workflow client exception. |
assignWorkItemAttribute | void assignWorkItemAttribute(String procInstId, String workItemId, String attrName, Object attrValue) throws WMWorkflowException(Code) | | Sets the value of a work item attribute.
Parameters: procInstId - The process instance id. Parameters: workItemId - The work item id. Parameters: attrName - The attribute name. Parameters: attrValue - The attribute value. throws: WMWorkflowException - Workflow client exception. |
changeActivityInstanceState | void changeActivityInstanceState(String procInstId, String actInstId, WMActivityInstanceState newState) throws WMWorkflowException(Code) | | Changes the state of an activity instance.
Parameters: procInstId - The process instance id. Parameters: actInstId - The activity instance id. Parameters: newState - The new activity instance state. throws: WMWorkflowException - Workflow client exception. |
changeActivityInstancesState | void changeActivityInstancesState(String procDefId, String actDefId, WMFilter filter, WMActivityInstanceState newState) throws WMWorkflowException(Code) | | Changes the state of selected activity instances.
Parameters: procDefId - The ID of the process definition for whichactivity instances are to be changed. Parameters: actDefId - The ID of the activity definition for whichinstances are to be changed. Parameters: filter - A filter specification; can be null . Parameters: newState - The new state to apply. throws: WMWorkflowException - Workflow client exception. |
changeProcessInstancesState | void changeProcessInstancesState(String procDefId, WMFilter filter, WMProcessInstanceState newState) throws WMWorkflowException(Code) | | Changes the state of selected process instances.
Parameters: procDefId - The ID of the process definition for whichinstances are to be changed. Parameters: filter - A filter specification; can be null . Parameters: newState - The new state to apply. throws: WMWorkflowException - Workflow client exception. |
changeWorkItemState | void changeWorkItemState(String procInstId, String workItemId, WMWorkItemState newState) throws WMWorkflowException(Code) | | Changes the state of a work item.
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 badly copied from that for
WMChangeDefinitionState . The other WAPI functions that refer
to work items invariably require the procInstId parameter.
Parameters: procInstId - The process instance id. Parameters: workItemId - The work item id. Parameters: newState - The new work item state. throws: WMWorkflowException - Workflow client exception. |
completeWorkItem | void completeWorkItem(String procInstId, String workItemId) throws WMWorkflowException(Code) | | Completes the specified work item.
Parameters: procInstId - The process instance id. Parameters: workItemId - The work item id. throws: WMWorkflowException - Workflow client exception. |
connect | void connect(WMConnectInfo connectInfo) throws WMWorkflowException(Code) | | Connects to a workflow service.
Parameters: connectInfo - The connection info. In OBE, pass null to skip the JAAS login and retain the current security identity (if any). throws: WMWorkflowException - Workflow client exception. |
createProcessInstance | String createProcessInstance(String procDefId, String procInstName) throws WMWorkflowException(Code) | | Creates a new process instance for the given process definition.
Parameters: procDefId - The process definition id. Parameters: procInstName - The name of the process instance. The process instance id. throws: WMWorkflowException - Workflow client exception. |
getActivityInstanceAttributeValue | WMAttribute getActivityInstanceAttributeValue(String procInstId, String actInstId, String attrName) throws WMWorkflowException(Code) | | Gets the value of an activity instance attribute.
Parameters: procInstId - The process instance id. Parameters: actInstId - The activity instance id. Parameters: attrName - The attribute name. The attribute. throws: WMWorkflowException - Workflow client exception. |
getProcessInstanceAttributeValue | WMAttribute getProcessInstanceAttributeValue(String procInstId, String attrName) throws WMWorkflowException(Code) | | Gets the specified process instance attribute value.
Parameters: procInstId - The process instance id. Parameters: attrName - The attribute name. The attribute. throws: WMWorkflowException - Workflow client exception. |
getWorkItemAttributeValue | WMAttribute getWorkItemAttributeValue(String procInstId, String workItemId, String attrName) throws WMWorkflowException(Code) | | Retrieves the value of a work item attribute.
Parameters: procInstId - The process instance id. Parameters: workItemId - The work item id. Parameters: attrName - The attribute name. The attribute. throws: WMWorkflowException - Workflow client exception. |
invokeApplication | void invokeApplication(int toolAgentHandle, String appName, String procInstId, String workItemId, Object[] parameters, int appMode) throws WMWorkflowException(Code) | | Invokes a client-side tool.
Parameters: toolAgentHandle - Parameters: appName - The tag name of the tool. Parameters: procInstId - The ID of the associated process instance. Parameters: workItemId - The ID of the associated work item. Parameters: parameters - Parameters to pass to the tool. Parameters: appMode - Application mode, one of: throws: WMWorkflowException - Workflow client exception. |
listActivityInstanceAttributes | WMAttributeIterator listActivityInstanceAttributes(String procInstId, String actInstId, WMFilter filter, boolean countFlag) throws WMWorkflowException(Code) | | Opens a list of activity instance attributes. The items in the
attribute list can be retrieved sequentially in a typesafe way by calling
the iterator's tsNext() method.
Parameters: procInstId - The process instance id. Parameters: actInstId - The activity instance id. Parameters: filter - The filter or null. Parameters: countFlag - True to return count value. An iterator to access the WMAttribute objects. throws: WMWorkflowException - Workflow client exception. |
listActivityInstanceStates | WMActivityInstanceStateIterator listActivityInstanceStates(String procInstId, String actInstId, WMFilter filter, boolean countFlag) throws WMWorkflowException(Code) | | Opens a list of process instance states. The items in the state list
can be retrieved sequentially in a typesafe way by calling the iterator's
tsNext() method.
Parameters: procInstId - The process instance id. Parameters: actInstId - The activity instance id. Parameters: filter - The filter or null. Parameters: countFlag - True to return count value. An iterator to access the WMActivityInstanceState objects. throws: WMWorkflowException - Workflow client exception. |
listActivityInstances | WMActivityInstanceIterator listActivityInstances(WMFilter filter, boolean countFlag) throws WMWorkflowException(Code) | | Opens a list of activity instances. The items in the list can be
retrieved sequentially in a typesafe way by calling the iterator's
tsNext() method.
Parameters: filter - The filter or null. Parameters: countFlag - True to return count value. An iterator to access the WMActivityInstance objects. throws: WMWorkflowException - Workflow client exception. |
listProcessDefinitionStates | WMProcessDefinitionStateIterator listProcessDefinitionStates(String procDefId, WMFilter filter, boolean countFlag) throws WMWorkflowException(Code) | | Opens a list of process definition states. The items in the state list
can be retrieved sequentially in a typesafe way by calling the iterator's
tsNext() method.
Parameters: procDefId - The unique process definition ID. Parameters: filter - The filter or null. Parameters: countFlag - True to return count value. An iterator to access the WMProcessDefinitionStateobjects. throws: WMWorkflowException - Workflow client exception. |
listProcessDefinitions | WMProcessDefinitionIterator listProcessDefinitions(WMFilter filter, boolean countFlag) throws WMWorkflowException(Code) | | Opens a list of process definitions. The items in the list can be
retrieved sequentially in a typesafe way by calling the iterator's
tsNext() method.
Parameters: filter - The filter or null. Parameters: countFlag - True to return count value. An iterator to access the WMProcessDefinition objects. throws: WMWorkflowException - Workflow client exception. |
listProcessInstanceAttributes | WMAttributeIterator listProcessInstanceAttributes(String procInstId, WMFilter filter, boolean countFlag) throws WMWorkflowException(Code) | | Opens a list of process instance attributes. The items in the
attribute list can be retrieved sequentially in a typesafe way by calling
the iterator's tsNext() method.
Parameters: filter - The filter or null. Parameters: countFlag - True to return count value. An iterator to access the WMAttribute objects. throws: WMWorkflowException - Workflow client exception. |
listProcessInstanceStates | WMProcessInstanceStateIterator listProcessInstanceStates(String procInstId, WMFilter filter, boolean countFlag) throws WMWorkflowException(Code) | | Opens a list of process instance states. The items in the state list
can be retrieved sequentially in a typesafe way by calling the iterator's
tsNext() method.
Parameters: procInstId - The unique process instance ID. Parameters: filter - The filter or null. Parameters: countFlag - True to return count value. An iterator to access the WMProcessInstanceState objects. throws: WMWorkflowException - Workflow client exception. |
listProcessInstances | WMProcessInstanceIterator listProcessInstances(WMFilter filter, boolean countFlag) throws WMWorkflowException(Code) | | Opens a list of process instances. The items in the list
can be retrieved sequentially in a typesafe way by calling the iterator's
tsNext() method.
Parameters: filter - The filter or null. Parameters: countFlag - True to return count value. An iterator to access the WMProcessInstance objects. throws: WMWorkflowException - Workflow client exception. |
listWorkItemAttributes | WMAttributeIterator listWorkItemAttributes(String procInstId, String workItemId, WMFilter filter, boolean countFlag) throws WMWorkflowException(Code) | | Opens a list of work item attributes. The items in the
attribute list can be retrieved sequentially in a typesafe way by calling
the iterator's tsNext() method.
Parameters: procInstId - The process instance id. Parameters: workItemId - The work item id. Parameters: filter - The filter or null. Parameters: countFlag - True to return count value. An iterator to access the WMAttribute objects. throws: WMWorkflowException - Workflow client exception. |
listWorkItemStates | WMWorkItemStateIterator listWorkItemStates(String procInstId, String workItemId, WMFilter filter, boolean countFlag) throws WMWorkflowException(Code) | | Opens a list of work item states. The items in the
work item states list can be retrieved sequentially in a typesafe way by
calling the iterator's 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.
Parameters: procInstId - The process instance id. Parameters: workItemId - The process instance id. Parameters: filter - The filter or null. Parameters: countFlag - True to return count value. An iterator to access the WMWorkItemState objects. throws: WMWorkflowException - Workflow client exception. |
listWorkItems | WMWorkItemIterator listWorkItems(WMFilter filter, boolean countFlag) throws WMWorkflowException(Code) | | Opens a worklist. The items in the list can be retrieved
sequentially using the iterator's tsNext() method.
Parameters: filter - The filter or null. Parameters: countFlag - True to return count value. An iterator to access the WMWorkItem objects. throws: WMWorkflowException - Workflow client exception. |
reassignWorkItem | void reassignWorkItem(String sourceUser, String targetUser, String procInstId, String workItemId) throws WMWorkflowException(Code) | | Reassigns a work item to another user.
Parameters: sourceUser - The current user. Parameters: targetUser - The new user. Parameters: procInstId - The process instance id. Parameters: workItemId - The work item id. throws: WMWorkflowException - Workflow client exception. |
requestAppStatus | WMAttribute[] requestAppStatus(int toolAgentHandle, String procInstId, String workItemId, int[] status) throws WMWorkflowException(Code) | | Requests the status of an invoked tool.
Parameters: toolAgentHandle - The tool handle, returned by the prior callto WAPI.invokeApplication. Parameters: procInstId - The ID of the associated process instance. Parameters: workItemId - The ID of the associated work item. Parameters: status - The status of specified tool. throws: WMWorkflowException - Workflow client exception. |
startProcess | String startProcess(String procInstId) throws WMWorkflowException(Code) | | Starts a process instance. The process instance id is retrieved
from a prior call to createProcessInstance()
Parameters: procInstId - The process instance id retrieved in a priorcall to createProcessInstance() . The new process instance id (which may be the same as the old). throws: WMWorkflowException - Workflow client exception. |
terminateApp | void terminateApp(int toolAgentHandle, String procInstId, String workItemId) throws WMWorkflowException(Code) | | Terminates a running tool.
Parameters: toolAgentHandle - Parameters: procInstId - The ID of the associated process instance. Parameters: workItemId - The ID of the associated work item. throws: WMWorkflowException - Workflow client exception. |
terminateProcessInstances | void terminateProcessInstances(String procDefId, WMFilter filter) throws WMWorkflowException(Code) | | Terminates a group of process instances.
Parameters: procDefId - The ID of the process definition for whichinstances are to be terminated. Parameters: filter - A filter specification; can be null . throws: WMWorkflowException - Workflow client exception. |
|
|