Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Corrected links that should have been relative instead of absolute.

Conditions determine whether a certain transition is executed in a process flow. Conditions are used to change the direction of the process flow based on a decision. There are three types of conditions:

Anchor
Process

...

Variable Condition
Process Variable Condition
Process Variable Condition

A transition may have a condition based on the value of the context variable present in the current process flow. Once the condition is met, a transition takes place. The Process Flow Variable Condition can be of two types:

...

Variable Condition is used to define a condition based on the value activity specific context variable in a process

...

flow

...

.

...

To add a Condition in a process flow using activity attributes:

  1. In Web Process Designer, in the Toggle Palette panel, select Gateway ( Image Removed ) element  element and drag it in the canvas area.  Alternatively, click the Source element and select Append Gateway option from Context pad.



  2. Connect the activities, for information on how to connect activities, refer to Creating Process Flow.

  3. To add a condition, select the control flow and click the Options icon and then select Define Condition to display Sequence Flow Condition window.



  4. On the Sequence Flow Condition window, select Process Variable and provide the details of each field. Click Done.



    Field Name
    Description
    Activity NameList of activities of the process flow.
    Variable NameActivities of the selected activity.
    Operands Type

    Data types of the value contained by the above-specified attribute.

    Number: Select this option if the specified activity attribute contains a numeric value, for example, 1, 12.

    Text: Select this option if the specified activity attribute contains a text value, for example, processflow.

    Decimal: Select this option if the specified activity attribute contains a decimal value, for example, 10.211, 100.50. The decimal precision can be defined under the decimal precision text field.

    OperatorsOperator to be applied to the activity attribute. The supported operators are "=", "! =", ">", "<", ">=", "<=".
    ValueValue of the above-specified attribute. 
    Decimal PrecisionApplicable only if the Operands Type is Decimal.
  5. Repeat the steps to add a condition on another control flow.

Adding Condition Using Process Flow Variable Other Condition

The transition will execute using Process Flow variable if the value of a specified variable is equal to the defined value.

Prerequisites

Ensure that you have created a Process Flow variable.

To add a Condition in a process flow using other condition:

...

In the Process Designer, in the Palette View panel, select Gateway ( Image Removed ) element and drag it in the Graph canvas area.

Image Removed

 

...

Connect the activities with the Gateway element using uncontrolled or default control flow.

 

For information on how to connect activities, refer to Creating Process Flow.

To add a condition, right-click the control flow and select View Properties. The properties of the control flow are displayed in the Properties Panel in the Bottom Pane.

...

Click Edit Condition from the Properties Panel. 

On the Condition Wizard window, click Process Flow Variable Condition and click Next.

...

On the Other Condition window, select the value in the fields and click Done

Image Removed

Field Name
Description
NameName of the process flow variable.
Operands Type

Data types of the value contained by the above-specified attribute.

Number: Select this option if the specified activity attribute contains a numeric value, for example, 1, 12.

Text: Select this option if the specified activity attribute contains a text value, for example, processflow.

Decimal: Select this option if the specified activity attribute contains a decimal value, for example, 10.211, 100.50. The decimal precision can be defined under the decimal precision text field.

OperatorsOperator to be applied to the activity attribute. The supported operators are "=", "! =", ">", "<", ">=", "<=".
ValueValue of the above-specified attribute. 
Decimal PrecisionApplicable only if the Operands Type is Decimal.

...

Anchor
Java Condition
Java Condition
Java Condition

A transition may have a condition that can be either in the form of script or Custom APIs. Once the condition is met, the transition takes place. Java Condition is a part of the transition.

...

  • The class must implement ConditionExecutor interface.

     

    public class <classname> implements ConditionExecutor
  • The method should accept only one parameter and that must have an object of ExecutionEvent.

     

    public boolean <methodname> (ExecutionEvent event) throws Exception 
  • The method must be public.

...

Adding Condition Using Java Condition

To add a Condition in a process flow using Java condition:

  1. In the Web Process Designer, in the Palette View panelToggle Palette panel, select Gateway ( Image Removed ) element  element and drag it in the Graph Canvas canvas area.

    Image Removed

     

      Alternatively, click the Source element and select Append Gateway option from Context pad.

    Image Added

  2. Connect the activities with the Gateway element using uncontrolled or default control flow.

     For

    , for information on how to connect activities, refer to Creating Process Flow.

  3. To add a condition, right-click select the control flow and click the Options icon and select View Properties. The properties of the control flow are displayed in the Properties Panel in the Bottom Pane.

    Image Removed
  4. Click Edit Condition from the Properties Panel. 

  5. On the Condition Wizard window, click Java Condition and click Next.

     Image Removed
    On the Java Condition window, select the interpreter type.then select Define Condition to display Sequence Flow Condition window.

    Image Added

  6. On the Sequence Flow Condition window, select Java and then select the interpreter type.

     Image Added

    Interpreter Type
    Description
    Script

    In this option, you need to define the Java code for the execution of the process flow. Using this option will decrease the execution performance of the process flow.
    Image Removed
    Image Added

    Custom API

    It is recommended to use this option. Using this option will increase the execution performance of the process flow. In this option, you need to select the class and its method for the execution of the process flow. The process flow will be executed on the basis of the code implemented in the selected method.

    Image RemovedImage Added

  7. Repeat the steps to add a condition on another control flow.

...

Anchor
Expression Condition
Expression Condition
Expression Condition

A transition may have a condition based on an expression. This expression is built using the Activity Attributes or the process flow variable with 'AND' & 'OR' condition.
 Adding Condition Using Expression Builder
You can generate an expression using Activity Attributes or Process Flow variables or 'AND' or 'OR' conditions.

To add a Condition in a process flow using Expression Builder: 

  1. In the Web Process Designer, in the Palette View panelToggle Palette panel, select Gateway ( Image Removed ) element  element and drag it in the Graph canvas area.

    Image Removed

     

      Alternatively, click the Source element and select Append Gateway option from Context pad.

    Image Added

  2. Connect the activities with the Gateway element using uncontrolled or default control flow.

     For

    , for information on how to connect activities, refer to Creating Process Flow.

  3. To add a condition, right-click select the control flow and click the Options icon and select View Properties. The properties of the control flow are displayed in the Properties Panel in the Bottom Pane.

    Image Removed
  4. Click Edit Condition from the Properties Panel. 

  5. On the Condition Wizard window, click Expression Condition and click Next

    Image Removedthen select Define Condition to display Sequence Flow Condition window.

    Image Added

  6. On the Sequence Flow Condition window, select Expression.

  7. Select the condition to be used for building the expression from the Operator option. You can select the values && (AND) and || (OR).

  8. For defining expressions you need to define rules. A rule supports multiple expressions. You can link the multiple expressions using the rule operator. On the Condition Wizard window, click Image Removed. On the Rule Information window, provide

  9. Click Add to define the rule. 

    Image Added

  10. Provide the details of the rule. Image Removed

     

    Field Name
    Description
    Rule NameName of the rule.
    Rule Reason

    Reason on the basis of which the rule will be evaluated as true or false. This is set in the context of the process flow.

    Existing Activities

    Activity Attribute or process flow variable used to build the expression. This drop-down is populated with the current activities. Alternately, if you select a blank value, then a process flow variable is selected.

    Activity Attribute/VariableThis drop-down is populated with values based on the selection in the Existing Activities field. If an activity is selected, then this drop-down lists all the attributes of the selected activity. If a process flow variable is selected, then this dropdown lists the currently available process flow variables.
    Operand type

    Data type of the selected activity attribute or process flow variable.

    Number: Select this option if the specified activity attribute contains a numeric value, for example, 1, 12.

    Text: Select this option if the specified activity attribute contains a text value, for example, processflow.

    Decimal: Select this option if the specified activity attribute contains a decimal value, for example, 10.211, 100.50. The decimal precision can be defined under the decimal precision text field.

    Operator

    Operator to be applied to the activity attribute or process flow variable. The supported operators are:

    "=", "! =", ">", "<", ">=", "<=" for Number and Decimal Operand Type.

    Equal, Not Equal, Equal Ignore Case, Not Equal Ignore Case for Text Operand type.

    ValueValue of the activity attribute or process flow variable that needs to be verified. The Number Operand Type should be of data type Long. The Decimal Operand Type should be of Double data type. 
  11. Click Create Expression to insert  Add to insert the defined condition (comprising of activity attribute or process flow variable) into the Expression text area, displayed at the bottom of the window.

    Image Removed

     

  12. Once the activity attributes or process flow variable is inserted, you can create another condition for building the expression. Select the condition to be used for building the expression from the Select Operator drop-down list. This drop-down is populated with Declare  Operator to build Expression with values of && (AND) and || (OR).
  13. Click Insert OperatorSelect the operator on the basis of which you want to evaluate these rules from the Rule Operator. The supported rule operators are.

    Rule Operator

    Description

    ||

    This evaluates the rules based on the OR operator. If any of the listed rules are true, then the decision value in the process flow will be executed as true.

    &&

    This evaluates the rules based on the AND operator. If all the listed rules are true, then only the decision value in the process flow will be executed as true. If any of the listed rules is false, then the decision value will be executed as false.


    You can evaluate the rules using one operator at a time. For example, if you select || then all rules will be evaluated on the basis of the OR operator. You cannot evaluate two rules based on the OR operator and two rules based on the AND operator.
  14. Click Add to insert the selected operator into the Expression text area. 
    Image Removed
    Image Added

     


  15. Both the conditions are displayed in the Expression text area. You can edit this expression for evaluation based on certain rules. These rules are outlined in the table below.

    Object

    Rule

    Activity Attribute/Process Flow Variable

    It is to be displayed between $$. For example, Activity Attribute will be displayed as $$ Service. Activity. Activity Attribute $$ 
    Process Flow variable will be displayed as $$ var1 $$

    Operand Text

    • All values are enclosed within double quotes. For example, ("text").

    • Values having '\' are replaced by '\\'.

    • Values having double quotes (") are replaced by single quotes (').

    Operator Equal

    The condition is replaced as ($$var$$.equals ("text")).

    Operator Not Equal

    The condition is replaced as! ($$var$$.equals ("text")).

    Operator Equal Ignore Case

    The condition is replaced as ($$var$$.equalsIgnoreCase ("text")).

    Operator Not Equal Ignore Case

    The condition is replaced as! ($$var$$.equalsIgnoreCase ("text")).

     


    The transaction will get aborted if an invalid expression is entered in the Expression text area.

     

  16. Click Done. This returns the control to the Sequence Flow Condition Wizard window with the newly added rule. Similarly, you can add more rules. 

    Image Removed

     

     


    Image Added

    You can also edit the Rule Name and Rule Reason from this window by selecting the rule and then

    clicking Image Removed.
  17. Select the operator on the basis of which you want to evaluate these rules from the Rule Operator. The supported rule operators are.

    Rule Operator

    Description

    ||

    This evaluates the rules based on the OR operator. If any of the listed rules are true, then the decision value in the process flow will be executed as true.

    &&

    This evaluates the rules based on the AND operator. If all the listed rules are true, then only the decision value in the process flow will be executed as true. If any of the listed rules is false, then the decision value will be executed as false.

     
    You can evaluate the rules using one operator at a time. For example, if you select || then all rules will be evaluated on the basis of the OR operator. You cannot evaluate two rules based on the OR operator and two rules based on the AND operator.
  18. clicking Edit option.

  19. Click Done. This closes the Condition Wizard window the window and returns to the Graph Canvas area.

    Once you execute the process flow, all the listed rules will be evaluated in the top to bottom sequential order.

    If they are evaluated using the OR (||) rule operator, then if any of the listed rules are true, then the decision value will be true and the process flow will be executed in the True path. The reason for all rules that are evaluated as True, will be added as comma separated values, and set as a single value in the context variable ruleReason in the format ruleName (ruleReason).

    If the rules are evaluated using the AND (&&) rule operator, then only if all the listed rules are true, then the decision value will be true and the process flow will be executed in the True path. Even if one rule is evaluated to false, then the decision value will be false and process flow will execute in the False path. The reason for all rules that are evaluated as True, will be added as comma separated values and set as a single value in the context variable ruleReason in the format ruleName (ruleReason). The rules that are evaluated as False, will appear as an empty value in the ruleReason context variable.