Package com.orchestranetworks.workflow
Class ProcessLauncher
java.lang.Object
com.orchestranetworks.workflow.ProcessLauncher
Prepares and launches a workflow instance.
A ProcessLauncher is created using
WorkflowEngine.getProcessLauncher(PublishedProcessKey)
-
Method Summary
Modifier and TypeMethodDescriptionReturns the default value of the specified input parameter as defined in the workflow definition.getInputParameterString
(String aName) Returns the value of the specified input parameter.Returns the publication identifier associated to the workflow launcher.boolean
isDefinedAsInputParameter
(String aName) Returns whether a specified variable name is defined in the data context as an input parameter.boolean
Indicates whether the sub-workflow is considered has a foreground sub-workflow.Starts a new workflow instance.Starts a new workflow instance.void
setCreator
(UserReference creator) Specifies the creator of the new workflow instance to be launched.void
setDescription
(UserMessage description) Specifies the description of the new workflow instance to be launched.void
setInputParameter
(String aName, String aValue) Initializes an input variable of the data context of the new workflow instance to be launched.void
setLabel
(UserMessage label) Specifies the label of the new workflow instance to be launched.void
setPriority
(Integer priority) Specifies the priority of the new workflow instance to be launched.
-
Method Details
-
getPublishedProcessKey
Returns the publication identifier associated to the workflow launcher.- Since:
- 5.7.1-fixN
-
setLabel
Specifies the label of the new workflow instance to be launched. If this method is not used, the label of the workflow publication will be used instead. -
setDescription
Specifies the description of the new workflow instance to be launched. If this method is not used, the description of the workflow publication will be used instead. -
setCreator
Specifies the creator of the new workflow instance to be launched. -
setPriority
Specifies the priority of the new workflow instance to be launched. Default priority isnull
. -
isForegroundSubworkflow
public boolean isForegroundSubworkflow()Indicates whether the sub-workflow is considered has a foreground sub-workflow.- Since:
- 6.0.0
-
setInputParameter
Initializes an input variable of the data context of the new workflow instance to be launched.- Parameters:
aName
- name of a data context variable. This name must match an input variable of the data context of the workflow model or else an exception will be thrown at the workflow launch.- See Also:
-
getInputParameterString
Returns the value of the specified input parameter. -
getInputParameterDefaultString
Returns the default value of the specified input parameter as defined in the workflow definition. -
isDefinedAsInputParameter
Returns whether a specified variable name is defined in the data context as an input parameter.- Parameters:
aName
- name of a data context variable.- Since:
- 6.0.0
- See Also:
-
launchProcess
Starts a new workflow instance. This method can be called several times. A new workflow instance will be created every time.The permissions will be checked if and only if the EBX® property ebx.manager.workflow.launcher.checkPermission.activated is set to true.
- Throws:
IllegalArgumentException
- if a specified input parameter name is not declared in the workflow definition's data context, or the corresponding variable is not declared as being an input parameter.IllegalStateException
- if this method is called to launch a sub-workflow. UseSubWorkflowsCreationContext.launchSubWorkflows()
instead.OperationException
-
launchProcessWithResult
Starts a new workflow instance. This method can be called several times. A new workflow instance will be created every time.This method is equivalent to
launchProcess()
but returns aProcessLauncherResult
. This allows the caller to retrieve the key of the created workflow instance and, if the synchronous mode is enabled ("automatically opens the first step"), the first created work item.The permissions will be checked if and only if the EBX® property ebx.manager.workflow.launcher.checkPermission.activated is set to true.
- Throws:
IllegalArgumentException
- if a specified input parameter name is not declared in the workflow definition's data context, or the corresponding variable is not declared as being an input parameter.IllegalStateException
- if this method is called to launch a sub-workflow. UseSubWorkflowsCreationContext.launchSubWorkflows()
instead.OperationException
- Since:
- 5.5.1
- See Also:
-