public final class ProcessLauncher extends Object
WorkflowEngine.getProcessLauncher(PublishedProcessKey)
Modifier and Type | Method and Description |
---|---|
String |
getInputParameterDefaultString(String aName)
Returns the default value of the specified input parameter as defined in the workflow definition.
|
String |
getInputParameterString(String aName)
Returns the value of the specified input parameter.
|
PublishedProcessKey |
getPublishedProcessKey()
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 |
isForegroundSubworkflow()
Indicates whether the sub-workflow is considered has a foreground sub-workflow.
|
ProcessInstanceKey |
launchProcess()
Starts a new workflow instance.
|
ProcessLauncherResult |
launchProcessWithResult()
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.
|
public PublishedProcessKey getPublishedProcessKey()
public void setLabel(UserMessage label)
public void setDescription(UserMessage description)
public void setCreator(UserReference creator)
public void setPriority(Integer priority)
null
.public boolean isForegroundSubworkflow()
public void setInputParameter(String aName, String aValue)
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.launchProcess()
,
launchProcessWithResult()
public String getInputParameterString(String aName)
public String getInputParameterDefaultString(String aName)
public boolean isDefinedAsInputParameter(String aName)
aName
- name of a data context variable.getInputParameterString(String)
,
getInputParameterDefaultString(String)
public ProcessInstanceKey launchProcess() throws OperationException
The permissions will be checked if and only if the EBX® property ebx.manager.workflow.launcher.checkPermission.activated is set to true.
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.
Use SubWorkflowsCreationContext.launchSubWorkflows()
instead.OperationException
public ProcessLauncherResult launchProcessWithResult() throws OperationException
This method is equivalent to launchProcess()
but returns a
ProcessLauncherResult
. 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.
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.
Use SubWorkflowsCreationContext.launchSubWorkflows()
instead.OperationException
ProcessLauncherResult