Defining Which Sub-Process is Called
The script task
Populate Array is where the logic occurs to set the exact sub-process that will be selected at runtime.
Procedure
-
Double-click on the
Populate Array script task.
-
On the
General tab, set the language in the Script Defined As field to JavaScript.
-
Add the following JavaScript:
if (NeedXRay) {
TestCommentsArr.add(XRayComments);
DeptArr.add("XRAY");
ProcessIdentifierArr.add("XRayAppointment");
}
if (NeedBloodTest) {
TestCommentsArr.add(BloodTestComments);
DeptArr.add("BLOODTEST");
ProcessIdentifierArr.add("BloodTestAppointment");
}
-
Select the call sub-process activity
Book Appointment.
Click the
button by the Sub-process Name field. The Select Process or Process Interface dialog displays.
-
Select
Make Appointments Interface and click OK.
Click the
button by the Runtime Identifier Field
field. The Select Data Field or Formal Parameter
dialog displays.
-
Select
ProcessIdentifierArr. This is the field that holds the list of potential sub-processes to call. Click
OK.
-
In the
Priority field, select
Inherit from Parent process from the drop-down list.
-
Select the
Map To Sub-Process
tab. Map the input fields to the process interface as follows:
-
Map the output from the sub-process as follows:
Copyright © Cloud Software Group, Inc. All rights reserved.