Search

Task

Last Updated: May 10, 2022

Articles

Task node allows the users to access and execute another task in the same HyperApp as a child task.

  • Any number of child task nodes can be added in the parent task.
  • Nesting of task nodes is allowed up to 10 levels.
  • When the parent task is executed from the Design Studio, separate entries are created in Execution History for parent task and each individual child task with all the execution details of each node.
  • Iterations are allowed in Task node.
  • We can pass parameters from parent task to child task, but not from child task to parent task.

Task Node enables:

  • Sequential execution of tasks: tasks that need to be run sequentially for a particular business flow will be created using task node and the task nodes connected sequentially to enable sequential execution.
  • Asynchronous execution of tasks: tasks in a business flow that need not run sequentially, as they are not dependent on each other’s completion, will be created using task node and run asynchronously.
  • Reusability: tasks that are commonly used across different processes will be created using task node and the same task node will be reused across processes.

In an IT management HyperApp, requests are received by email. Two processes happen in parallel:

  1. A task is triggered to create a ticket and process the IT request.
  2. An acknowledgement email is sent to the requestor that IT request is received, and agent is looking into it.
The second process is not dependent on the competition of first, so the task for the overall process is designed using Task Node.
  1. Email Browser node to read the email.
  2. Task node to trigger the ticket processing task.
  3. Email Sender node to reply to the email.
When the task is run Asynchronously, step 2 and 3 are performed parallelly, thus saving time. Image description

Properties of Task Node

  1. Navigate to Properties tab and enter Name and Description.
  2. Select the task to be triggered in the Task drop-down. All the Tasks in the HyperApp are listed.

    You can create a new task using Create a task option in the drop-down.

  3. Enable the option Run Asynchronously.
    1. Toggle ON, to execute the task in Asynchronous mode.
      • The node succeeding the task node executes simultaneously along with the child task.
      • The task node turns green immediately as the child task is triggered and the child task runs in the background.
    2. Toggle OFF, to execute the task in Synchronous mode.
      • The task execution is in sequential order.
      • The execution of the node succeeding task node starts only after execution of child task completes.
  4. Enable options Mark run Failure on Node Fail and Continue on Failure? as required.

Image description

Passing Parameters to Task Node

Inputs can be mapped to the child task from the parent task. Do the following,

  1. Click the Image description icon to navigate to the child task in a new window.
  2. Click the Start node of the child task.
  3. Click the add parameters button.
  4. Enter the name of the parameter1. Image description

    Click the add parameter button to add more parameters as required.
    Click the Image description icon to delete a parameter.

  5. Refresh the parent task and click the link connecting the task node to preceding node.
    The parameters provided in the child task are listed here.
  6. Click the parameter tag and click the Element Map button.
  7. Enter the input parameters in the What to get? field and press the Enter key. You can also Map the input parameter from the preceding nodes if required. Image description

Result of Execution in Task Node

After executing the task, the Result of Execution window displays the following tabs:

  • Input: The inputs mapped to the Task node are displayed.
  • Output: The Run ID of the child task is displayed. Use this Run ID to view the execution details of the child task in the Execution History page.
  • Run Info: The information of the run such as Run ID, Sequence Number, and Total Node Execution Time (in seconds) are displayed. Image description

It is preferred not to use Task node in Asynchronous mode while designing Tasks with Iterations and Polling.

Did you find what you were looking for?