You are here: Reference > Rule types > Flows > Flow form - Process Modeler - Editing the Split For Each shape

 

  Flow form
Process Modeler — Editing a Split For Each shape

About Flows
  1. About 
  2. New 
  3. Diagram 
  4. Parameters 
  5. Pages & Classes 
  6. Design 
  1. Process 
  2. Specifications 
  3. Requirements 
  4. Test Cases 
  5. History 
  6. More... 

The Split For Each shape provides a form of searching or enumeration over the pages in a property.

Purpose

Use a Split For Each shape to iterate over the pages of a Page List or Page Group property. For each page, you can conditionally start a flow execution for the work item.

Processing in the original flow pauses while the subprocesses execute. Processing in the original flow can resume after all the subprocesses complete, after some complete, or after the any one of them completes. For an example, see the standard flow Work-.StandardApprovalsAll or similar "approvals" flows.

indicates that one or more tickets are defined on the Split For Each shape. Assigned ticket names appear beside this icon on the flow.

Note: At runtime, this shape processes the work item's embedded Page List or Page Group properties; the embedded pages must exist before the Split For Each shape is reached.

Adding a Split For Each shape to the flow

On the flow diagram, you can add a shape to a flow in one of three ways. Validation of the added shapes occurs when you save the flow.

Use the canvas context menu:

  1. Right-click a blank area of the canvas near the location where you would like the Split For Each shape to appear.
  2. Hover over Add on the submenu to display a list of shapes you can add to the flow.
  3. Click the Split For Each shape. After the shape has been added to the canvas, click and drag to reposition.

Use the toolbar Flow Shape palette:

  1. Click the Flow Shape palette on the toolbar to display a drop-down shapes menu that will remain open until you close it, facilitating the process of rapidly adding multiple shapes. Click the window title bar and drag the submenu to another area of the screen, as needed.
  2. Click and drag the Split For Each shape to the canvas.
  3. Close the Flow Shape palette at any time.

Use the Flow Shape palette drop-down menu:

  1. Click the down arrow on the toolbar Flow Shape palette to display a drop-down shapes menu.
  2. Click and drag the Split For Each shape from the drop-down menu to the desired position on the canvas.

Editing Split For Each shape properties

1. On the flow Diagram tab, open the properties panel using one of the following:

2. When the Properties panel appears, enter a name, no longer than 128 characters, to the right of the shape title (Split For Each: [Split For Each]). Choose a name meaningful to application users who see this on the work item history display, the breadcrumbs control (for entry points), and the Where-Am-I? diagram. The system automatically enters the name in the Specification section. The shape name is only descriptive; it does not affect runtime execution.

Note: This name also appears inside the Split for Each shape on the diagram. You can edit the name by double clicking the shape's label on the diagram. To change the name after you have exited from the properties panel, click the name, and type over the highlighted text.

3. Complete the fields as described in the tables below. (To edit the shape properties after you save the Flow form, open the Diagram tab, right-click the shape, and select Properties.)

4. Click OK to save edits and close the panel.

5. Click and drag the shape as needed to position it in the flow.

6. Connect an incoming connector to the Split For Each shape.

7. Connect an outgoing connector from the Split For Each shape.

Deleting a Split For Each shape from the flow

A Split For Each shape may be deleted from the process flow. Right-click the Split For Each, and select Delete from the drop-down menu.

You can also select the Split For Each and do one of the following:

Note: When a shape is deleted, the connectors remain on the canvas.

Cut, copy, and paste Split For Each shapes

Cut or copy shapes from a flow and paste them within the same flow or in other flows within your user session.

Details

Complete the Details section to select the join type, process flow type, when condition rule, and the process flow to use at runtime.

Field

Description

Join

Select Any, All, Iterate or Some. Choose:

  • Any to cause processing in this flow execution to resume after any one of the split subprocesses completes. At that time, processing of the other split subprocesses — which have not completed — stops. Open assignments for these subprocesses are cancelled. (If you choose Any and at runtime one flow execution ends before some others are started, the others are not started.)
  • All if the current flow is to resume only when all the split flows complete and return.
  • Some if multiple subprocesses are spawned and the flow is to resume when some of the split flows reach a specified status.
  • Iterate to spawn flows for elements of the Page Group or Page List property one-by-one, testing conditions you list below to determine whether to continue.

Caution: If you choose Iterate, execution of the subprocesses must not alter the index values in the Page Property value, to prevent unreliable results. For example, if an activity in the subprocess started for the fifth element of a Page List deletes the first element of the Page List, the original sixth element (now fifth) may be unintentionally skipped.

When you choose Iterate, the Exit Iteration When and Subprocess has Entry Points fields appear at the bottom of the properties panel.

When used in a screen flow, there is no Join option in a Split For Each shape. The only processing mode is Iterate. The conditions When and Abort Iterations are not available. A Page Group property used in a screen flow Split For Each shape is processed in an indeterminate order and all pages are shown. Therefore, Page Group-specific iteration settings are not available; that is, you cannot determine a different order as you can in a regular flow.

Page Property

Identify the property of mode Page List or Page Group that is the basis of the split.

Class

Identify the class of the embedded pages. Usually, this value does not usually need to be altered as the class appears when you enter Page Property.

Filter Flow Rule By

Select Process Flow or Screen Flow as the category of the destination subprocess to be started.

Flow Rule

Select a flow (the second key part) for the Foreach over an embedded page list. At runtime, the system uses the value in the Class field to find the flow.

When

Optional. Select a when condition rule. The system uses the class of the embedded page as the Applies To key part of the when condition rule. At runtime, it evaluates this when condition rule once for each page of the property in the Page Property field, and a starts a subprocess for any page for which this rule evaluates to True. (For Iterate, additional tests are applicable.)

For example, you can use this field to start subprocesses only for subscript values "OH" and "VA" of a Page Group property that uses state codes as subscripts.

Parameters

The Flow Rule you select may accept input parameters that will appear in the box below. Supply a value for each parameter. Parameter values are validated when you save the flow, unless the flow in is Draft mode.

Exit Iteration When

This field appears only when you select Iterate in the Join field. Select a when condition rule. The system uses the class of the parent flow as the Applies To key part of the when condition rule.

If this field is not blank, at runtime the system evaluates this when condition rule once for each page of the property in the Page Property field. If false, no additional flow executions are started and the flow is resumed.

For example, you can use this field to exit when a top-level work item property was set to 6 or less, where the subprocess executions contain assignments recording committee member votes, and 6 yes votes count as a majority.

Exit Iteration

This field appears only when you select Some in the Join field. Select On Count or On When to create the condition which causes processing in the original flow to resume.

On Count - Enter the number of paths that must result in a specific status in order to exit the split and resume processing in the original flow.

On When - Select a when condition rule. The system uses the class of the parent flow as the Applies To key part of the when condition rule.

If this field is not blank, at runtime the system evaluates this when condition upon completion of spawned processes. If true, the Split For Each iteration is exited and flow processing continues. If false, the Split For Each continues to wait for remaining spawned processes to be completed.

For example, you can use this field to exit subprocesses only when a top-level work item property was set to 6 or less, where the subprocess executions contain assignments recording committee member votes, and 6 yes votes count as a majority.

At least...
path(s)
Enter the minimum number of paths that must result in a specific status to exit the split and resume processing in the original flow. For example, if a given number of users choose a specific flow action that results in a specified flow status, then processing in the original flow resumes.
Result with flow statusIdentify the status that some flows must reach in order to exit the split and resume processing in the original flow.
ApplicationOptional. Select the name of the application that you want to link to the shape.
Work TypeOptional. Select the name of the work type for the application that you want to link to the shape.
Audit Note

Optional. Text you enter here appears in the history of the work item, recording the subprocess started by this Split For Each shape. (If you selected Iterate for the Join field, the history is written for each iteration over the work item, even if subprocesses were started only for some.)

Note: When you plan to localize the application, choose the text carefully and limit text length to 64 characters. A field value rule with this text as the final key part is needed for each locale. When practical, choose a caption already included in a language pack to simplify localization. See About the Localization wizard.

Entry point

Select to indicate that this Split For Each shape is an entry point, which provides a navigation link for that step. The links appear after you complete a step. For example, after you complete Step A and go to Step B, a link appears to Step A. Links are displayed according to the type of harness you use:

  • Links in a Perform harness or a screen flow harness display as a breadcrumb trail.
  • A tree navigation screen flow harness displays tree nodes.
  • A tabbed screen flow harness displays a tab.

If you click a navigation link for the Split For Each shape, you return to the first step (assignment) and the split runs again. You can click the links in the tree and breadcrumb harnesses to return to any step (subprocess) within the flow.

Note: Tabbed and tree harnesses require that Entry Point? be selected.

By default, the box is cleared.

Only going back

Optional. This check box appears only when you select the Entry Point? check box for the Split For Each shape. If selected, users cannot click the Split For Each shape's tab or tree node until they have reached it or passed it. Users cannot jump forward to this step.

If you enable jump-forward in your tabbed or tree harness, then configure the last flow action in the screen flow to provide comprehensive validation, in case steps were skipped.

For maximum user flexibility, leave this check box unselected if your flow accepts inputs in any order. However, this approach is typically not workable for flows that contain fork and decision shapes, or that have intermediate shapes that are not entry points.

The setting is applicable only to tabbed and tree screen flows.

By default, the box is cleared.

Post action on click away

This check box appears only when you select the Entry Point check box. Select to run flow action post-processing when you click away from this entry point.

By default, the box is cleared.

Subprocess has entry points

In a regular process flow, this field appears only when you select Iterate in the Join field. Select to allow users to return to the entry points within the Split For Each subprocesses using the breadcrumbs control, or clicking a tree-harness node from a completed subprocess or the standard flow action Work-.Previous.

For example, assume that a Split For Each shape calls a flow containing two assignments ("Review" and "Approve) and the Page List has three entries. The label property is set to .myString and that the values of .myString on each page of the Page List are pg1, pg2, and pg3. Then the breadcrumbs appear as:

pg1 -Review - Approve - pg2 - Review - Approve — pg3 - Review - Approve.

Tabbed nodes and tree harnesses require Subprocess has Entry Points to be selected.

By default, the box is cleared.

Label property

Optional. This field appears only when you click the Subprocess has Entry Points check box. Enter the property for the navigation labels used on subprocess tab headers or tree nodes.

Page group iteration settings

The Page group interaction settings section appears only when you select Iterate in the Join field. Complete the fields to select the subscript order, indicate whether the subscript requires an exact match, and to specify whether to start a subprocess for subscript values not yet selected..

Field

Description

Subscript Order

Optional. Enter the literal text of (or an initial portion of) a subscript value that may be present in the Page Group property at runtime. For example, enter M to match the eight state codes ME, MA, MO, MT, MS, MD, MN, and MI.

At runtime, a subprocess is started, one at a time, for each match of the first row. Then a subprocess is started for each match of the second row, and so on. (This requires repeated scanning of the pages in the group to access subscript values.)

Exact Match

If the Subscript Order field is not blank, click the check box to require an exact match. For example, the value M does not exactly match any state code.

Process remaining pages

If the Page Group Iterations array is not blank, select to indicate that a subprocess is to be started for any subscript value not yet selected (subject to the Abort Iterations when? result.)

For example, if the subscript values correspond to state codes and the array contains the single character M (without exact matching), select this box to create subprocesses for each of the remaining 42 states (in an unspecified order) after creating subprocesses for the eight states that match M.

Specification

Field

Description

Specification

Enter a name to associate a specification with this shape. If you change the default shape name [Split for Each], the system enters the name in this field. You can either:

  • Choose an existing specification by selecting Choose another specification from the Specification Actions menu.
  • Create a new specification by entering a name (or keeping the name entered by the system).

Enter a description in the text area beneath the specification name. When you click OK on the Properties dialog, the system creates or updates the specification. See Working with specifications in Process Modeler and Case Designer.

Advanced

Complete the Status and Tickets sections as described below.

Status

Field

Description

Work status

Enter a work status in this field to set the status for the work item. This allows you to easily change the status at multiple points in the life cycle of a work item without adding a Utility shape to the flow for each status change. Similar to setting work item status using a Utility shape, setting the status invokes the UpdateStatus activity. Any defined tickets dependent on the status are raised, as appropriate. The selected status updates .pyStatusWork when the flow execution reaches this assignment shape.

A status indicator appears on connectors to shapes that change a work item status. For example, if the shape status is set to Pending-External, the connector to that shape displays a small red flag. All transitions connecting to the shape will display the status indicator. Following are the status indicators for the four status prefixes.

New

Open

Pending

Resolved

Tickets

Add a Ticket Name field to indicate the ticket(s) available at runtime. Use the Ticket to mark the starting point for exceptions that may arise at any point in the flow, such as a cancellation. The ticket is a label for a point in a flow, much like a programming "GOTO" destination.

An activity executing anywhere in your entire application can set or raise this ticket by executing the Obj-Set-Tickets method with this ticket name as a parameter. See Ticket help for other ways to raise a ticket.

The scope of a raised ticket includes all flows on the current work item that contain this ticket. If found, processing stops on that flow promptly, and resumes at the ticket point.

The system adds to the split for each shape to indicate one or more tickets are associated with this split for each shape. Assigned ticket names appear beside this icon on the flow.

Field

Description

Ticket Name

add rowOptional. Select one or more tickets that are to be available at runtime from this split for each. Add a row for each ticket. Use SmartPrompt to display all tickets available to flows in this work type.

Creating ticket rules is recommended but not required. You can enter here a name that does not correspond to a ticket rule.

If a shape has more than one ticket associated with it, then processing continues with that task only after all tickets are set.

Example

Processing is connected to a ticket to respond to an exception, error flow or event. For example, if a mortgage application is withdrawn after some, but not all, of the application processing is completed, a mortgage processing flow can:

  • Include a ticket named Withdrawn on a utility shape that computes the fees due for work done so far, and any refund amount
  • Follow the utility shape with another that produces correspondence, to alert all parties working on the mortgage that it was withdrawn
  • Connect to external systems to back out (rollback) changes or void accounting entries as appropriate
Display NameOptional. The Ticket Name appears by default. Enter a name to display other than the ticket name.

Notes

At runtime, the standard function rule AddFlow() is called for each page in the Page List property, and limits this to a maximum of 500 new flows. This limit is imposed to detect and trap possible infinite loops. If required by your applications, you can increase or decrease this limit. See More about Flows.

Up About Flows