# Tutorial: How to create a workflow with parallel actions that can be launched at the same time

**URL:** <https://discuss.workflowgen.com/t/tutorial-how-to-create-a-workflow-with-parallel-actions-that-can-be-launched-at-the-same-time/399>\
**Category:** Process Design\
**Created:** [February 16, 2016, 8:31am UTC](https://discuss.workflowgen.com/t/tutorial-how-to-create-a-workflow-with-parallel-actions-that-can-be-launched-at-the-same-time/399 "2016-02-16T08:31:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![wfg-admin](https://yyz2.discourse-cdn.com/flex030/user_avatar/discuss.workflowgen.com/wfg-admin/32/714_2.png) [@wfg-admin](https://discuss.workflowgen.com/u/wfg-admin)\
**Post date:** [February 16, 2016, 8:31am UTC](https://discuss.workflowgen.com/t/tutorial-how-to-create-a-workflow-with-parallel-actions-that-can-be-launched-at-the-same-time/399/1 "2016-02-16T08:31:17Z")

</div>

For general information on the COPYDATA and MERGEFORM workflow applications, see [COPYDATA usage](https://discuss.workflowgen.com/t/workflow-application-copydata-usage/486) and [MERGEFORM usage](https://discuss.workflowgen.com/t/workflow-application-mergeform-usage/487) FAQs.

This tutorial applies to WorkflowGen 6.1.4 and later.

**Create the `MERGE_FORM` action**

1. Create an **IT Clearance Application** process.

2. In the process data page, define the following data. This will create one data for each parallel action data parameter saved to a data (OUT) that is shared across actions.

3. Add a new action and select the COPYDATA application. Place it just before the workflow splits into parallel actions, then set the name and description to COPY\_DATA. Save the changes.

4. In the COPY\_DATA action parameters, you must create a parameter for each data that goes IN and OUT of each parallel action. This will allow the action to loop back to self before the synchronization without losing any data.

5. Close the pop-up(s) and delete all three transitions from `DEPT_SUP_APPROVAL`, then add a transition from `DEPT_SUP_APPROVAL` to `COPY_DATA`, and another transition from `COPY_DATA` to each of the parallel actions.

6. Add the following conditions by double-clicking the transitions:

7. In each parallel action, configure the `FORM_DATA` parameter to receive and update the specific data created in step 1 (`FORM_DATA_VALIDATES_ACCOUNTING`, `FORM_DATA_VALIDATES_HR`, and `FORM_DATA_VALIDATES_SALES`).

8. Add a new action and place it after the synchronization bar. Select the **MERGEFORM** application, then set the name and description to `MERGE_FORM`. Save the changes.

9. Configure the `MERGE_FORM` action parameters.

10. Close the pop-up(s), then add a transition from the synchronization bar to `MERGE_DATA`, a transition from `MERGE_DATA` to the end point, and a transition to `CREATES_IT`.

Once the `MERGE_FORM` action is created, continue your workflow design as usual. There is nothing to edit in the other workflow actions.

**Configure the Save as Draft feature on parallel actions**

1. Add a new parameter named `FORM_DRAFT` to each parallel action, then retrieve the value of each `FORM_DRAFT` parameter into the corresponding action’s `FORM_DRAFT` data.

2. For each parallel action, add a loop transition onto itself, then do the following:

i. Double-click on the loop transition of the `VALIDATES_ACCOUNTING` action and add the condition `<FORM_DRAFT_VALIDATES_ACCOUNTING> = "Y"`.

ii. Double-click on the transition from `VALIDATES_ACCOUNTING` to the synchronization bar and add the condition `<FORM_DRAFT_VALIDATES_ACOUNTING> <> "Y"`.

iii. Repeat these two steps for each parallel action with `FORM_DRAFT_VALIDATES_SALES` and `FORM_DRAFT_VALIDATES_HR`.

3. It’s best practice to add an exception management action to system actions that allow a user or administrator to relaunch the action manually instead of cancelling the workflow in case of an error. To do this:

Download the complete process, unzip it, and import the XML file into WorkflowGen to see it in action: [IT\_CLEARANCE\_MERGE.xml.zip](https://app.box.com/s/ch2upaa7l3qbvmsjuwwc8jgew22eiyna)
