Business Process Designer > Business process modeling > Graphical elements / Update app item

Update app item

00.PNG

With the Update app item activity, you can automatically update app items in the course of a business process. For instance, you can add a file to a document's page, edit the total amount in a purchase order, change a customer's shipping address, or change the date of a supplemental agreement.

Using "Update app item"

For illustration, let's take a look at the Contracts app. When closing a sale, an employee enters and sends for approval all the related information, such as the total amount to be paid, payment dates, discount percentage and so on. At this moment, a new "Document" item is created. Its page displays all the introduced data, but the "Contract files" field remains empty because the file will be created later on in the process.

01.PNG

As soon as the finance specialist approves the entered data, QuickBPM creates the document's file from a template.

00.PNG

Now we need to add it to the File field of the contract's page. For that we shall use the Update app item activity so that users do not have to do it manually.

Setting up "Edit app item"

Go to the process page and open the System elements tab on the right pane. Drag the Update app item activity to the process diagram and place it where editing an app item will be necessary.

03.PNG

Double-click on its shape to open the settings. Enter the shape's name and specify a variable. This variable will refer to the app, which you wish to edit.

Select the variable from the drop-down list. If the process does not yet contain one, click Add new variable.

начало внимание

The Update app item activity only uses app-type variables.

конец внимание

04.PNG

Our process already contains the Contract variable because we are using the main app process. It is associated with the Contracts app and contains all the necessary fields.

If you are using a different kind of process, make sure to add this variable to the task which stands prior to Update app item in the process flow. Otherwise, users will not be able to select the items for editing.

Now open the Field values tab.

07.PNG

In the App field column, select the field that should be edited. In our case, this is the Contract files field. In the Process variable column, select a corresponding process variable. We have selected the File variable because it will store the contract generated from template.

Now, as soon as the data are approved, QuickBPM will generate the contract's file, save it to the variable and then add to the contract's page.

06.png

In a similar way, you can edit several app items at the same time. Let's say that you have edited an agreement's expiration date and want to also change this date in supplemental agreements. To do that, when adding the "Supplemental agreements" variable to the process context and to the Update app item activity, set the property switch to "many".

05.PNG

Now in the course of the process, users can select several supplemental agreements, and they will be edited automatically.