Help ELMA BPM Platform
×
Menu

Creating and Editing an Object Item Activity

Creating and editing an object item is an activity that allows creating new objects and editing the existing ones.
To create or edit an object item, place it in static or dynamic swimlanes. Apart from that, in the activity settings, the object type must be defined and the context variable with the corresponding object type must be added.
You can find this activity on the side panel of the Graphic model tab in the Plug-ins section.

Settings of the Creating and Editing an Object Item activity

To open the settings window of the Creating and editing an object item activity, double-click on it in the graphic model or select the Settings item in the item's context menu.
Common  tab
You can find an example of this tab in fig. 1.
Fig. 1. Settings of the Creating and Editing an Object Item activity. Common tab
This tab is partly similar to the Common tab of the Create Document activity.
The difference is that you need to select an object type in the settings of the Creating and Editing an Object Item activity. You can also select a form from the object type and specify the object type with a context variable.
Objects tab
You can find an example of this tab in fig. 2.
Fig. 2. Settings of the Creating and Editing an Object Item activity. Objects tab
On this tab, transfer the context variable from the Process Context to the Selected Variables. This context variable must have a system object as the data type. The created object will be stored in this variable during the process. This is how on this tab we define with which object the Creating and Editing an Object Item activity will work.
Please note that the context variable selected on this tab must be the same as the Object Type on the Common tab.
There are two ways to transfer the variable:
On this tab, you can also create a context variable with the object data type (if the variable had not been created on the Context tab of the process)
Use the Add button to create a context variable.
You can edit the selected context variable. To do this, click the Edit button. A context variable page will open where you can edit the variable. You can edit only those variables which are placed in the Selected Variables section.
Click Delete to delete a variable from the Selected Variables section.
Context tab
This tab is the same as the Context tab of the Edit Document activity.
Execution time tab
This tab is the same as the Execution time tab of the Make Decision activity.
Binding object attributes
This tab is partly similar to the Binding Document Attributes tab of the Create Document activity.
The difference is that when configuring the Creating and Editing an Object Item activity, you can match the context variable of the route with object attributes, but not document. The values of context variables will automatically be inserted into object attributes.

An example of using the Creating and Editing an Object Item activity to edit an object

In order to edit an object in a business process, use the User Task activity, which will specify the object that must be changed, before the Creating and Editing an Object Item activity (fig. 3).
Fig. 3. An example of Edit Object business process
In order to create an object, you must create a context variable and select the corresponding object as the data type. Add this context variable to a user task form and check the Required box (fig. 4). This context variable will store the object that has to be changed.
Fig. 4. Form (Context) Tab of the Choose an object item to edit task
After that, you need to create the Creating and Editing an Object Item activity in which, on the Common tab, you need to specify the Object type that you had selected for the context variable. On the Objects tab, add a context variable with the object that has to be changed.
After your business process is published, it will work in the following way:
The user task “Choose an object item to edit” contains a field with the required object type, in which you need to select an object that has to be edited from the drop-down list (fig. 5).
Fig. 5. Choose an object item task in the Web Application
It should be noted that a user must have permissions to view objects items to select one object items. These permissions can be granted in Administration – Users – Access Settings – Objects.
After an object item to edit is chosen, the Creating and editing an object item task is assigned (fig. 6).
Fig. 6. Creating and editing an object item task in the web application
The number of fields for this task depends on the attributes of the selected object, which can be changed on the corresponding tab when configuring the activity in ELMA Designer. These fields will be editable if while configuring this activity, the Forms from object type box was not checked on the Common tab. If this box was checked, the form Edit/Create had to be selected or a custom form with the editing option.
It should be noted that a user who gets the edit an object item task must have permissions to view and edit objects items. These permissions can be granted in Administration – Users – Access Settings – Objects.

An example of using the Creating and Editing an Object Item activity to edit an object

You can use the Creating and Editing an Object Item activity when you need to create a new object item in a business process.
For instance, this activity might be necessary in the Costing of a new product business process (fig. 7).
Fig. 7. The process map of the Costing of a new product business process with the Creating and Editing an Object Item activity
 
A new object item is created during the Add New Product task. To configure this task, choose the Products and Services object type on the common tab, and on the Objects tab create and add a context variable with the Products and Services data type (fig. 4).
To make it more convenient, we will configure the transfer of data collected during the Specification of the new product task to the new object item page. To do so, go to the Binding object attributes tab and create the context variables Name and Price (fig. 8).
Fig. 8. Settings of the Creating and editing an object item activity. Binding object attributes tab
After that, you need to add the created context variables to the Specifications of the New Product task. It is necessary to automatically transfer the information about the object item from the task to the object attributes.
Now the Name and Price fields will be filled in the user task. Creating and editing an object item activity will look like this in web application (fig. 9). The fields will be pre-filled, but they will remain editable.
Fig. 9. Add new product task in web application
It should be noted that the user who gets the task to create and edit an object item must have the permissions to add object items.  These permissions can be granted in Administration – Users – Access Settings – Objects.
The created item will be automatically added to the corresponding object.

Copyright © 2006–2019 ELMA