| java.lang.Object org.ofbiz.workflow.client.WorkflowClient
WorkflowClient | public class WorkflowClient (Code) | | Workflow Client - Client API to the Workflow Engine.
author: Andy Zeneski version: $Revision: 1.1 $ since: 2.0 |
Method Summary | |
public void | abortProcess(String workEffortId) | public void | accept(String workEffortId, String partyId, String roleTypeId, Timestamp fromDate) Accept an activity assignment. | public void | acceptAndStart(String workEffortId, String partyId, String roleTypeId, Timestamp fromDate) Accept an activity assignment and begin processing.
Parameters: workEffortId - The WorkEffort entity ID for the activitiy. Parameters: partyId - The assigned / to be assigned users party ID. Parameters: roleTypeId - The assigned / to be assigned role type ID. Parameters: fromDate - The assignment's from date. | public void | appendContext(String workEffortId, Map append) Append data to the execution object's process context. | public WfAssignment | assign(String workEffortId, String partyId, String roleTypeId, Timestamp fromDate, boolean append) Create an activity assignment.
Parameters: workEffortId - The WorkEffort entity ID for the activitiy. Parameters: partyId - The assigned / to be assigned users party ID. Parameters: roleTypeId - The assigned / to be assigned role type ID. Parameters: append - Append this assignment to the list, if others exist. | public void | complete(String workEffortId, String partyId, String roleTypeId, Timestamp fromDate, Map result) Complete an activity assignment and follow the next transition(s).
Parameters: workEffortId - The WorkEffort entity ID for the activity. Parameters: partyId - The assigned / to be assigned users party ID. Parameters: roleTypeId - The assigned / to be assigned role type ID. Parameters: fromDate - The assignment's from date. | public WfAssignment | delegate(String workEffortId, String fromPartyId, String fromRoleTypeId, Timestamp fromFromDate, String toPartyId, String toRoleTypeId, Timestamp toFromDate) Delegate an activity assignment.
Parameters: workEffortId - The WorkEffort entity ID for the activitiy. Parameters: fromPartyId - The current assignment partyId. Parameters: fromRoleTypeId - The current assignment roleTypeId. Parameters: fromFromDate - The current assignment fromDate. Parameters: toPartyId - The new delegated assignment partyId. Parameters: toRoleTypeId - The new delegated assignment roleTypeId. Parameters: toFromDate - The new delegated assignment fromDate. | public void | delegateAndAccept(String workEffortId, String fromPartyId, String fromRoleTypeId, Timestamp fromFromDate, String toPartyId, String toRoleTypeId, Timestamp toFromDate, boolean start) Delegate and accept an activity assignment.
Parameters: workEffortId - The WorkEffort entity ID for the activitiy. Parameters: partyId - The assigned / to be assigned users party ID. Parameters: roleTypeId - The assigned / to be assigned role type ID. Parameters: fromDate - The assignment's from date. Parameters: start - True to attempt to start the activity. | public Map | getContext(String workEffortId) Returns the process context of the execution object. | public long | getPriority(String workEffortId) Gets the priority of the execution object defined by the work effort key.
Parameters: workEffortId - The WorkEffort entity key for the execution object. | public String | getState(String workEffortId) Gets the state of the execution object defined by the work effort key. | public void | resume(String workEffortId) | public void | setPriority(String workEffortId, long priority) Set the priority of the execution object defined by the work effort key. | public void | setState(String workEffortId, String state) Set the state of the execution object defined by the work effort key.
Parameters: workEffortId - The WorkEffort entity key for the execution object. Parameters: state - The new state of the execution object. | public void | start(String workEffortId) Start the activity.
Parameters: workEffortId - The WorkEffort entity ID for the activitiy. | public void | suspend(String workEffortId) |
WorkflowClient | protected WorkflowClient()(Code) | | |
WorkflowClient | public WorkflowClient(GenericDelegator delegator, LocalDispatcher dispatcher)(Code) | | Get a new instance of the Workflow Client
Parameters: delegator - the GenericDelegator object which matchs the delegator used by the workflow engine. Parameters: dispatcher - a LocalDispatcher object to invoke the workflow services. |
WorkflowClient | public WorkflowClient(DispatchContext context)(Code) | | Get a new instance of the Workflow Client
Parameters: dctx - A DispatchContext object.Note the delegator from this object must match the delegator used by the workflow engine. |
abortProcess | public void abortProcess(String workEffortId) throws WfException(Code) | | Abort a process
Parameters: workEffortId - The workeffort entity key for the process to abort throws: WfException - |
accept | public void accept(String workEffortId, String partyId, String roleTypeId, Timestamp fromDate) throws WfException(Code) | | Accept an activity assignment.
Parameters: workEffortId - The WorkEffort entity ID for the activitiy. Parameters: partyId - The assigned / to be assigned users party ID. Parameters: roleTypeId - The assigned / to be assigned role type ID. Parameters: fromDate - The assignment's from date. throws: WfException - |
acceptAndStart | public void acceptAndStart(String workEffortId, String partyId, String roleTypeId, Timestamp fromDate) throws WfException(Code) | | Accept an activity assignment and begin processing.
Parameters: workEffortId - The WorkEffort entity ID for the activitiy. Parameters: partyId - The assigned / to be assigned users party ID. Parameters: roleTypeId - The assigned / to be assigned role type ID. Parameters: fromDate - The assignment's from date. GenericResultWaiter of the start job. throws: WfException - |
appendContext | public void appendContext(String workEffortId, Map append) throws WfException(Code) | | Append data to the execution object's process context.
Parameters: workEffortId - The WorkEffort entity key for the execution object. Parameters: append - The data to append. throws: WfException - |
assign | public WfAssignment assign(String workEffortId, String partyId, String roleTypeId, Timestamp fromDate, boolean append) throws WfException(Code) | | Create an activity assignment.
Parameters: workEffortId - The WorkEffort entity ID for the activitiy. Parameters: partyId - The assigned / to be assigned users party ID. Parameters: roleTypeId - The assigned / to be assigned role type ID. Parameters: append - Append this assignment to the list, if others exist. The new assignment object. throws: WfException - |
complete | public void complete(String workEffortId, String partyId, String roleTypeId, Timestamp fromDate, Map result) throws WfException(Code) | | Complete an activity assignment and follow the next transition(s).
Parameters: workEffortId - The WorkEffort entity ID for the activity. Parameters: partyId - The assigned / to be assigned users party ID. Parameters: roleTypeId - The assigned / to be assigned role type ID. Parameters: fromDate - The assignment's from date. GenericResultWaiter for the complete job. throws: WfException - |
delegate | public WfAssignment delegate(String workEffortId, String fromPartyId, String fromRoleTypeId, Timestamp fromFromDate, String toPartyId, String toRoleTypeId, Timestamp toFromDate) throws WfException(Code) | | Delegate an activity assignment.
Parameters: workEffortId - The WorkEffort entity ID for the activitiy. Parameters: fromPartyId - The current assignment partyId. Parameters: fromRoleTypeId - The current assignment roleTypeId. Parameters: fromFromDate - The current assignment fromDate. Parameters: toPartyId - The new delegated assignment partyId. Parameters: toRoleTypeId - The new delegated assignment roleTypeId. Parameters: toFromDate - The new delegated assignment fromDate. The new assignment object. throws: WfException - |
delegateAndAccept | public void delegateAndAccept(String workEffortId, String fromPartyId, String fromRoleTypeId, Timestamp fromFromDate, String toPartyId, String toRoleTypeId, Timestamp toFromDate, boolean start) throws WfException(Code) | | Delegate and accept an activity assignment.
Parameters: workEffortId - The WorkEffort entity ID for the activitiy. Parameters: partyId - The assigned / to be assigned users party ID. Parameters: roleTypeId - The assigned / to be assigned role type ID. Parameters: fromDate - The assignment's from date. Parameters: start - True to attempt to start the activity. GenericResultWaiter of the start job. throws: WfException - |
getContext | public Map getContext(String workEffortId) throws WfException(Code) | | Returns the process context of the execution object.
Parameters: workEffortId - The WorkEffort entity key for the execution object. throws: WfException - |
getPriority | public long getPriority(String workEffortId) throws WfException(Code) | | Gets the priority of the execution object defined by the work effort key.
Parameters: workEffortId - The WorkEffort entity key for the execution object. Priority of the execution object as a long. throws: WfException - |
getState | public String getState(String workEffortId) throws WfException(Code) | | Gets the state of the execution object defined by the work effort key.
Parameters: workEffortId - The WorkEffort entity key for the execution object. throws: WfException - |
resume | public void resume(String workEffortId) throws WfException(Code) | | Resume an activity
Parameters: workEffortId - The WorkEffort entity key for the activity object throws: WfException - |
setPriority | public void setPriority(String workEffortId, long priority) throws WfException(Code) | | Set the priority of the execution object defined by the work effort key.
Parameters: workEffortId - The WorkEffort entity key for the execution object. Parameters: priority - The new priority of the execution object. throws: WfException - If state change is not allowed. |
setState | public void setState(String workEffortId, String state) throws WfException(Code) | | Set the state of the execution object defined by the work effort key.
Parameters: workEffortId - The WorkEffort entity key for the execution object. Parameters: state - The new state of the execution object. Current state of the execution object as a string. throws: WfException - If state change is not allowed. |
start | public void start(String workEffortId) throws WfException(Code) | | Start the activity.
Parameters: workEffortId - The WorkEffort entity ID for the activitiy. GenericResultWaiter of the start job. throws: WfException - |
suspend | public void suspend(String workEffortId) throws WfException(Code) | | Suspend an activity
Parameters: workEffortId - The WorkEffort entity key for the activity object throws: WfException - |
|
|