Changing the context of a subprocess
You can change the scope of a subprocess that you call from a flow. By running a subprocess in the context of a specific class or case, you can use properties, rules, and other functionality in your application that you cannot access from the parent flow.
In the navigation pane of App Studio, click Case types, and then click the case type that you want to open.
On the Workflow tab, click Life cycle.
Click the process that contains the subprocess step.
Click Open process.
On the Diagram tab of the Flow form, double-click the Subprocess shape to open the property panel.
To allow the parent flow to continue processing without waiting for this subprocess to return, select the Spinoff flow check box.
Choose a context for the subprocess.
- To work on the current case, from the Define flow list, select On current page.
- To work on a specific case, from the Define flow list,
select On specific work item. Complete the Work
property, Class , and Page
If the case is open as a page on the clipboard, you can leave the Work property field blank.
If the case does not already have a page and you do not provide a page name, you application creates a page named
pyNextObj_1, and so on.
- To work on an embedded page, from the Define flow list,
select On embedded page. Complete the Page
property and Class field names.
The Page property field must use a mode of
Page List, or
If you want to use a class that is not known at design time, in the Class field, you must enter a property reference or expression.
Click Submit to close the property panel.
- Calling one process from another process
You can add a subprocess to a process in a stage to call an existing flow in your application. By using subprocesses, you can compartmentalize functionality and simplify the presentation of a process in a case type.
A subprocess, also called a subflow, is a flow that is called by another flow. You can create a subprocess by adding a step to a process in the life cycle of a case or by adding specific shapes to a flow diagram. Subprocesses modularize the events in the life cycle of a case.