Using the Fork element in a Workflow, you can create new Tasks by using the attributes of the current Task. Making it the Parent Task for the newly created Tasks. This way you can visualise relations of separate workflows in a single diagram so that you will have better workflow management.
You can use the same workflow or different workflows while Forking a Task. This ability allows you to trigger different flows of a process for related Tasks and Run multiple flows in parallel. With this ability you can design simpler Workflows, without complicating your main flow, focusing on the task at hand. You can also consider forking for reflecting a change or additional process to your workflow. It lets you set new options without disrupting the well-established workflow in use.
The forking object has 2 fields. The first variable is the workflow SID, which is the workflow for the Task to be created. And the second, optional, variable is timeout. It is the same parameter that can be provided while creating a usual Task, designating the maximum life-cycle of a Task in minutes. Each fork acts as a new path for a different workflow that works in parallel with the current diagram. Thus enhancing workflow management.
If a Task is forked from another Task, you can reach the parent Task SID in the “forked_from” field of that Task. In a necessary scenario, you can use this information for accessing the Parent Task and updating its attributes with new information or an awaited result as well.