Other actions

<< Click to Display Table of Contents >>

Navigation:  Bizagi Studio > Process wizard > Define Forms > Customizing controls behavior > Actions and Validations > Actions components >

Other actions

Additional to the basic actions that allow changing the visibility, editability, binding or format of a control, Bizagi offers a set of actions focused

on improving the performance of forms.

 

These actions dynamically refresh specific controls of a form and allow defining the information that must be updated. This modern functionality without post-backs sends only the required information to widely improve performance in both mobile devices and desktops.

 

These actions includes:

 

Setting a value for a control

Refreshing the value of a control based on one condition

Using a button

Executing a rule

Executing an interface

Clearing the data for a control

Collapsing a group

Performing an action when a record of a collection is deleted

Performing actions over form buttons

 

 

Set a value for a control

You can assign a specific value to a control included in a form when a condition is met by using actions.

 

Example

In a Purchase Request Process, if the requester has a boss, the request must be approved by him/her.

 

The Boss attribute contains the name of the requester's boss. The Need approval attribute identifies if the request must be approved or not.

 

 

Action14

 

 

Therefore, if the Boss attribute does not contain information, it means the requester has no boss and then Need approval attribute has to be set in false.

 

To configure this action:

 

1. Create the Action.

On the Forms designer select Actions & Validations and add a new Action.

 

Action15

 

2. Include the condition.

Click Add a condition and select the control, operator and argument as follows.

When Boss is empty

 

Action16

 

 

3. Include the Action (Then).

Click Add an action and define what will happen when the condition above is met.

Set value for Need Approval to false.

 

Action17

 

4. Define the Else Action, that will execute when the condition is NOT met.

Set value for Need Approval to true.

 

Action18

 

This is how the Work Portal will look like according to the person who makes the request:

 

Action19

 

 

Refresh the value of a control based on one condition

The Refresh command allows defining which controls have to be updated when a condition is met. Normally this condition responds to changes in the value of an attribute. This command is specially useful to improve the response times of the form by allowing update specific sections instead the whole form, when it is not necessary.

 

Example

In a Purchase Request Process, when the requester selects a product to include, the product description and estimated price have to be updated. These attributes belong to a parameter entity so they are related.

 

Action20

 

To update only the required fields you must use actions.

 

1. Create the Action.

On the Forms designer select Actions & Validations and add a new Action.

 

2. Include the condition.

Click Add a condition and select the control, operator and argument as follows.

When Product changes.

 

Action21

 

 

 

3. Include the Action (Then). Click Add an action and define what will happen when the condition above is met.

Refresh Description and Estimated Price.

 

Action22

 

4. Define the Else Action. In this case no action will execute when the condition is NOT met so leave this option in Do nothing.

 

Action28

 

This is how the Work Portal will behave when changing the selected product:

 

 

Action23

 

Use a button

Actions can be used to define what to do when a button is clicked. Using actions instead specific behaviors configured directly in a button allows executing the desired actions without refreshing the entire form. Only the controls specified to be refreshed will be updated.

 

Example

In a Purchase Request Process, a button is used to calculate the total cost of the purchase including taxes and discounts.

 

 

Action31

 

When clicked, the button executes an expression to obtain the total value. As we want only the Total Cost control to be updated when the button clicks, we should use an action.

 

1. Include the button in the form.

Drag and drop a button control from the Controls panel. Name it Calculate.

 

Action24

 

2. Create the Action.

Select Actions & Validations and add a new Action.

 

3. Include the condition.

Click Add a condition and select the button in the controls field. The click option will be available to identify when the button has been clicked.

 

Action26

 

The condition would be When Calculate click.

 

 

Action25

 

4. Include the Action (Then).

Click Add an action and define what will happen when the condition above is met.

Select Execute rule as the command and then find the rule on the expressions editor.

 

Action27

 

In this case the rule to totalize the purchase's cost is called Calculate Total Cost.

The action would be Execute rule Calculate Total Cost

 

Action29

 

 

5. Update affected controls.

Click Add an action and define the controls that have to be updated after executing the rule. To do so, use the Refresh command.

 

In this case, the control to refresh is Total Cost.

Refresh Total Cost.

 

 

Action55

 

 

 

6. Define the Else Action. In this case no action will execute when the condition is NOT met so leave this option in Do nothing.

 

 

Action30

 

This is how the information is updated when clicking the button:

 

 

Action32

 

 

Execute a rule

Actions allows executing rules when specific business conditions are met. Using actions to execute rules instead using on save events or independent buttons allows updating only the fields that are affected by the rule execution, instead refreshing the whole form.

 

Example

A Process to support international trade operations uses a currency converter in the form of one of its activities. As any converter, the user has to enter the amount to convert,  the currency of this amount and the currency to which convert it.

 

Action34

 

 

When the value of any field changes, the calculation must be updated to reflect the change. The calculation is done through an expression called Convert currency.

 

An action is used to identify when the value in any of these fields have changed and to execute the rule that makes the conversion.

 

1. Create the Action.

On the Forms designer select Actions & Validations and add a new Action.

 

2. Include the condition. Click Add a condition and select the controls, operators and arguments as follows.

When Amount changes OR  Amount currency changes OR ConvertTo changes.

 

Action35

 

3. Include the Action (Then). Click Add an action and define what will happen when the condition above is met.

Select Execute rule as the command and then find the rule on the expressions editor.

Execute Rule Convert Currency

 

Action36

 

The action would be Execute rule Calculate Total Cost

 

Action37

 

4. Update affected controls.

Click Add an action and define the controls that have to be updated after executing the rule. To do so, use the Refresh command.

 

In this case, the control to refresh is Converted amount.

Refresh Converted amount.

 

 

Action56

 

5. Define the Else Action. In this case no action will execute when the condition is NOT met so select the option Do nothing.

 

Action38

 

This is how the Work Portal will behave when one of its fields changes:

 

Action33

 

Execute an interface

Actions allows executing interfaces when specific business conditions are met. Using actions to execute interfaces instead using on save events or independent buttons allows updating only the  fields that are affected by the interface execution instead refreshing the whole form.

 

Example

In a Loan Request Process, an applicant can be verified in the black list at any moment. As the black list is in an external system, an interface is used to perform the verification. To do so, the applicant's identification number is entered and then a button has to be clicked to execute the interface.

 

Action40

 

 

An action have to defined to configure this behavior.

 

1. Include the button in the form.

Drag and drop a button control from the Controls panel. Name it Verify Applicant.

 

Action39

 

2. Create the Action.

Select Actions & Validations and add a new Action.

 

3. Include the condition.

Click Add a condition and select the control, operator and argument. Select  the click option to identify when the button has been clicked.

The condition would be When Verify Applicant click.

 

Action41

 

4. Include the Action (Then).

Click Add an action and define what will happen when the condition above is met.

Select Execute interface and configure the desired interface.

 

Action42

 

For further information about how to configure interfaces, please refer to Invoking external services from Bizagi

 

5. Update affected controls.

Click Add an action and define the controls that have to be updated after executing the interface. To do so, use the Refresh command.

 

In this case, the control to refresh is Status.

Refresh Status.

 

Action57

 

6. Define the Else Action. In this case no action will execute when the condition is NOT met so select the option Do nothing.

 

From the Work Portal when the user clicks the button, the interface will be executed.

 

 

Action44

 

Collapse a group

You can manipulate groups using actions to expand or collapse them according to specific conditions.

 

Example

In a Travel Request Process, the information of hotel booking is displayed in an independent group. This group should only be expanded if the requester requires hotel booking, otherwise should remain collapsed.

 

 

Action45

 

To collapse or expand the hotel information group according to the required:

 

1. Create the Action.

On the Forms designer select Actions & Validations and add a new Action.

 

2. Include the condition. Click Add a condition and select the control, operator and argument as follows.

When Book hotel is false.

 

 

Action46

 

3. Include the Action (Then). Click Add an action and define what will happen when the condition above is met.

Collapse Hotel Information to true

 

Action47

 

 

4. Define the Else Action, that will execute when the condition is NOT met.

Collapse Hotel Information to false

 

 

Action48

 

This is how the Work Portal will look like according to the end user's choice:

 

Action50

 

Clear the data for a control

By using actions you can also clear the data for a specific control when a condition is met.

 

Example

In a Claims and complaints handling process, the information of a case is entered in the first activity.

In some cases when most of the information has been filled, the customer can decide to decline the case. In this situation it is desirable that the user entering the information can delete the information previously entered just with one click.

 

1. Include the button in the form.

Drag and drop a button control from the Controls panel. Name it Clear information.

 

Action59

 

2. Create the Action.

Select Actions & Validations and add a new Action.

 

3. Include the condition. Click Add a condition and select the control, operator and argument as follows.

When Clear Information click.

 

Action60

 

4. Include the Action (Then). Click Add an action and define what will happen when the condition above is met.

Clear data for Customer, Reception mean and Cause.

 

Action61

 

 

5. Define the Else Action. In this case no action will execute when the condition is NOT met so select the option Do nothing.

 

Action62

 

This is how the Work Portal will look like according to the end user's choice:

 

 

Action63

 

 

 

Perform an action when a record of a collection is deleted

Actions can be performed when the record of a collection is deleted.

 

Example

In a Purchase request the Total value of the purchase is calculated with each product included in a table.

If the Total value is greater than $1,000 then the Total control must turn red. Else, the control must turn green.

Since products can be deleted from the table, the Total control must be refreshed to reflect the total amount.

 

1. Create the Action.

On the Forms designer select Actions & Validations and add a new Action.

 

2. Include the condition. Click Add a condition and select the Table control, operator and argument as follows.

When Products requested has a row deleted

Execute rule (that calculates the Total Cost estimate)

Refresh Total Cost

 

3. Define the Else Action. In this case no action will execute when the condition is NOT met so select the option Do nothing.

 

 

Action64

 

4. In the Work Portal fill the table of products. until the Total cost turns red.

 

Action66

 

5. Select one row for deletion

 

Action65

 

6. See how the Total cost is refreshed as soon as the row is deleted.

 

Action67

 

Perform actions over form buttons

You can perform Actions over Form buttons to:

 

Set forecolor

Set background

Change editability

Click on the Form button

 

Example

In a Vacation Request process, the requester user cannot complete a Task and thus move on in the workflow if he/she is requesting more than 15 business days or less than one day. If the user sets a value greater than 15 or equal to zero in the Number of business days requested field the Next button has to be hidden and the Save button has to change its background color to yellow. To achieve this follow the instructions below.

 

1. Enable Form Buttons in the Ribbon.

A new panel will display at the bottom of the form. For more information about this buttons, refer to Form buttons.

 

Action75

 

2. The two default buttons will display and be available in Actions and Validations.

Create the Action: On the Forms designer select Actions & Validations and add a new Action.

 

3. Include the condition. Click Add a condition and select the Number of business days requested control, operator and argument as follows.

Number of business days requested greater than 15

 and Number of business days requested less than or equal to 0

 

Action76

 

4. Include the Action (Then). Click Add an action and define what will happen when the condition above is met.

change visibility for Next to false

set background for Save to yellow

 

Action78

 

5. Define the Else Action. In this case, the action will display the Next button and change the Save button's background to Green (default) color. Select perform the following actions options and selected the described condition.

change visibility for Next to true

set background for Save to green

 

Action79

 

This is how the Work Portal will look like according to the end user's choice:

 

Action77