Package wt.workflow.work
Class StandardWorkflowService
java.lang.Object
wt.services.StandardManager
wt.workflow.work.StandardWorkflowService
- All Implemented Interfaces:
Serializable,wt.fc._NetFactor,NetFactor,wt.services.Manager,WorkflowService,WorkflowServiceSvr
public class StandardWorkflowService
extends StandardManager
implements WorkflowService, WorkflowServiceSvr, Serializable
Standard implementation of the workflow service interfaces
Use the newStandardWorkflowService static factory method(s), not the
StandardWorkflowService constructor, to construct instances of this class. Instances must be constructed
using the static factory(s), in order to ensure proper initialization of the instance.
Supported API: true
Extendable: false
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoidacceptAssignment(WorkItem workItem, WTUser user)
Supported API: truevoidcreateOverdueWorkItem(WfExecutionObject exec_obj) Creates a work item corresponding to the actions to be taken on an overdue execution object.wt.clients.beans.table.WTTableModelcreateTableModel(String loadAction) This method is used to construct a worklist on the server and return it to the client.wt.clients.beans.table.WTTableModelcreateTableModel(String loadAction, Vector groupBy, Vector sortBy) This method is used to construct a worklist on the server and return it to the client.wt.clients.beans.table.WTTableModelcreateTableModel(String loadAction, Vector groupBy, Vector sortBy, WTObject contextObject) This method is used to construct a worklist on the server and return it to the client.createWorkListModel(String loadAction) This method is used to construct a worklist on the server and return it to the client.createWorkListModel(String loadAction, Vector groupBy, Vector sortBy) This method is used to construct a worklist on the server and return it to the client.voiddelegate(WorkItem workItem, WTPrincipal principal) Delegate a work item to a new owner
Supported API: truegetAssignees(WfAssignedActivity activity) Answer a vector of principals assigned to the activity
Supported API: truegetParticipantRolePermissions(ObjectReference wfExecObjRef) API to return list of participant Roles with permissions to assignee on each Role for current Process/Activity/Block.getParticipantRolesInProcess(ObjectReference wfExecObjectRef) API to return list of Participant Role for current Process/Activity/Block.Answer an enumeration of all pending work items for all users
Supported API: truegetUncompletedWorkItems(Integer query_limit, String sort_by_str) Answer an enumeration of all pending work items for all users, sorted and only the first nnn number of workitems returned.getUncompletedWorkItems(Persistable object, String task) Get incomplete work items by object & task
Supported API: truegetUncompletedWorkItems(Persistable object, Role role) Get pending work by object & role
Supported API: truegetUncompletedWorkItems(WTPrincipal principal) Answer an enumeration of incomplete work items for a principal
Supported API: trueAnswer an enumeration of all pending work items for all users
Supported API: truegetWorkItems(String source) Answer an enumeration of work items created by a specific source
Supported API: truegetWorkItems(Persistable object) Answer an enumeration of work items for an object
Supported API: truegetWorkItems(Persistable object, String source) Answer an enumeration of work items for an object & source
Supported API: truegetWorkItems(Persistable object, WTPrincipal principal) Get work by object & principa
Supported API: truegetWorkItems(Persistable object, WTPrincipal principal, String task) Get work by object & principal & task
Supported API: truegetWorkItems(Persistable object, WTPrincipal principal, Role role) Get work by object & principal & role
Supported API: truegetWorkItems(Persistable object, Role role) Get work by object & role
Supported API: truegetWorkItems(WTPrincipal principal) Answer an enumeration of work items for a principal
Supported API: truegetWorkItems(WTPrincipal principal, Role role) Answer an enumeration of work items for a principal for a specific role
Supported API: truebooleanThis is the method that indicates whether a WorkItem is offered and capable of being Accepted.voidmarkWorkItemComplete(Persistable object, WTPrincipal completedBy, String task) Mark the work item defined by user, object & task as complete.voidmarkWorkItemComplete(Persistable object, WTPrincipal completedBy, Role role) Mark the work item defined by user, object & role as complete.voidmarkWorkItemComplete(WorkItem workItem, WTPrincipalReference completedBy) Deprecated.Since R2 Mark the work item complete.voidmarkWorkItemIncomplete(Persistable object, WTPrincipal completedBy, Role role) Mark the work item defined by user, object & role as NOT complete.voidreassignActivity(WfAssignedActivity activity) Reassigns activity to principal referred to by special activity variable.voidreassignActivity(WfAssignedActivity activity, WTPrincipal principal) Reassigns activity to principal referred to principal passed as parameter.replaceVariables(String txt, ProcessData variables) Utility method that replaces values for variables whenever they occur.voidRevoke rights that were granted for the execution of a task for each variable in the activity.voidsendNotification(String subject, String msgBody, Vector recipients, Vector roles, Vector actorRoles, Vector projects, Vector variables, ObjectReference activityReference) sendNotificationresolves the principals and sends notification to them.voidsendNotification(String subject, String msgBody, Vector recipients, Vector roles, Vector actorRoles, Vector projects, Vector variables, ObjectReference activityReference, String notificationTemplateName, WfExternalRecipientList emailAddrs, WfEmailAttachments attachments) sendNotificationresolves the principals and sends notification to them.voidsendNotification(String msgBody, Vector recipients, Vector roles, Vector actorRoles, ObjectReference activityReference) send email to a recipient list
Supported API: truevoidsetTaskBasedRights(WorkItem wi, WTPrincipalReference p_ref) Add rights to assignee that are defined in activity variables the reference persistable objects.booleantally(WfAssignedActivity self, WfTallyType policy, String operator, int value, String event) This is the tally method that is called from the Custom Routing Event/...Event Firing Expression.voidworkComplete(ObjectReference workItemRef, WTPrincipalReference principalRef, Vector eventList) Declare a workItem complete and transmit the event(s) to trigger.voidworkComplete(WorkItem workItem, WTPrincipalReference principalRef, Vector eventList) Declare a workItem complete and transmit the event(s) to trigger.Methods inherited from class wt.services.StandardManager
getManagerService, getManagerStatus, getName, getStartupType, initialize, performShutdownProcess, registerEvents
-
Method Details
-
getWorkItems
Answer an enumeration of work items for a principal
Supported API: true- Specified by:
getWorkItemsin interfaceWorkflowService- Parameters:
principal- the assigned-to WTPrincipal used as search criteria- Returns:
- QueryResult
- Throws:
WTExceptionWfException
-
getUncompletedWorkItems
Answer an enumeration of incomplete work items for a principal
Supported API: true- Specified by:
getUncompletedWorkItemsin interfaceWorkflowService- Parameters:
principal- the assigned-to WTPrincipal used as search criteria- Returns:
- QueryResult
- Throws:
WTExceptionWfException
-
getWorkItems
Answer an enumeration of work items for a principal for a specific role
Supported API: true- Specified by:
getWorkItemsin interfaceWorkflowService- Parameters:
principal- the assigned-to WTPrincipal used as search criteriarole- the Role object used as search criteria- Returns:
- QueryResult
- Throws:
WTExceptionWfException
-
getWorkItems
Answer an enumeration of work items created by a specific source
Supported API: true- Specified by:
getWorkItemsin interfaceWorkflowService- Parameters:
source- the name of the process (theLifeCycleTemplate) that created the WorkItem used as a search criteria- Returns:
- QueryResult
- Throws:
WTExceptionWfException
-
getWorkItems
Answer an enumeration of work items for an object
Supported API: true- Specified by:
getWorkItemsin interfaceWorkflowService- Parameters:
object- the persistable lifecyclemanaged object that is used as the search criteria- Returns:
- QueryResult
- Throws:
WTExceptionWfException
-
getWorkItems
Answer an enumeration of work items for an object & source
Supported API: true- Specified by:
getWorkItemsin interfaceWorkflowService- Parameters:
object- the persistable lifecyclemanaged object that is used as the search criteriasource- the name of the process (the LifeCycleTemplate name) that caused the work item to be created used as search criteria- Returns:
- QueryResult
- Throws:
WTExceptionWfException
-
getWorkItems
public QueryResult getWorkItems(Persistable object, WTPrincipal principal, Role role) throws WTException, WfException Get work by object & principal & role
Supported API: true- Specified by:
getWorkItemsin interfaceWorkflowService- Parameters:
object- the persistable lifecyclemanaged object that is used as search criteriaprincipal- the assigned-to WTPrincipal that is used as search critieriarole- the role object that is used as search criteria- Returns:
- QueryResult
- Throws:
WTExceptionWfException
-
getWorkItems
public QueryResult getWorkItems(Persistable object, WTPrincipal principal, String task) throws WTException, WfException Get work by object & principal & task
Supported API: true- Specified by:
getWorkItemsin interfaceWorkflowService- Parameters:
object- the persistable lifecyclemanaged object that is used as search criteriaprincipal- the assigned-to WTPrincipal that is used as search critieriatask- the task that is used as search criteria- Returns:
- QueryResult
- Throws:
WTExceptionWfException
-
getWorkItems
public QueryResult getWorkItems(Persistable object, WTPrincipal principal) throws WTException, WfException Get work by object & principa
Supported API: true- Specified by:
getWorkItemsin interfaceWorkflowService- Parameters:
object- the persistable lifecyclemanaged object that is used as search criteriaprincipal- the assigned-to WTPrincipal that is used as search critieria- Returns:
- QueryResult
- Throws:
WTExceptionWfException
-
getWorkItems
Get work by object & role
Supported API: true- Specified by:
getWorkItemsin interfaceWorkflowService- Parameters:
object- the persistable lifecyclemanaged object that is used as search criteriarole- the role object that is used as search criteria- Returns:
- QueryResult
- Throws:
WTExceptionWfException
-
getUncompletedWorkItems
public QueryResult getUncompletedWorkItems(Persistable object, Role role) throws WTException, WfException Get pending work by object & role
Supported API: true- Specified by:
getUncompletedWorkItemsin interfaceWorkflowService- Parameters:
object- the persistable lifecyclemanaged object that is used as search criteriarole- the role object that is used as search criteria- Returns:
- QueryResult
- Throws:
WTExceptionWfException
-
getWorkItems
Answer an enumeration of all pending work items for all users
Supported API: true- Specified by:
getWorkItemsin interfaceWorkflowService- Returns:
- QueryResult
- Throws:
WTExceptionWfException
-
getUncompletedWorkItems
Answer an enumeration of all pending work items for all users
Supported API: true- Specified by:
getUncompletedWorkItemsin interfaceWorkflowService- Returns:
- QueryResult
- Throws:
WTExceptionWfException
-
getUncompletedWorkItems
public QueryResult getUncompletedWorkItems(Persistable object, String task) throws WTException, WfException Get incomplete work items by object & task
Supported API: true- Specified by:
getUncompletedWorkItemsin interfaceWorkflowService- Parameters:
object- the persistable lifecyclemanaged object that is used as search criteriatask- the task that is used as search criteria- Returns:
- QueryResult
- Throws:
WTExceptionWfException
-
getAssignees
Answer a vector of principals assigned to the activity
Supported API: true- Specified by:
getAssigneesin interfaceWorkflowService- Parameters:
activity-- Returns:
- Vector
- Throws:
WTExceptionWfException
-
workComplete
public void workComplete(WorkItem workItem, WTPrincipalReference principalRef, Vector eventList) throws WTException, WfException Declare a workItem complete and transmit the event(s) to trigger.
Supported API: true- Specified by:
workCompletein interfaceWorkflowService- Parameters:
workItem-principalRef-eventList-- Throws:
WTExceptionWfException
-
workComplete
public void workComplete(ObjectReference workItemRef, WTPrincipalReference principalRef, Vector eventList) throws WTException, WfException Declare a workItem complete and transmit the event(s) to trigger.
Supported API: true- Specified by:
workCompletein interfaceWorkflowService- Parameters:
workItemRef-principalRef-eventList-- Throws:
WTExceptionWfException
-
markWorkItemComplete
public void markWorkItemComplete(WorkItem workItem, WTPrincipalReference completedBy) throws WTException, WfException Deprecated.Since R2 Mark the work item complete.
Supported API: true- Specified by:
markWorkItemCompletein interfaceWorkflowService- Parameters:
workItem-completedBy- the performer of the work- Throws:
WTExceptionWfException
-
markWorkItemComplete
public void markWorkItemComplete(Persistable object, WTPrincipal completedBy, Role role) throws WTException, WfException Mark the work item defined by user, object & role as complete.
Supported API: true- Specified by:
markWorkItemCompletein interfaceWorkflowService- Parameters:
object- the life cycle managed object associated with the work itemcompletedBy- the performer of the workrole- the role played by the actor- Throws:
WTExceptionWfException
-
markWorkItemComplete
public void markWorkItemComplete(Persistable object, WTPrincipal completedBy, String task) throws WTException, WfException Mark the work item defined by user, object & task as complete.
Supported API: true- Specified by:
markWorkItemCompletein interfaceWorkflowService- Parameters:
object- the life cycle managed object associated with the work itemcompletedBy- the performer of the worktask- the role played by the actor- Throws:
WTExceptionWfException
-
markWorkItemIncomplete
public void markWorkItemIncomplete(Persistable object, WTPrincipal completedBy, Role role) throws WTException, WfException Mark the work item defined by user, object & role as NOT complete.
Supported API: true- Specified by:
markWorkItemIncompletein interfaceWorkflowService- Parameters:
object- the life cycle managed object associated with the work itemcompletedBy- the performer of the workrole- the role played by the completedBy principal- Throws:
WTExceptionWfException
-
acceptAssignment
Supported API: true- Specified by:
acceptAssignmentin interfaceWorkflowService- Parameters:
workItem-user-- Throws:
WTExceptionWfException
-
delegate
Delegate a work item to a new owner
Supported API: true- Specified by:
delegatein interfaceWorkflowService- Parameters:
workItem-principal-- Throws:
WTExceptionWfException
-
sendNotification
public void sendNotification(String msgBody, Vector recipients, Vector roles, Vector actorRoles, ObjectReference activityReference) throws WTException send email to a recipient list
Supported API: true- Specified by:
sendNotificationin interfaceWorkflowService- Parameters:
msgBody-recipients-roles-actorRoles-activityReference-- Throws:
WTException
-
sendNotification
public void sendNotification(String subject, String msgBody, Vector recipients, Vector roles, Vector actorRoles, Vector projects, Vector variables, ObjectReference activityReference) throws WTException sendNotificationresolves the principals and sends notification to them.
Supported API: true- Specified by:
sendNotificationin interfaceWorkflowService- Parameters:
subject-msgBody-recipients-roles-actorRoles-projects-variables-activityReference-- Throws:
WTException
-
createWorkListModel
This method is used to construct a worklist on the server and return it to the client. The created worklist will contain either work items for all users, or work items for the current user.
Supported API: true- Specified by:
createWorkListModelin interfaceWorkflowService- Parameters:
loadAction- The type of load action to be performed on the work list. Valid values are 'worklist-load-user' to load work items for the current user, or 'worklist-load-admin' to load work items for all users.- Returns:
- WfWorkListModel
- Throws:
WTException
-
createWorkListModel
public WfWorkListModel createWorkListModel(String loadAction, Vector groupBy, Vector sortBy) throws WTException This method is used to construct a worklist on the server and return it to the client. The created worklist will contain either work items for all users, or work items for the current user.
Supported API: true- Specified by:
createWorkListModelin interfaceWorkflowService- Parameters:
loadAction- The type of load action to be performed on the work list. Valid values are 'worklist-load-user' to load work items for the current user, or 'worklist-load-admin' to load work items for all users.groupBy- The ordered list of columns to be grouped for the work list. If no grouping is required then this parameter may be set to 'null' or an empty Vector may be sent in. Otherwise, this parameter takes a vector (of Strings) of column names to be grouped. The first column listed in the vector will be the first column grouped.sortBy- The ordered list of columns to be sorted for the work list. If no sorting is required then this parameter may be set to 'null' or an empty Vector may be sent in. Otherwise, this parameter takes a vector (of Strings) of column names to be sorted. The first column listed in the vector will be the first column sorted.- Returns:
- WfWorkListModel
- Throws:
WTException
-
createOverdueWorkItem
Creates a work item corresponding to the actions to be taken on an overdue execution object.
Supported API: true- Specified by:
createOverdueWorkItemin interfaceWorkflowService- Parameters:
exec_obj-- Throws:
WTException
-
reassignActivity
Reassigns activity to principal referred to by special activity variable.
Supported API: true- Specified by:
reassignActivityin interfaceWorkflowService- Parameters:
activity-- Throws:
WTException
-
reassignActivity
Reassigns activity to principal referred to principal passed as parameter.
Supported API: true- Specified by:
reassignActivityin interfaceWorkflowService- Parameters:
activity-principal-- Throws:
WTException
-
createTableModel
This method is used to construct a worklist on the server and return it to the client. The created worklist will contain either work items for all users, or work items for the current user.
Supported API: true- Specified by:
createTableModelin interfaceWorkflowService- Parameters:
loadAction- The type of load action to be performed on the work list. Valid values are 'worklist-load-user' to load work items for the current user, or 'worklist-load-admin' to load work items for all users.- Returns:
- WTTableModel
- Throws:
WTException
-
createTableModel
public wt.clients.beans.table.WTTableModel createTableModel(String loadAction, Vector groupBy, Vector sortBy) throws WTException This method is used to construct a worklist on the server and return it to the client. The created worklist will contain either work items for all users, or work items for the current user.
Supported API: true- Specified by:
createTableModelin interfaceWorkflowService- Parameters:
loadAction- The type of load action to be performed on the work list. Valid values are 'worklist-load-user' to load work items for the current user, or 'worklist-load-admin' to load work items for all users.groupBy- The ordered list of columns to be grouped for the work list. If no grouping is required then this parameter may be set to 'null' or an empty Vector may be sent in. Otherwise, this parameter takes a vector (of Strings) of column names to be grouped. The first column listed in the vector will be the first column grouped.sortBy- The ordered list of columns to be sorted for the work list. If no sorting is required then this parameter may be set to 'null' or an empty Vector may be sent in. Otherwise, this parameter takes a vector (of Strings) of column names to be sorted. The first column listed in the vector will be the first column sorted.- Returns:
- WTTableModel
- Throws:
WTException
-
createTableModel
public wt.clients.beans.table.WTTableModel createTableModel(String loadAction, Vector groupBy, Vector sortBy, WTObject contextObject) throws WTException This method is used to construct a worklist on the server and return it to the client. The created worklist will contain either work items for all users, or work items for the current user.
Supported API: true- Specified by:
createTableModelin interfaceWorkflowService- Parameters:
loadAction- The type of load action to be performed on the work list. Valid values are 'worklist-load-user' to load work items for the current user, or 'worklist-load-admin' to load work items for all users.groupBy- The ordered list of columns to be grouped for the work list. If no grouping is required then this parameter may be set to 'null' or an empty Vector may be sent in. Otherwise, this parameter takes a vector (of Strings) of column names to be grouped. The first column listed in the vector will be the first column grouped.sortBy- The ordered list of columns to be sorted for the work list. If no sorting is required then this parameter may be set to 'null' or an empty Vector may be sent in. Otherwise, this parameter takes a vector (of Strings) of column names to be sorted. The first column listed in the vector will be the first column sorted.contextObject-- Returns:
- WTTableModel
- Throws:
WTException
-
tally
public boolean tally(WfAssignedActivity self, WfTallyType policy, String operator, int value, String event) throws WTException This is the tally method that is called from the Custom Routing Event/...Event Firing Expression. It is exposed here for future client customization.
Supported API: true- Specified by:
tallyin interfaceWorkflowService- Parameters:
self-policy-operator-value-event-- Returns:
- boolean
- Throws:
WTException
-
replaceVariables
Utility method that replaces values for variables whenever they occur. The parameters are a text String and a ProcessData object that holds the variables whose values must be replaced. In the text, a variable occurrence is represented by {var_name}, where:- var_name is the name of the variable
- the delimiter characters '{' and '}' can be escaped by preceding hem by '\'
The delimiter characters can be defined in wt.properties. The default are open and close curly braces ('{' and '}').
Supported API: true- Specified by:
replaceVariablesin interfaceWorkflowService- Parameters:
txt-variables-- Returns:
- String
- Throws:
WTException
-
isOffered
This is the method that indicates whether a WorkItem is offered and capable of being Accepted.
Supported API: true- Specified by:
isOfferedin interfaceWorkflowService- Parameters:
workItem-- Returns:
- boolean
- Throws:
WTException
-
getUncompletedWorkItems
public QueryResult getUncompletedWorkItems(Integer query_limit, String sort_by_str) throws WTException, WfException Answer an enumeration of all pending work items for all users, sorted and only the first nnn number of workitems returned.
Supported API: true- Specified by:
getUncompletedWorkItemsin interfaceWorkflowService- Parameters:
query_limit-sort_by_str-- Returns:
- QueryResult
- Throws:
WTExceptionWfException
-
sendNotification
public void sendNotification(String subject, String msgBody, Vector recipients, Vector roles, Vector actorRoles, Vector projects, Vector variables, ObjectReference activityReference, String notificationTemplateName, WfExternalRecipientList emailAddrs, WfEmailAttachments attachments) throws WTException sendNotificationresolves the principals and sends notification to them.
Supported API: true- Specified by:
sendNotificationin interfaceWorkflowService- Parameters:
subject-msgBody-recipients-roles-actorRoles-projects-variables-activityReference-notificationTemplateName-emailAddrs-attachments-- Throws:
WTException
-
setTaskBasedRights
Add rights to assignee that are defined in activity variables the reference persistable objects. For each variable it adds to the object the privileges specified in the variable template only if necessary, that is the participant doesn't have the privilege. If the the privilege is actually added, this is registered with the variable. Returns true if the workitem is changed.The privileges are added by changing the ad hoc ACL of the object. This means that this method only works if the object is ad hoc controlled.
Supported API: true- Specified by:
setTaskBasedRightsin interfaceWorkflowServiceSvr- Parameters:
wi-p_ref-- Throws:
WTException
-
revokeTaskBasedRights
Revoke rights that were granted for the execution of a task for each variable in the activity.
Supported API: true- Specified by:
revokeTaskBasedRightsin interfaceWorkflowServiceSvr- Parameters:
wi-- Throws:
WTException
-
getParticipantRolesInProcess
API to return list of Participant Role for current Process/Activity/Block.
Supported API: true
- Specified by:
getParticipantRolesInProcessin interfaceWorkflowService- Parameters:
ObjectReference- : Referrence to current Process/Activity/Block- Returns:
- List
- Throws:
WTException
-
getParticipantRolePermissions
public HashMap<Object,List<WTRolePermission>> getParticipantRolePermissions(ObjectReference wfExecObjRef) throws WTException API to return list of participant Roles with permissions to assignee on each Role for current Process/Activity/Block.
Supported API: true
- Specified by:
getParticipantRolePermissionsin interfaceWorkflowService- Parameters:
ObjectReference- : Referrence to current Process/Activity/Block- Returns:
- HashMap<Object, List
Object: It will be ActorRole and Role. WTRolePermission: Custom object holding curerent Role and it's permissions. - Throws:
WTException
-