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.
 

Delete Elements in a grid

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

Jump to: navigation, search


<keywords content="keywords"> remove, remove register, delete register, adddeletedentities, removerelation </keywords>

Contents

How to Delete elements of a grid

There are two ways to delete one or several elements in a grid. One is using iterate over xpath in an expression, and the other way is with a simple xpath expression.

Delete Elements Using Iterate Over Xpath

In a Consumer Loan Request process, a client wishes to apply for two loans with the bank. Each loan (product) has to be approved by the Loan Factory. There are several Products in the Request, so there is a 1-n relationship.

If a product is not approved it has to be deleted from the Request, as in the following example


To delete the Product that has NOT been approved:

1. Iterate over the XPath of the Request-Products relationship

2. Remove the product that has not been approved with the Me.removeRelation statement.


 


 

DO NOT USE the Me.addDeletedEntities statement.


 

Delete Elements Using an Xpath expression

In the Insurance Policy Request process, there is a grid where the user inserts the Vehicle Security Device.


Image:HowToRemoveRelation image0012.jpg


If we want to delete only the elements in the grid that have the code 001 (Alarm), we can create an expression that navigates through the xpath and filters the elements in the relationship with this code. The rule in this case only states what is seen in the picture below. In the Data Model, VehicleSecurityDevice is a collection of VehicleCharacteristics, and that’s why it is seen as a grid. If the collection is filtered as in the image below, when the rule is excecuted, the rows matching the rule will disappear.


Image:HowToRemoveRelation image0013.jpg 


Image:HowToRemoveRelation image0014.jpg

<comments />