After defining a Business Process Diagram, it is time to create the objects that will be part of the process.
To create a Transaction object, select File > New > New Object from the main menu. The following dialog box will be opened:
In the “Data Management” group, choose the Transaction object type and name it “Customer.”
Pressing the OK button will create the Transaction and keep it open and ready for you to define it as shown in the image below:
Where: CustomerCode* is a primary key and its Autonumber property is set to True.
After saving the Transaction (CTRL + S), the white circle displayed next to the Transaction name in the top tab will disappear.
Now, create the “Reservation” Transaction following the same steps you already did to create the Customer Transaction. It should look as shown below:
Where: ReservationCode* is a primary key and its Autonumber property is set to True.
CustomerCode? Here the question mark indicates that it accepts null values.
Now, define the following rule in the “Reservation” Transaction:
ReservationAvailable.Visible = False if Insert;
The reason is that the ReservationAvailable attribute should not be visible in the Transaction form when a reservation is entered (since this attribute is not used at that moment but when the reservation is already entered and you want to indicate whether it is available or not).
Save the changes (CTRL + S).
To assign a customer to the reservation, create a new object of Procedure type and name it AssignToCustomer.
In the Source section of this Procedure, define what is detailed below:
- ReservationCode: Based on the ReservationCode attribute.
- CustomerCode: Based on the CustomerCode attribute.
- Parm(in: &ReservationCode, in: &CustomerCode);
Code (above, next to the opening key)
For each Reservation
Where ReservationCode= &ReservationCode
The image below shows exactly how it should look:
Save the Procedure (CTRL +S).