For general information on the COPYDATA and MERGEFORM workflow applications, see COPYDATA usage and MERGEFORM usage FAQs.
This tutorial applies to WorkflowGen 6.1.4 and later.
Create the MERGE_FORM
action
-
Create an IT Clearance Application process.
-
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.
-
FORM_DATA_VALIDATES_ACCOUNTING
-
FORM_DATA_VALIDATES_HR
-
FORM_DATA_VALIDATES_SALES
-
FORM_ARCHIVE_VALIDATES_ACCOUNTING
-
FORM_ARCHIVE_VALIDATES_SALES
-
FORM_ARCHIVE_VALIDATES_HR
-
FORM_DRAFT_VALIDATES_ACCOUNTING
-
FORM_DRAFT_VALIDATES_SALES
-
FORM_DRAFT_VALIDATES_HR
-
-
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.
-
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.
Create the following parameters in the COPY_DATA action:
Parameter Type Direction Send/retrieve value FORM_DATA1
File INOUT Send value of FORM_DATA
Retrieve value intoFORM_DATA_VALIDATES_ACCOUNTING
FORM_DATA2
File INOUT Send value of FORM_DATA
Retrieve value intoFORM_DATA_VALIDATES_HR
FORM_DATA3
File INOUT Send value of FORM_DATA
Retrieve value intoFORM_DATA_VALIDATES_SALES
-
Close the pop-up(s) and delete all three transitions from
DEPT_SUP_APPROVAL
, then add a transition fromDEPT_SUP_APPROVAL
toCOPY_DATA
, and another transition fromCOPY_DATA
to each of the parallel actions. -
Add the following conditions by double-clicking the transitions:
i. On the transition from
DEPT_SUP_APPROVAL
toCOPYDATA
, add the condition:<FORM_DRAFT> <> "Y" And <SUP_APPROVAL> = "YES" And (<EMP_ACCOUNTING> = "True" Or <EMP_SALES> = "True" Or <EMP_HR> = "True")
ii. On the transition from
COPYDATA
toVALIDATES_ACCOUNTING
, add the condition:<SUP_APPROVAL> = "YES" And <EMP_ACCOUNTING> = "True" And <FORM_DRAFT> <> "Y"
iii. On the transition from
COPYDATA
toVALIDATES_SALES
, add the condition:<SUP_APPROVAL> = "YES" And <EMP_SALES> = "True" And <FORM_DRAFT> <> "Y"
iv. On the transition from
COPYDATA
toVALIDATES_HR
, add the condition:<SUP_APPROVAL> = "YES" And <EMP_HR> = "True" And <FORM_DRAFT> <> = "Y"
-
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
, andFORM_DATA_VALIDATES_SALES
).Examples of parameters required for the
VALIDATES_ACCOUNTING
action:Parameter Type Direction Send/retrieve value FORM_DATA
File INOUT Send value of FORM_DATA_VALIDATES_ACCOUNTING
Retrieve value intoFORM_DATA_VALIDATES_ACCOUNTING
FORM_ARCHIVE
File INOUT Retrieve value into FORM_ARCHIVE_VALIDATES_ACCOUNTING
FORM_DRAFT
Text OUT Retrieve value into FORM_DRAFT_VALIDATES_ACCOUNTING
-
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.Note: The synchronization is important after the parallel actions because it ensures that all parallel actions are completed and synchronized before the merge takes place.
-
Configure the
MERGE_FORM
action parameters.To merge the form data:
i. The
FORM_DATA
parameter is the merge target. Send the originalFORM_DATA
and retrieve the value into the sameFORM_DATA
data.ii. Select
FORM_DATA_SOURCE1
and send the value ofFORM_DATA_VALIDATES_ACCOUNTING
.iii. Add
FORM_DATA_SOURCE2
andFORM_DATA_SOURCE3
for the two remaining parallel actions, and send the value of their respectiveFORM_DATA
files.iv. Select
FORM_FIELDS_MERGE1
and send the text valueACCOUNT_*
. This will merge all fields whose names start withACCOUNT_
.v. Add
FORM_FIELDS_MERGE2
andFORM_FIELDS_MERGE3
, and send the text value to match the parameters to merge.To merge the form archive:
i. Add a
FORM_ARCHIVE
parameter that will act as the merge target.ii. Send the value of the original
FORM_ARCHIVE
and retrieve the value into the sameFORM_ARCHIVE
data.iii. Add a
FORM_ARCHIVE_SOURCE1
parameter and send the value ofFORM_ARCHIVE_VALIDATES_ACCOUNTING
.iv. Add
FORM_ARCHIVE_SOURCE2
andFORM_ARCHIVE_SOURCE3
for the two remaining parallel actions, and send the value of their respectiveFORM_ARCHIVE
files.v. Add a
FORM_FIELDS_ARCHIVE1
parameter and send the text valueACCOUNT
. This will merge the section whose ID is equal toACCOUNT
.vi. Add
FORM_FIELDS_MERGE2
andFORM_FIELDS_MERGE3
, and send the text values that match the IDs of the fields to merge. -
Close the pop-up(s), then add a transition from the synchronization bar to
MERGE_DATA
, a transition fromMERGE_DATA
to the end point, and a transition toCREATES_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
-
Add a new parameter named
FORM_DRAFT
to each parallel action, then retrieve the value of eachFORM_DRAFT
parameter into the corresponding action’sFORM_DRAFT
data.For example, the
FORM_DRAFT
parameter in theVALIDATES_ACCOUNTING
action will retrieve the value in theFORM_DRAFT_VALIDATES_ACCOUNTING
data, theFORM_DRAFT
parameter in theVALIDATES_SALES
action will retrieve the value in theFORM_DRAFT_VALIDATES_SALES
data, and so on. -
For each parallel action, add a loop transition onto itself, then do the following:
-
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:
i. Add a manual action named
COPY_DATA_EXCEPTION
close to theCOPY_DATA
action and add transitions in both directions, fromCOPY_DATA
toCOPY_DATA_EXCEPTION
and vice-versa.ii. Double-click the transition that goes from
COPY_DATA
toCOPY_DATA_EXCEPTION
, then click the Exception tab. Select Execution error, save, and close the pop-up.iii. Add a manual action named
MERGE_FORM_EXCEPTION
close to theMERGE_FORM
action and add transitions in both directions, fromMERGE_FORM
toMERGE_FORM_EXCEPTION
and vice-versa.iv. Double-click the transition that goes from
MERGE_FORM
toMERGE_FORM_EXCEPTION
and click the Exception tab. Select Execution error, save, and close the pop-up.
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
.
Download the complete process, unzip it, and import the XML file into WorkflowGen to see it in action: IT_CLEARANCE_MERGE.xml.zip