When a workflow is initiated by another existing workflow, the existing one pauses as the sub-workflow begins to run. Upon finishing the sub-workflow, it is then terminated while the first workflow resumes and becomes active again.
However, if the sub-workflow happens to be the root workflow, it cannot be terminated.
Identifier: finish_workflow
Minimal
<finish_workflow id="finish_without_error"/>
All options
<finish_workflow id="finish_without_error" delay="500" sound_feedback_enabled="false">
<output>
<param name="error" type="bool">false</param>
</output>
</finish_workflow>
Starts a transition from one step in a workflow to another step in the same workflow, if it exists.
Identifier: step_transition
Minimal
<step_transition id="start_login" to="login"/>
All options
<step_transition id="start_login" to="login" delay="2000" sound_feedback_enabled="false">
<output>
<param name="timeout_ms" type="long">5000</param>
<param name="skip_scan" type="bool">1</param>
<param name="area">#{location}</param>
<param name="domain">#{client.USER_DOMAIN}</param>
</output>
</step_transition>
Starts a sub-workflow while putting your current workflow on pause. Once the sub-workflow finishes, the initial workflow becomes active again.
Usable within components by combining it with start_task_from_template.
Identifier: start_workflow
Minimal
<start_workflow id="start_login" wf="login"/>
All options
<start_workflow id="start_login" wf="login" start_step="login_area" delay="2000" sound_feedback_enabled="false" stop_current_workflow="true">
<output>
<param name="skip_scan" type="bool">1</param>
<param name="area">#{location}</param>
</output>
</start_workflow>
Creates a new task based on a template you create for your workflow.
Identifier: start_task_from_template
This action can be used to start a sub-workflow from the current workflow. Try creating a new task based on a template you created for the sub-workflow in the Frontline Command Center:
<action id="start_task_from_template" type="start_task_from_template">
<param name="wf">Templatename</param>
<param name="cancel_ongoing" type="bool">false</param>
<param name="close_ongoing" type="bool">false</param>
</action>
The action will then give an event with the command "FOUND" or "NOT_FOUND" depending on whether the template name can be found on the server. Both cases need to be handled accordingly:
<rule id="template_not_found">
<expression><![CDATA[ #{event(start_task_from_template):command} == 'NOT_FOUND' ]]> </expression>
<actions>
<action ref="finish_workflow_failed" />
</actions>
</rule>
If the template could be found the action will set a step context variable workflow containing the URI to pass to the start_workflow action.
<rule id="template_found">
<expression><![CDATA[ #{event(start_task_from_template):command} == 'FOUND' ]]> </expression>
<actions>
<action id="startworkflow" type="start_workflow">
<param name="wf">#{workflow}</param>
</action>
</actions>
</rule>
Pauses a task and returns the user to the task list. The task state is not lost and can be finished later.
Identifier: pause_task
Minimal
<pause_task id="pause"/>