<< Click to Display Table of Contents >> 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
•Clearing the data for a control
•Performing an action when a record of a collection is deleted
•Performing actions over form buttons
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.
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.
2. Include the condition (If).
Select the control, operator and value as follows.
Boss is empty
3. Include the action (Then).
Define what will happen if the condition above is met.
set value for Need Approval to No
4. Define the Else action that will execute if the condition is NOT met.
set value for Need Approval to Yes
This is how the Work Portal will look like according to the person who makes the request:
Refresh the value of a control based on one condition
The refresh command allows defining which controls have to be updated if a condition is met. Normally this condition responds to changes in the value of an attribute. This command is especially useful to improve the response times of the form by allowing update specific sections instead the whole form, when it is not necessary.
After executing a refresh, the engine evaluates if there is an action related with the control(s) to be refreshed. If so, the actions of these controls are executed again to keep the state of the form.
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.
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 (If).
Select the control, operator and value as follows.
Product changes
3. Include the action (Then).
Define what will happen if the condition above is met.
refresh Description and Estimated Unit Price
4. Define the Else action. In this case no action will execute if the condition is NOT met, so leave the action configuration as it is.
This is how the Work Portal will behave when changing the selected product:
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.
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.
2. Create the Action.
Select Actions & Validations and add a new action.
3. Include the condition (If).
Select the button in the controls field. The click option will be available to identify if the button has been clicked.
The condition would be Calculate click
4. Include the action (Then).
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.
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
5. Update affected controls.
Click the Add button 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
6. Define the Else action. In this case no action will execute if the condition is NOT met, so leave the action configuration as it is.
This is how the information is updated when clicking the button:
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.
If 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 (If). Select the controls, operators and values as follows.
Currency to convert Or Currency to which convert Or Amount to convert changes
3. Include the action (Then). Define what will happen if the condition above is met.
Select execute rule as the command and then find the rule on the expressions editor.
The action would be execute rule Convert currency
4. Update affected controls.
Click the Add button 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
5. Define the Else action. In this case no action will execute if the condition is NOT met, so leave the action configuration as it is.
This is how the Work Portal will behave when one of its fields changes:
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.
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.
2. Create the action.
Select Actions & Validations and add a new action.
3. Include the condition (If).
Select the control, operator and value. Select the click option to identify if the button has been clicked.
The condition would be Verify Applicant click
4. Include the action (Then).
Define what will happen if the condition above is met.
Select execute interface and configure the desired interface.
For further information about how to configure interfaces, please refer to Invoking external services from Bizagi
5. Update affected controls.
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
6. Define the Else action. In this case no action will execute if the condition is NOT met, so leave the action configuration as it is.
From the Work Portal when the user clicks the button, the interface will be executed.
Actions allows executing the out-of-the-box SAP connector instead using on save events, enabling the exclusive update of the fields that are affected by the SAP connector's execution.
Example
In a Flight booking Process, the activity Request flight fetches the available flight information using a SAP system. Follow the example presented in SAP example. The SAP connector must be previously configured before being able to use it.
Actions allow executing previously configured connectors when specific business conditions are met. Use actions to execute connectors instead of using on save events, allowing the exclusive update of the fields affected by the connector's execution, instead refreshing the whole form.
Example
In a Opportunity Management Process, the customer has to be registered as a Contact in HubSpot before the Register Opportunity activity can be completed. In order to connect with the HubSpot account, a connector available in Bizagi Connectors Xchgane is used to register the contact. The customer's information is entered and a button has to be clicked to execute the connector.
Before following the next steps, recall that the connector has to be previously installed and configured, for more information, please refer to Installing and managing connectors.
Once the connector has been installed and configured, an action is defined to configure this behavior.
1. Include the button in the form.
Drag and drop a button control from the Controls panel. Name it Register Contact.
2. Create the action.
Select Actions & Validations and add a new action.
3. Include the condition (If).
Select the control, operator and value. Select the click option to identify if the button has been clicked.
The condition would be Register Contact click
4. Include the action (Then).
Define what will happen if the condition above is met.
Select execute connector and configure the desired connector.
5. Update affected controls.
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 HubSpot Id.
Refresh HubSpot Id
6. Define the Else action. In this case no action will execute if the condition is NOT met, so leave the action configuration as it is.
From the Work Portal when the user clicks the button, the connector will be executed.
By using actions you can also clear the data for a specific control if 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.
2. Create the action.
Select Actions & Validations and add a new action.
3. Include the condition (If). Select the control, operator and value as follows.
Clear Information click
4. Include the action (Then). Define what will happen if the condition above is met.
Clean data for Customer, Reception Mean and Cause
5. Define the Else action. In this case no action will execute if the condition is NOT met, so leave the action configuration as it is.
This is how the Work Portal will look like according to the end user's choice:
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.
.
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 (If). Select the control, operator and value as follows.
Book hotel is false
3. Include the action (Then). Define what will happen if the condition above is met.
collapse Hotel Information to Yes
4. Define the Else action, that will execute if the condition is NOT met.
collapse Hotel Information to No
This is how the Work Portal will look like according to the end user's choice:
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 (If). Select the Table control, operator and value as follows.
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 if the condition is NOT met, so leave the action configuration as it is.
4. In the Work Portal, fill the table of products until the Total Cost turns red.
5. Select one row for deletion
6. See how the Total cost is refreshed as soon as the row is deleted.
Perform actions over form buttons
You can perform Actions over Form buttons to:
•Set forecolor
•Set background
•Change editability and visibility
•Click on the Form buttons
Example 1, Changing Editability and Background of the form buttons
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.
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 (If). Select the Number of business days requested control, operator and value as follows.
Number of business days requested greater than 15
or Number of business days requested less than or equal to 0
4. Include the action (Then). Define what will happen if the condition above is met.
change visibility for Next to No
set background for Save to yellow (#ffff00 hex color code)
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.
change visibility for Next to true
set background for Save to green (#008000 hex color code)
This is how the Work Portal will look like according to the end user's choice:
Example 2, clicking on Form buttons
In a Vehicle Insurance Policy Underwriting process, the company has defined for the Register Client and Vehicle Data task some checkpoints where it is necessary to perform an auto save. To do so, if the value of the fields defined as a checkpoint changes, the Save button has to be clicked automatically. 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.
2. The two default buttons will display as available in Actions and Validations.
Create the action: On the Forms designer, select Actions & Validations and add a new action.
3. Include the condition (If). Select the controls defined as checkpoints (in this case, Marital Status and Vehicle Year), operators and values as follows.
Marital Status changes
or Vehicle Year changes
4. Include the action (Then). Define what will happen if the condition above is met.
click Save
5. Define the Else action. In this case no action will execute if the condition is NOT met, so leave the action configuration as it is.
Now, when the user fills these fields, Bizagi Work Portal will auto click the Save button, and the information in the form will be persisted.
Last Updated 1/23/2023 12:05:09 PM