Business process setup guide (BPMS)
PDF
This documentation is valid for Creatio version 7.13.0. We recommend using the newest version of Creatio documentation.

Working with data

Business processes in bpm’online can interact with bpm’online records, which are generally referred to as “data”. A business process can let the user interact with data in a specific way, or work with data on the background, without the user involvement.

This article covers the principles of how business processes work with bpm’online section, detail or lookup records (a.k.a. “data”).

When and why do you need to work with data

Every practical task in bpm’online involves working with section, detail or lookup records. To automate these tasks, all business processes in bpm’online have to interact with data in one way or another.

Here are some of the more typical cases of working with data:

Business task

Bpm’online task

Process task

Schedule a meeting with the customer.

Create a new record in the [Activities] section.

Add new data

Set opportunity amount same as the opportunity budget

Obtain the value of the [Budget] field of a specific record in the [Opportunities] section

Read existing data

Modify the [Amount] field of the same record.

Modify existing data

Clear employee’s schedule for the next week

Delete records in the [Activities] section that have specific values in the [Owner] and [Start] fields.

Delete data

Example

Check bpm’online marketplace for free business process templates illustrating the examples of working with bpm’online data using business processes. Click here to download the template.

After installing the marketplace template, a new “Academy examples” folder will appear in the [Process library] section. It will contain 4 processes: “Read data process element”, “Modify data process element”, “Delete data process element” and “Add data process element”, each containing several examples of using the said element, covered in this article.

In all these cases, specific data must be accessed in a business process and specific changes must be made to the bpm’online database as a result.

When working with data, a business process can obtain it directly from the database, or use data that has been obtained earlier. Any data obtained from the database, generated by the process itself or entered by the user are available as the parameter values and can be accessed by the process at any time.

As you can see, working with data boils down to four basic operations: adding, modifying, reading and deleting data. In the next chapter we are going to examine how these operations are implemented in the bpm’online business process engine.

Operations with data

On the database level, all interactions with data boil down to four basic “CRUD” operations: creating, reading, updating and deleting records. Most business process tasks perform these operations automatically, as part of their logic:

In addition, there are four business process elements in bpm’online that are designed for performing each of the CRUD operations with data. Usually, data-specific tasks are used in the following cases:

  • [Read data] – regular process tasks require data that is not available in the process.

  • [Add data], [Modify data], [Delete data] – you need to create, update or delete bpm’online records on the background, without opening any pages or creating tasks for the process user.

Regardless of the use case, setup of each data-related process task includes several typical steps.

Read data:

  • Identify the object that contains the record to read and the columns whose values must be read.

  • Identify the record whose values must be read.

Add data:

  • Identify the object to add records in and the columns will be populated for the new record.

  • Identify the data, which will be written into the columns of the new record: these can be static values, or values obtained from other process parameters.

Modify data:

  • Identify the object that contains the record to modify and the columns whose values must be changed.

  • Identify the record whose values must be modified.

  • Identify the data, which will be written into the columns of the modified record: these can be static values, or values obtained from other process parameters.

Delete data:

  • Identify the object to delete records in.

  • Identify the record to delete.

As you can see, using the four basic operations in the bpm’online business process engine involves three general steps: identifying the object and the column, identifying the needed record and identifying the source of the new data.

Identifying objects and columns

As you can see, each data-related operation requires that you identify bpm’online object, which contains the needed data. Additionally, all operations (with the exception of the “Delete data”) require that you specify the columns, whose values must be read, added or modified. For example:

  • To schedule a meeting with a customer in bpm’online, you need to add a record in the [Activity] object and populate its [Subject], [Start], [Due] as well as [Contact] and/or [Account] columns.

  • To set amount of an opportunity same as its budget, you need to:

a.Read the value in the [Budget] column of a specific record in the [Opportunity] object.

b.Modify the [Amount] record in the [Opportunity] object, by setting its value to the one that you obtained from the [Budget] column.

  • To clear an employee’s schedule for the next week, you need to delete specific records in the [Activity] object.

All bpm’online data is stored as column values of records from different objects (Fig. 1):

Fig. 1 “Object - column - record” structure in bpm’online

scr_chapter_bpms_data_object_record_column.png 

To use the needed bpm’online data in your business process, you need to identify the needed object, columns and records:

  • The object (section, detail or lookup). Bpm’online objects are roughly equivalent to database tables. For example, the [Account] object contains all accounts, [Activity] object contains all activities, etc.

  • The object columns (a.k.a. “fields”). Bpm’online columns are equivalent to database table columns. For example, the “Name” column contains account names, “Created on” – the dates when accounts were created, etc.

  • The record (an “instance” of the object). Bpm’online records are equivalent to database table  rows. For example, a record is a particular account, contact, or activity.

Identifying necessary records

When looking for specific data, you usually know the object and the columns, since you understand what information is needed (e.g., “I need the name of a certain contact”). The trick is to identify the needed record (in this case, specific contact).

There are two ways of selecting records:

  • Using a logic condition, i.e., a “filter”. For example, you need to read, modify or delete all records in the [Activity] object, whose [Status] column contains “Canceled”.

  • Using a record Id, which can be obtained from a process or element parameter.

Identifying a specific record

Record Id is a column value that uniquely identifies a record in bpm’online database. Record Id is stored in the [Id] column, which is available in all bpm’online objects (Fig. 2). When working with business processes, you can obtain a record Id from process or element parameters.

Process parameters are special kind of process properties that store data used for process and element execution, as well as data that is the result of such execution. Read more >>>

Fig. 2 Schematic view of the [Id] column in the “Contact” object

scr_chapter_bpms_data_object_record_column_example.png 

There are three general cases of obtaining a record Id when designing a business process:

  • From a process parameter. Such parameters are usually available in processes that are used as sub-processes, as well as processes that are run manually, by a specific record.

  • From an object signal element – start [Signal] or intermediate [Wait for signal] events in the “Object signal” mode (triggered by changes in bpm’online records). Read more >>>

  • From an outgoing parameter of a process element, that was working with the needed record.

The following process elements work with data automatically and have outgoing parameters that store field values of bpm’online records:

  • [Perform task] – field values of the task activity, including its Id.

  • [Open edit page] – field values of the corresponding record.

  • [Pre-configured page] – if a data source object is set, the element has parameters for all of the object columns.

  • [Send email] – field values of the email record (“From”, “To”, Ids of linked records, etc.).

  • [Signal] – for object signals, Id of the record that triggered the signal.

  • [Wait for signal] – for record signals, Id of the record that triggered the signal.

  • [Sub-process] – any outgoing parameters of the business process selected as a sub-process.

You can identify the needed record by Id, obtained from process and element parameters when either of the following is true:

  • The process start element is [Signal] in the “object signal” mode (the process starts automatically, when data in a specific bpm’online object is changed).

  • The process is run by the needed record: initiated manually from the record page or as part as a dynamic case.

  • Previous process elements have already worked with this record, and you need to work with the same record repeatedly.

If the Id of the needed record is available in a process or element parameter, you can use parameter mapping to specify it in the filter area of the [Read data], [Modify data] or [Delete data] element (Fig. 3). You essentially need to create a filter by the [Id] column and select [Compare with Parameter] in the menu when specifying the column value.

Fig. 3 Filtering a record by Id

scr_chapter_bpms_data_filter_by_id.png 

In the opened window (Fig. 4), select the process or element that contains the parameter whose value will be the needed Id.

Fig. 4 Selecting a process parameter that contains the Id of the needed record

scr_chapter_bpms_data_start_signal_parameter_id.png 

As a result, the filter will always return one record, since two records cannot have same Id in bpm’online database.

More information about mapping parameters is available in a separate article.

Identifying a set of records via conditions

Usually you want to identify by using regular filter criteria if:

  • A process task must work with a selection of records: read a collection of records, modify or delete all records that match criteria.

  • A process task must work with a single record that match the selection criteria (“the first record in selection”).

To identify records using criteria, you need to apply a filter by the needed columns, using standard bpm’online filter module in conjunction with record sorting rules (Fig. 5).

Fig. 5 Example of selecting records using criteria

scr_chapter_bpms_data_filter_example.png 

For example, you can select latest completed call, by filtering activities by the type and status fields and sorting the results in the descending order.

More information about the filter functionality is available in the User Guide.

Identifying new data to write into columns when adding or modifying records

After finishing their operations with data, process elements pass data to their outgoing parameters for further use. For example, after an activity is created via the [Perform task] element, its Id and other data is passed to the outgoing parameters (Fig. 6). Using these parameters, you can access that same activity later, down the process flow.

Fig. 6 Parameters of a [Perform task] element with activity data

scr_chapter_bpms_data_activity_parameters.png 

The parameters match name and type of the corresponding bpm’online fields. For example, a contact’s job title is stored in a “String” (text) field and is passed to a “Text” parameter, while the due date of an activity is stored in a “Date/time” field, and is passed to a “Date/time” parameter.

Process elements for working with data and their use cases

In addition, there are four process elements for working with data specifically, one per each possible operation:

scr_process_designer_read_data.png 

Read data

Obtain data from the database for later use in the business process. The fetched data is stored in the outgoing parameters of the [Read data] element. Use cases:

scr_process_designer_add_data.png 

Add data

Create new records in the specified bpm’online section or lookup with the specified values in the specified fields. Use cases:

scr_process_designer_modify_data.png 

Modify data

Changes values of the specified fields of a specific section or lookup record. Use cases:

scr_process_designer_delete_data.png 

Delete data

Automatically deletes records in a specified object. Use cases:

See also

Process parameters

Did you find this information useful?

How can we improve it?