Interface WfEngineService
- All Known Implementing Classes:
StandardWfEngineService
WfEngineService represents the client accessible
API to the workflow engine. It contains, for example, methods to create
and start processes.
Supported API: true
Extendable: false
-
Method Summary
Modifier and TypeMethodDescriptionvoidchangeEventConfiguration(WfProcess process, WfEventConfiguration evt_cfg) Changes the process' event configuration to the one passed as argument.changeState(WfExecutionObject exec_object, WfTransition transition) Changes the state of a process or activity.complete(WfActivity activity, Vector selected_events) Completes activity and generates events.createAdHocProcess(WfTemplateObject template, Object team_spec) Deprecated.use method with WTContainerRefcreateAdHocProcess(WfTemplateObject template, Object team_spec, WTContainerRef context_ref) Creates a process given a template object that can be a process template, a block template or an activity template.createProcess(WfProcessDefinition template, Object team_spec) Deprecated.use method with WTContainerRefcreateProcess(WfProcessDefinition template, Object team_spec, WTContainerRef context_ref) Creates and returns a process from the given template, associated team specification and a reference to the context (@link wt.inf.container.WTContainerRef} where the process is to be created.createStartAdHocProcess(WfAdHocActivity requester, WfContainerTemplate template) Creates and starts an adh hoc process given the ad hoc activity and the template from which the process should be instantiated.voiddeleteClosedProcesses(SearchCondition condition) Delete all closed processes that meet the search condition passed as argument.voiddeleteProcess(WfProcess process) Deletes process passed as argument.getAssociatedProcesses(Persistable object, WfState state) Deprecated.use method with WTContainerRef argument.getAssociatedProcesses(Persistable object, WfState state, WTContainerRef context_ref) Returns all process instances associated with the object passed as argument that are in a given state in the passed WTContainer.getAssociatedProcessesMap(WTCollection col, WfState state)
Supported API: truegetHistory(WfEventAuditType eventType) Returns a list of all events of a given type associated with execution objects.getHistory(WfExecutionObject obj, WfEventAuditType eventType) Returns a list of all events associated with a given execution object of a given type.getOverdueActivities(WfProcess process) Returns all overdue activities contained in a given process.Deprecated.use method with WTContainerRef as argument.getOverdueProcesses(WTContainerRef context_ref) Returns all overdue processes in a given WTContainer.getProcessConnectors(WfContainer container) Returns all connectors contained in a given process.getProcesses(WfProcessTemplate template, WfState state) Returns all processes instantianted from a given template that are in a given state.getProcessRoles(WfProcess process) Answer a vector of role objects declared by the process
Supported API: truegetProcessSteps(WfContainer container, WfState state) Returns all instantiated process steps in a given state.getProjectName(WfContainer container) Returns the name of the project associated with the given process.Returns a URL to view associated workflow processes given a business object.getResponsible(WfExecutionObject exec_obj) Returns principal responsible for the execution object.getResponsibleParticipants(WfExecutionObject exec_obj) Returns an Enumeration of principal references who are responsible for the execution object.getTeamName(WfContainer container) Returns the name of the team associated with the given process.getWfFolder(String folder_path, WTObject pbo, WTContainerRef context_ref) Gets folder given its relative path, associated business object and the context.startProcess(WfProcess process, ProcessData input, long priority) Starts a process with given input data and priority.startProcess(WfProcess process, ProcessData input, long priority, Timestamp start_time, Timestamp deadline) Start a process given, in addition to the input data, absolute start time and deadline.startProcessImmediate(WfProcess process, ProcessData input, long priority) Starts a process with given input data and priority without creation of new thread or queue entries.voidterminateObjectsRunningWorkflows(WTCollection collection) if terminateObjectsRunningWorkflows=true, terminate all the objects running processes.voidif terminateObjectsRunningWorkflows=true, terminate all the objects running processes.
-
Method Details
-
startProcess
Starts a process with given input data and priority. Returns started process.
Supported API: true- Parameters:
process-input-priority-- Returns:
- WfProcess
- Throws:
WTException
-
getProcesses
Returns all processes instantianted from a given template that are in a given state. For example, one can ask for all CLOSED processes (irrespective of its substates). If state is null all processes are returned irrespective of their states.
Supported API: true- Parameters:
template-state-- Returns:
- Enumeration
- Throws:
WTException
-
getProcessSteps
Returns all instantiated process steps in a given state. If state is null all steps are returned irrespective of their states.
Supported API: true- Parameters:
container-state-- Returns:
- Enumeration
- Throws:
WTException
-
getProcessConnectors
Returns all connectors contained in a given process.
Supported API: true- Parameters:
container-- Returns:
- Enumeration
- Throws:
WTException
-
getProcessRoles
Answer a vector of role objects declared by the process
Supported API: true- Parameters:
process-- Returns:
- Vector
- Throws:
WTException
-
changeState
WfExecutionObject changeState(WfExecutionObject exec_object, WfTransition transition) throws WTException Changes the state of a process or activity. Throws exception if transition is not allowed (for example, trying to stop a closed object).
Supported API: true- Parameters:
exec_object-transition-- Returns:
- WfExecutionObject
- Throws:
WTException
-
getHistory
Returns a list of all events associated with a given execution object of a given type. It the type is "null" returns of events associated with the object.
Supported API: true- Parameters:
obj-eventType-- Returns:
- Enumeration
- Throws:
WTException
-
deleteClosedProcesses
Delete all closed processes that meet the search condition passed as argument. Deletes all closed processes if the search condition is "null".
Supported API: true- Parameters:
condition-- Throws:
WTException
-
getOverdueProcesses
Deprecated.use method with WTContainerRef as argument.Returns all overdue processes. An overdue process is one that its deadline has passed.
Supported API: true- Returns:
- Enumeration
- Throws:
WTException
-
getOverdueActivities
Returns all overdue activities contained in a given process. An overdue activity is one that its deadline has passed.
Supported API: true- Parameters:
process-- Returns:
- Enumeration
- Throws:
WTException
-
complete
Completes activity and generates events. This method is used to provoke a change of state (transition = COMPLETE) and, at the same time, pass a Vector containing selected user events. If the activity is a manual router (routerType= MANUAL) the event is used to trigger the appropriate successor links; otherwise it is ignored.
Supported API: true- Parameters:
activity-selected_events-- Returns:
- WfActivity
- Throws:
WTException
-
getProjectName
Returns the name of the project associated with the given process. If there is none (as it can be the case of robot activities) or the role holder object doesn't have a name then the method returns 'null'.
Supported API: true- Parameters:
container-- Returns:
- String
- Throws:
WTException
-
createProcess
Deprecated.use method with WTContainerRefCreates and returns a process from the given template and associated team specification. If name is null the process name is the same as the template.A team specification can be one of the following:
RoleHolder(deprecated)wt.team.TeamRefwt.team.TeamTeamplateRefLifeCycleManaged</u/>Import Note: The process will be created in the same
WTContaineras the team spec passed as argument, except in the case the team spec is awt.team.TeamTeamplateRef, in which case the process is created in the classic container. There is a similar method with the same name that accepts an additional argument that is a reference to the container where the process is to be created.
Supported API: true
- Parameters:
template-team_spec-- Returns:
- WfProcess
- Throws:
WTException
-
getHistory
Returns a list of all events of a given type associated with execution objects. It the type is "null" returns of events associated with the object.
Supported API: true- Parameters:
eventType-- Returns:
- Enumeration
- Throws:
WTException
-
changeEventConfiguration
Changes the process' event configuration to the one passed as argument. All activities' configurations are changed as well.
Supported API: true- Parameters:
process-evt_cfg-- Throws:
WTException
-
deleteProcess
Deletes process passed as argument.
Supported API: true- Parameters:
process-- Throws:
WTException
-
startProcessImmediate
WfProcess startProcessImmediate(WfProcess process, ProcessData input, long priority) throws WTException Starts a process with given input data and priority without creation of new thread or queue entries. Returns started process.
Supported API: true- Parameters:
process-input-priority-- Returns:
- WfProcess
- Throws:
WTException
-
createStartAdHocProcess
WfContainer createStartAdHocProcess(WfAdHocActivity requester, WfContainerTemplate template) throws WTException Creates and starts an adh hoc process given the ad hoc activity and the template from which the process should be instantiated. The template can be either a process or a block template. Returns the running process.
Supported API: true- Parameters:
requester-template-- Returns:
- WfContainer
- Throws:
WTException
-
startProcess
WfProcess startProcess(WfProcess process, ProcessData input, long priority, Timestamp start_time, Timestamp deadline) throws WTException Start a process given, in addition to the input data, absolute start time and deadline. The values provided (if not null) supersede the default values calculated using the process template. If any of the values is null then the corresponding default value is used.
Supported API: true- Parameters:
process-input-priority-start_time-deadline-- Returns:
- WfProcess
- Throws:
WTException
-
getResponsible
Returns principal responsible for the execution object. First tries to resolve responsibleRole; if this is null, gets the responsible for the host process. Failing these, it returns the principal of the process creator. If more than one principal is resolved for the responsibleRole, it returns the first role.
Supported API: true- Parameters:
exec_obj-- Returns:
- WTPrincipal
- Throws:
WTException
-
getAssociatedProcesses
Deprecated.use method with WTContainerRef argument.Returns all process instances associated with the object passed as argument that are in a given state. If state is null, all process instances are returned, irrespective of the state.
Supported API: true- Parameters:
object-state-- Returns:
- Enumeration
- Throws:
WTException
-
createAdHocProcess
Deprecated.use method with WTContainerRefCreates a process given a template object that can be a process template, a block template or an activity template. If it is a process template, the createProcess method is called; if it is an activity template, a block template is generated and the process generated from it; finally, if it is a block template, the process is generated directly from the block template.In case it is an activity template, the block template generated has the same name as the activity template as well as variables. The mapping between the block templates and activity templates is a 1-1 mapping based on the variable names. This has the effect that the block template is completely transparent during execution time.
A team specification can be one of the following:
RoleHolder(deprecated)wt.team.TeamRefwt.team.TeamTeamplateRefLifeCycleManaged</u/>Import Note: The process will be created in the same
WTContaineras the team spec passed as argument, except in the case the team spec is awt.team.TeamTeamplateRef, in which case the process is created in the classic container. There is a similar method with the same name that accepts an additional argument that is a reference to the container where the process is to be created.
Supported API: true
- Parameters:
template-team_spec-- Returns:
- WfProcess
- Throws:
WTException
-
getRelatedProcessesURL
Returns a URL to view associated workflow processes given a business object.
Supported API: true- Parameters:
obj-- Returns:
- URL
- Throws:
WTException
-
getResponsibleParticipants
Returns an Enumeration of principal references who are responsible for the execution object. First tries to resolve responsibleRole; if this is null, gets the principal references responsible for the host process. Failing these, it returns the principal reference for the process creator.
Supported API: true- Parameters:
exec_obj-- Returns:
- Enumeration
- Throws:
WTException
-
terminateObjectsRunningWorkflows
if terminateObjectsRunningWorkflows=true, terminate all the objects running processes.
Supported API: true- Parameters:
object- The object for which you wish to terminate the objects running workflows.- Throws:
WTException
-
terminateObjectsRunningWorkflows
if terminateObjectsRunningWorkflows=true, terminate all the objects running processes.
Supported API: true- Parameters:
collection- The collection of objects for which you wish to terminate the running workflows.- Throws:
WTException
-
createProcess
WfProcess createProcess(WfProcessDefinition template, Object team_spec, WTContainerRef context_ref) throws WTException Creates and returns a process from the given template, associated team specification and a reference to the context (@link wt.inf.container.WTContainerRef} where the process is to be created. If name is null the process name is the same as the template.A team specification can be one of the following:
RoleHolder(deprecated)TeamReferenceTeamTemplateReferenceLifeCycleManaged</u/> NOTE: TeamReference and TeamTemplateReference can be accessed using supported APIs from TeamManaged and TeamService
Supported API: true
- Parameters:
template- Object of wt.workflow.definer.WfProcessDefinitionteam_spec- Object of any one of the above mentioned typescontext_ref- Object of wt.inf.container.WTContainerRef- Returns:
- WfProcess - Object of wt.workflow.engine.WfProcess
- Throws:
WTException
-
createAdHocProcess
WfProcess createAdHocProcess(WfTemplateObject template, Object team_spec, WTContainerRef context_ref) throws WTException Creates a process given a template object that can be a process template, a block template or an activity template. If it is a process template, the createProcess method is called; if it is an activity template, a block template is generated and the process generated from it; finally, if it is a block template, the process is generated directly from the block template.In case it is an activity template, the block template generated has the same name as the activity template as well as variables. The mapping between the block templates and activity templates is a 1-1 mapping based on the variable names. This has the effect that the block template is completely transparent during execution time.
Supported API: true- Parameters:
template-team_spec-context_ref-- Returns:
- WfProcess
- Throws:
WTException
-
getTeamName
Returns the name of the team associated with the given process. If there is none (as it can be the case of robot activities) then the method returns 'null'.
Supported API: true- Parameters:
container-- Returns:
- String
- Throws:
WTException
-
getAssociatedProcesses
QueryResult getAssociatedProcesses(Persistable object, WfState state, WTContainerRef context_ref) throws WTException Returns all process instances associated with the object passed as argument that are in a given state in the passed WTContainer. If state is null, all process instances are returned, irrespective of the state.
Supported API: true- Parameters:
object-state-context_ref-- Returns:
- QueryResult
- Throws:
WTException
-
getOverdueProcesses
Returns all overdue processes in a given WTContainer. An overdue process is one that its deadline has passed.
Supported API: true- Parameters:
context_ref-- Returns:
- QueryResult
- Throws:
WTException
-
getWfFolder
Gets folder given its relative path, associated business object and the context. If folder doesn't exit it is created. The business object may be null but assumes context reference is not null.Creates workflow folder for a given context. The folder path is also passed as argument. Assumes folder_path of the form:
/System/Workflows/<folder-name>
where forder-name is one of {"NotStarted", "Running", ...}The folder is created as <default-cabinet>/System/Workflows/<folder-name>, where
is the context's default cabinet.
Supported API: true- Parameters:
folder_path-pbo-context_ref-- Returns:
- Folder
- Throws:
WTException
-
getAssociatedProcessesMap
Supported API: true- Parameters:
col-state-- Returns:
- WTKeyedMap
- Throws:
WTException
-