All product information in wiki.bizagi.com is only valid for Bizagi BPM Suite 9.1.X.
For newer Bizagi BPM Suite versions (10.X and up) please visit the User Guide.
 

Modules: For While and Web Service

From Business Process Management, BPM and Workflow Automation Wiki | BizAgi BPMS

Jump to: navigation, search

<keywords content="keywords"> for, while, web service, add for, add while, loop, iteration </keywords>

Contents

For, While, and Web Service modules in Bizagi rules

For

This module offers the possibility to include the logic of a cycle executed a number of times, which may be equal to the number of iterations required to reach a final value starting with an initial value and increasing this value by a certain amount on each iteration.  Right click on the rectangle to display the following list of options:


Image:Bulletrojo.gif Edit Description: Makes changes to the name given to the module.

Image:Bulletrojo.gif Properties: Allows you to establish the conditions for the cycle.

Image:Bulletrojo.gif Remove: This option allows you to eliminate the entire module.



How to Add a For

1.     Right click on the vertical line of the rule and select the Add For option; the For-Description window will pop up for you to name the module



2.     Right click on the module created and select the Properties option to establish its characteristics in the new window.

3.     The For window includes the following characteristics:


Image:Business_Rules7_Image011.jpg


 

Loop Initialization: indicates the declared variable that will be used for the cycle, = indicate the initial value of the variable

Loop Condition: indicates the condition that must be fulfilled to enter the cycle. When the condition is no longer met the cycle finishes.

Loop Increase/Decrease: indicates the amount of which the variable is going to increase/decrease in each of the iterations.

 

Example: In the Loan Request process, as soon as a Credit Analyst approves a credit, each product has to change its state. It is necessary to loop through each approved product, and set a new Product State.

 

This is how the data model looks like for the example:

Image:Business_Rules7_Image012.jpg

 

Image:Business_Rules7_Image013.jpg

 



While

This module offers the possibility to include the logic of a cycle executed while a condition is true.

Note:Make sure the condition is associated and there is no possibility of generating a never-ending loop

Right click on the diagram to display the list of options described below associated with this module:

Image:Bulletrojo.gif Edit Description: Makes changes to the name given to the diagram.

Image:Bulletrojo.gif Properties: Allows you to edit the condition in the “Entity Expression” window.

Image:Bulletrojo.gif Remove: This option allows you to eliminate the entire module.


Image:Business_Rules7_Image014.jpg


How to Add a While

1.     Right click on the vertical line of the rule and select the Add While option; the While-Description window will pop up for you to name the module

2.     Right click on the module created and select the Properties option to establish its characteristics in the new window.

3.     The While window includes the condition for the cycle to be carried out.


Image:Business_Rules7_Image015.jpg

a.     In the first field, select the object to be evaluated: The combo offers the following options:


Image:Bulletazul.gif List of attributes of the Context Entity: allows you to select any of the attributes in the Context Entity.

Image:Bulletazul.gif Select Attribute: allows you to select an attribute related to the Context Entity.  If you select this option, the Select Item window will pop up with a tree to select the item from.


Image:Business_Rules7_Image016.jpg


Image:Bulletazul.gif Write Expression: allows you to type in an expression directly.  If you choose this option, a text box will open to the right of the combo for you to type it in.


Image:Business_Rules7_Image017.jpg


b.     If you chose an attribute in the previous step, another combo will appear  presenting  several options depending on the type of attribute selected,including:

Attributes/Definitions

Operators

Numerical

Equal, Different, Less Than, Less Than or Equal To, Greater Than, Greater Than or Equal To, Empty, Full.

Text

Equal, Different, Empty, Full, Contains, Does Not Contain, Starts With, Does Not Start With.

Boolean

Empty, Full, Equal to Yes, Equal to No.

Image:Business_Rules7_Image018.jpg


c.      If your selection requires the inclusion of another argument, another combo will appear offering the following options:


Image:Bulletazul.gif Enter Number: Allows you to enter a constant, only available for numerical attributes.

Enter Text: Allows you to type in a text, only available for string type attributes.

Enter Date or Date and Time: Allows you to enter a constant date or date and time, only available for date type attributes.

 

Image:Bulletazul.gif Select Field: When you choose this option, the Select Item window will pop up with a tree for you to select the attributes of the Context Entity and the attributes related to the Context Entity.  

List of Variables: Allows you to select any of the variables declared in the Start module.

Image:Bulletazul.gif Select Entity Value: Allows you to select the value of the attribute evaluated when it is reacting with a parameterization entity.


4.     If you need to add another condition, the And button allows you to include it by means of a logical operator "And" or "Or". In the event that the conditions have to be grouped together with parentheses, click on the Link button, which will nest the condition with the one preceding it.  To delete conditions, click on the Delete button to eliminate them one at a time.

 

Web Service

This module allows you to effortlessly include calls on web services in the rule. Right click on the diagram to display the list of options described below associated with this module:


Image:Bulletrojo.gif Edit Description: Makes changes to the name given to the diagram.

Image:Bulletrojo.gif Properties: Allows you to configure the call on the web service.

Image:Bulletrojo.gif Remove: This option allows you to eliminate the entire module.

 

Image:Business_Rules7_Image019.jpg


How to Add a Web Service

To learn how to create and use a web service from a Bizagi rule, go to Invoking a web service from a rule.

Take into account that a web service can also be invoked from an activy action in a task. For more information about this option, view the web services example.


Related Articles



<comments />