BPM with GeneXus Web - Create objects that will be part of the process

Official Content
This documentation is valid for:

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:


BPM__TrnCustomer_GenWeb

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:

BPM__CustomerSource_GenWeb

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:

BPM__TrnReservation_GenWeb

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).

BPM__TrnReservationRules_GenWeb

To assign a customer to the reservation, create a new object of Procedure type and name it AssignToCustomer.

BPM__ProcedureAssign_GenWeb

In the Source section of this Procedure, define what is detailed below:

Variables 

  • ReservationCode: Based on the ReservationCode attribute.
  • CustomerCode: Based on the CustomerCode attribute.

Rule

  • Parm(in: &ReservationCode, in: &CustomerCode);

Code (above, next to the opening key)

For each Reservation
    Where ReservationCode= &ReservationCode
                CustomerCode= &CustomerCode
Endfor
 

The image below shows exactly how it should look:

BPM__ProcedureAssignSource_GenWeb

Save the Procedure (CTRL +S).