This article describes how to associate the objects with each of the tasks defined in a Business Process Diagram.
In the “Reservation” task, associate the Transaction of the same name (which will enable the user to enter a reservation to initiate the process). To do this, first select the task and in its Type property choose the “User” value
Next, in the Application property of the same task, assign the “Reservation” Transaction as shown:
Concept of Relevant Data: Relevant Data allows defining variables that are global to the business process. In other words, the data contained in these variables can be queried or modified throughout the entire process.
Now, associate a relevant data item with the “Reservation” task. This will make it possible to manage the transfer of information between tasks in the flow. In this case, the relevant data to generate is ReservationCode.
To do so, go back to the Application property of the Reservation task and click on the three dots displayed.
The dialog shown below will open:
Here, try to open the combo, then select the "+" sign and “ReservationCode” will be automatically filled in (you do not have to type it). This feature is automatically available only for primary keys. That is, automatic mapping is performed between the relevant data item and the primary key attribute. It is possible to define other relevant data items that are not primary keys, but this must be done explicitly in the Source section of the Business Process Diagram.
When executing the “Reservation” Transaction, the ReservationCode relevant data will be associated with the identifier of the reservation entered.
Now look at the “Source” tab of the Diagram. By clicking on it, you will quickly see the definition of the relevant data you have defined:
To continue defining the flow, it is necessary to define the conditions to be evaluated for each of the connectors coming from the Gateway “Is a Customer?”
As shown in the previous image, select the connector that comes out of the Gateway “Is a Customer?” and goes to “Reservation Availability.” In its “Condition Rule” property, click on the symbol and a condition editor will open for you to define the following:
Reservation.CustomerCode > 0
This condition evaluates, in the Reservation Transaction, if the CustomerCode was filled with some value (and since it is a foreign key there, that customer value must exist). If so, it moves on to the “Reservation Availability” task.
Now, configure the other connector that comes from the “Is a Customer?” Gateway and goes to the “Add Customer” task:
In its “Condition Type” property, choose the “Default” value as shown. This means that, if none of the other connectors of the Gateway are met, this is the one that will be followed.
Configure the following properties of the “Reservation Availability” task:
- Type = User
- Application = “Reservation” Transaction, and in that same dialog, assign the ReservationCode relevant data item as you have done in the “Reservation” task.
If the reservation is available, the process ends. Otherwise, the flow returns to the initial task to change the details of the reservation.
Select the connector that comes from the “Is it Available?” Gateway to the “Reservation” task:
Also, in its Condition rule property, enter:
This definition is an evaluation; i.e. if the reservation is not available, it will return to the task that involves modifying the reservation data.
On the other hand, the connector coming from the “Is it Available?” Gateway to the end of the process must have a connector of Default type:
Next, configure the “Add Customer” task. Assign its properties:
- Type = User
- Application = “Customer” Transaction and, in the same dialog, assign the CustomerCode relevant data item.
By clicking on the “Source” tab of the diagram, you will see that the relevant data definition has been updated:
To complete the flow, it is necessary to define the assignment of the customer to the reservation. So, once the customer has been entered, he/she should be automatically assigned to the reservation. To do this, to the “AssignToCustomer” task, assign the Procedure of the same name.
Then, configure the “AssignToCustomer” task properties:
- Type = Script
- Procedure = AssignToCustomer object with the relevant data items ReservationCode and CustomerCode.
All the objects are now associated with each of the tasks in the flow.
Save (CTRL + S) and you will see the diagram as follows: