Transitions

Modified on Tue, 12 Nov at 3:40 PM

Transitions

Finish Workflow

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

Attributes

  • delay: Set a delay for the transition until it is triggered. The delay is in milliseconds.
    • Required: No
    • Default value: -1
  • sound_feedback_enabled: By default, a transition triggers a sound to signal the user. This can be disabled by setting this attribute to false.
    • Required: No
    • Default value: True

Elements

  • output: Passes parameters to the target step, which calls the workflow.
    • Required: No
    • Default value: Empty list

Examples

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>

Step Transition

Starts a transition from one step in a workflow to another step in the same workflow, if it exists.

Identifier: step_transition

Attributes

  • to:Name of the step in the same workflow that should be started.
    • Required: Yes
    • Default value: None
  • delay:Set a delay for the transition until it is triggered. Delay is in milliseconds.
    • Required: No
    • Default value: -1
  • sound_feedback_enabled: By default, a transition triggers a sound to signal the user. This can be disabled by setting this attribute to false.

Elements

  • output:Passing parameters to the target step
    • Required: No
    • Default value: Empty list

Examples

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>

Start Workflow

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

Attributes

  • wf: ID of the sub-workflow that will be started
    • Required: Yes
    • Default Value: Empty
  • start_step: This allows the user to overwrite the defined start step of the sub-workflow.
    • Required: No
    • Default Value: Empty
  • stop_current_workflow: If the current workflow is not the root workflow and the value is set to true. Then the calling workflow will be stopped.
    • Required: No
    • Default Value: False
  • delay: Set a delay for the transition until it is triggered. The delay is in milliseconds.
    • Required: No
    • Default Value: -1
  • sound_feedback_enabled: By default, a transition triggers a sound to signal the user. This can be disabled by setting this attribute to false.
    • Required: No
    • Default Value: True

Elements

  • output: Passes parameters to the start step of the calling sub-workflow.
    • Required: Yes
    • Default Value: Empty list

Examples

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>

Start Task from Template

Creates a new task based on a template you create for your workflow.

Identifier: start_task_from_template

Elements

  • wf:The name of the template you created for the workflow.
    • Required: Yes
    • Default Value: Empty
  • close_ongoing:Decides whether the ongoing task should be set to "Done".
    • Required: No
    • Default Value: False
  • cancel_ongoing:Decides whether the ongoing task should be set to "Cancelled".
    • Required: No
    • Default Value: False

Examples

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>

Pause Task

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

Example

Minimal

<pause_task id="pause"/>

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article