Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

Conditionally starting a process

Updated on November 22, 2021

Create applications that flexibly adjust to dynamically changing scenarios by configuring conditions to start specific sets of actions. When processes in your case type start under specified conditions, you save time and resources because you can create one case type that is relevant in various situations, instead of providing and maintaining multiple case types.

Additionally, you can focus your application development on a goal that you want to achieve rather than on fixed paths that might be difficult to predict.

Consider a case type with the goal of hiring a new candidate. The case type includes an Interview stage during which a manager interviews a job candidate. Additionally, if the candidate applies for a manager role, the company requires a background check. You can create a Background check process, and then define conditions to run the process only for candidates for manager roles. As a result, you create only one case type instead of creating two very similar case types.

You can define conditions to start a process both in App Studio and Dev Studio. In App Studio, you can reuse existing conditions or create new ones by using a condition builder, while in Dev Studio you can use a When rule or an expression to define when the process starts.

  1. Open the process that you want to configure:
    • To configure the process in App Studio, in the navigation pane of App Studio, click Case types, and then click the case type that you want to open.
    • To configure the process in Dev Studio, in the navigation pane of Dev Studio, click Case types, and then click the case type that you want to open.
  2. In the Case life cycle section, click the process that you want to configure.
  3. In the Process pane, on the General tab, define conditions to start the process:
    ChoicesActions
    Always start a processIn the Start process (otherwise skip) list, select Always.
    Define a new condition in App Studio
    1. In the Start process (otherwise skip) list, select Custom condition, and then click the Configure conditions icon.
    2. In the Configure condition window, define a condition by selecting a property, comparator, and value to evaluate against the property at run time.
      For example: To start a process only when a job candidate applies for a manager role, select PositionType equals to Manager.
      As a property, you can select a field or a when condition. For more information about building conditions, see Defining conditions in the condition builder.
    3. Optional: To define more conditions, click Add a row, and then repeat step 3.b.
    4. If you have multiple conditions, specify whether all or any conditions need to evaluate to true at run time by selecting either and or or between the conditions.
      For example: The following figure shows the conditions to set if you want a process to start when a job candidate applies for a manager role or when the work experience of the candidate is less than three years:
      Conditions for starting a process
      Condition builder with a sample configuration in which one of two conditions needs to evaluate to true
    5. Click Submit.
    Use an existing condition in App Studio
    1. In the Start process (otherwise skip) list, select Existing condition.
    2. In the list of conditions, select a condition that you want to evaluate, and then decide whether the condition needs to evaluate to true or false to start the process.
      For example: The following figure shows the condition that starts a process if a user starts your application on a mobile device:
      Reusing an existing condition
      Process properties pane with a sample configuration that reuses an existing condition
    Use a When rule in Dev Studio
    1. In the Start Process list, select When Rule.
    2. In the text field, press the Down arrow key, and then select the When rule that you want to use.
      Tip: You can also create a new When rule by clicking the Open icon. For more information, see Creating a When rule.
    Use an expression in Dev Studio
    1. In the Start Process list, select Expression.
    2. In the text field, press the Down arrow key, and then select the expression that you want to use.
      Tip: You can also create a new expression by clicking the Build an expression icon.
  4. Click Save.
Result: At run time, when a case reaches the process, an application evaluates the conditions and, based on the results, either starts or skips the process.

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us