Configuring the processing details for a flow action

Define the actions that occur before and after a flow action is processed.

  1. Open a flow action and click the Action tab.
  2. To configure the actions that occur before the user submits an action form, in the Pre-processing section, complete the following steps:
    For preprocessing, the system first applies a data transform, then runs an activity, and then runs an automation.
    1. In the Apply data transform field, specify a data transform that the system applies to the current primary page at run time.
      You can specify an existing data transform or create a new data transform by clicking Open.
      Note: If this flow action has the highest likelihood at run time, the form for this flow action appears as the default form when your application displays a Perform user form, and the data transform also runs. Consider the consequences if the user then selects a different flow action.
    2. If the data transform has parameters, in the Parameters section, enter values for the parameters.
    3. In the Run activity field, specify an activity that the system runs before it performs any additional processing for the flow action.
      You can specify an existing data transform or create a new data transform by clicking Open.
      Note: If this flow action supports bulk processing, leave this field empty. Bulk processing cannot use a preprocessing activity.
    4. If the activity has parameters, in the Parameters section, enter values for the parameters.
      Note:

      Consider the following usage notes when using an activity for preprocessing:

      • This activity runs only once, when a user selects the flow action for an assignment, even if the action area is redisplayed more than once (for example, when the inputs that the user submits the first time failed validation). The activity also runs when you preview the flow action.
      • In this activity, do not perform a Commit operation, and do not transfer the assignment.
      • If this flow action has the highest likelihood at run time, the form for this flow action form appears as the default action when your application displays a Perform user form, and the activity runs. Keep this in mind and consider the consequences if the user then selects a different flow action.
      • You can use the standard activity Work-.jumpToTask to allow users to return control to a completed assignment that is marked as an entry point.

        If you use this activity, complete either the TaskName parameter with the internal shape name, such as ASSIGNMENT52 or UTILITY12, or select the previousEntryPoint check box. See the standard flow action Work-.Previous for an example.

    5. Optional: To use Robotic Desktop Automation (RDA), complete the following steps to specify the preprocessing automation that you want to run on the user's desktop to retrieve data for display in a user form in your application:
      1. In the Run robotic automation field, enter an automation name.
      2. In the Description field, enter text that describes what the automation does.
      Note: Automations always run synchronously, and flow processing pauses while the automation is running. After an automation completes processing, the clipboard updates, and the section referenced on the flow action is rendered.
  3. To configure the processing that occurs after the user submits the action form, in the Post-processing section, complete the following steps:
    For postprocessing, the system first invokes an automation, then runs the data transform, and then runs an activity.
    1. If you are using RDA, complete one of the following steps to specify the postprocessing automation to run on the user's desktop when you want to send data that users enter in a case form to all the applications that are running on the user's desktop:
      1. In the Run robotic automation field, enter an automation name.
      2. In the Description field, enter text that describes what the automation does.
      Note: Automations are always run synchronously, and flow processing pauses while the automation is running. After the automation stops processing, the clipboard is updated, and your case continues to the next assignment.
    2. To save a data page after the flow action completes, list the data pages to save in the Savable data pages subsection, by completing the following steps:

      The following options allow you to persist changes to data after a flow action completes. You can either persist a savable data page or an autopopulated property that points to a savable data page. The first line item is optional; you do not need to provide a WHEN.

      1. In the WHEN field, specify a when rule by selecting an existing when rule, or creating a new one by clicking Open.
      2. In the Data page field, specify a data page by selecting an existing data page or creating a new one by clicking Open.
      3. If you want to use an autopopulated property that references a savable data page, click Use associated property.
      4. In the Autopopulate property name field, specify an autopopulated property.
    3. In the Apply cost field, specify the flow action cost by completing one of the following actions:
      • In units of any type, enter a number or expression for the cost of this flow action.
      • Enter a property reference, identifying a numeric property used in your computation.

        Within in a single application, use only numbers or property references.

        For example, the standard activity Work-.ValidateAction contains Java code that accepts either a Java double value or a property reference in this field.

        strCost = “Value of pyCost from a flow action passed in as a parameter”
           double newCost
              try {
                   newCost = Double.parseDouble(strCost);
                  } catch (NumberFormatException e) {
          // If the cost is not a hard-coded double,
          // perhaps it is a property
                  ClipboardProperty thisRef =.getProperty(strCost);
                   if (thisRef != null)
                   newCost = thisRef.toDouble();
    4. In the Apply data transform field, specify a data transform that the system applies to the current primary page at run time.
      You can specify an existing data transform or create a new data transform by clicking Open.
    5. In the Run activity field, enter the activity that the system runs after it processes the flow action.
      You can specify an existing activity or create a new activity by clicking Open.
    6. To specify an existing activity or create a new activity, enter the values, if any, that are on the activity.
      Note:

      See the following list for usage information about this activity:

      • Do not include a Commit method in the activity.

      • If you use an activity that depends on parameter values to be entered by a user after that user chooses this flow action, enter the activity here rather than placing the activity in the flow.

      • This activity can perform validation processing and add messages to the clipboard if validation fails and can perform other processing that is to occur when the flow action is submitted successfully.

      • If this is a local flow action, you can force a refresh of the entire user form by referencing an activity that sets the param.Purpose parameter to NoPurpose.

      • For screen flows, by default, when this flow action appears as a step in a screen flow, and the user at run-time clicks a different step in the screen flow, this activity does not run.

        To run this activity when the user clicks a different step, select the Post Action on Click Away? check box on the Assignment shape properties panel.

    7. To specify how to manage back-to-back processing, in the Back-to-back processing configuration subsection, make the following selections:
      • To search for another assignment for the same work item and same flow execution on the user's worklist, select Look for an assignment to perform.

        This feature is sometimes called back-to-back assignment processing.

      • To search for open assignments on this user's worklist from other flow executions that are active for the same case, select If not found, look for assignments in other flows on this case.

        The system finds and displays assignments that the current user is qualified to perform and for which the value of Assign-.pyActionTime is past.

        Note: This check box appears only if you select the Look for an assignment to perform check box.
      • To include open assignments for the cover work item to which this case belongs when searching for back-to-back assignments, select If not found, look for assignments in flows on the parent case.

        The system finds and displays assignments on the current user's worklist for which the value of Assign-.pyActionTime is past.

        Note: This check box appears only if you select the Look for an assignment to perform check box.
      • To include assignments in work queues in the search for back-to-back assignment processing, select For each also consider assignments in work queues.

        The search scope expands to examine the assignments in the work queues associated with the user's team (through the Work Group field on the Work queue tab of the Work queue form), as well as assignments on the user's worklist.

        Optionally, your application can override the detailed search criteria that the system uses when this check box is selected. The standard decision tree Assign-Workbasket.PerformCriteria defines these criteria.

        Note: This check box appears only if you select the Look for an assignment to perform check box.

      See the following list for usage information about back-to-back processing:

      • The system only finds and presents assignments that the current user is qualified to perform and for which the value of Assign-.pyActionTime is past.
      • As a best practice, select this check box. In many situations, two or more assignments can be open for one work item, assigned to the same person.

        When a user who performs one of these assignments is also qualified to perform other assignments, it is usually most efficient to have that user perform the assignments one after another, because the work item is familiar.

        For example, a flow might require three items of outgoing correspondence to be edited and sent out. In the flow, a Split Join shape might cause the Pega Platform to create three correspondence editing assignments, all in a single worklist. After a user edits the first correspondence item, completing one of the three assignments, it usually is productive to have that user complete the other two assignments.

    8. In the If an assignment is not being performed list, select what the system displays to users after all assignments are complete.
      • Show Harness — The system displays a refreshed harness form for the current work item, using the harness identified in the next field. Typically, the new harness displays the results of processing or computations based on the user input.

        In the next field, select the Purpose key part of a harness to be used. Typically, a post-assignment harness has Confirm as the Purpose key part.

        To force the user form to close, select the standard harness Work-.AutoClose. This is equivalent to choosing the Close Harness option in the list.

        Note: Do not specify a Perform-type harness (a harness that presents the work item in read-write mode).
      • Get Next Work – The system uses information on the Work tab of the Operator ID instance of the current user to search for an assignment to work on next.

      • Get Next Work in Current WorkPool – The system selects the next assignment in the work pool to assign to the current user.

      • Close the Work Object – Close the user form, returning to earlier work area contents, such as the Process Work home view. No confirmation form appears.

        This setting applies only to Submit and Next/Finish buttons.

        To close the form when a user clicks the Create button, select the If an assignment is not being performed check box on the form's Process tab.

  4. In the Action buttons section, specify how to control the display of the flow action's default navigation buttons.
    • To hide the default action section buttons, select Hide the default action section buttons check box.

      As an alternative, you can then provide custom navigation, such as buttons, drop-down menus, and links, in the body of the action section. For example, use pxButton and a Cancel action instead of Cancel.

      Note: If you select this check box but do not provide alternative navigation, users will not be able proceed in the process.
    • To customize the text on the default navigation buttons, select Customize the action section buttons labels.

      The default buttons are:

      • Submit button label – Submits the current work item. This button typically only appears in the last step of the flow action.
      • Previous button label – Displays the previous step in the flow action, if one exists. This button only appears after the user has moved past the first step.
      • Cancel button label – Cancels the process and closes the flow action without saving any changes.
      • Next button label – Displays the next step in the flow action, if one exists. This button does not appear in the last step of the flow action.
      Note: Do not leave a button label blank. At run time, unlabeled buttons are functional but do not display text.

      If an error occurs during postprocessing of a robotic desktop automation, the default case action button label automatically changes from Submit to Ignore and continue. If you provided a custom label for the Submit button, the Submit button label does not change. You can advance the case by clicking the Submit button again.

  5. In the Indicator section, in the Used as list, specify how you intend to use the flow action.
    • Local Action – Select if you want a local flow action to update the assignment and the work item. The local action retains the flow at the same assignment shape, allowing the current user (or another user in some cases) to choose another flow action. Local flow actions can be invoked from a modal window or from a flow action form.

    • Connector Action – Select if you want a connector flow action that corresponds to a connector arrow in the flow, to update the work item, complete the assignment, and advance the work item in the flow. Typically, connector flow actions are invoked from a flow action form.

      Alternatively, you can use auto-generated controls.

    • Local and Connector – Select to use the flow action as both a local action and connector action.

      When a user selects Other Actions in a flow action form, a menu displays connector flow actions and local flow actions.

  6. To exclude the flow action from the list of flow actions that are available for bulk processing, select Disqualify this action from bulk processing. See Running flow actions in bulk.
    You can perform bulk processing when the following criteria is met:
    • The Before this Action... Run Activity field is blank.

    • The flow action does not have circumstances.

    • If the assignments are in various work types, the Applies To class of the flow action must be a class that is an ancestor to all the work types.

      By default, some standard flow actions are not eligible for bulk processing because the process is designed to be used with only one work item at a time. To change the default setting, copy the flow action to your ruleset and make the change.