80 Flexible Decision Automation for Your zEnterprise with Business Rules and Events
Figure 4-6 All fields required in the Vehicle business object
5. Now open and add fields to the Driver business object by repeating step 1 on page 79 to
step 4 on page 79, as shown in Figure 4-7, and add the fields:
Enter the name First Name, select the String data type, and then, click Finish.
Enter the name Last Name, select the String data type, and then, click Finish.
Enter the name Zip Code, select the String data type, and then, click Finish.
Enter the name House Number, select the Integer data type, and then, click Finish.
Enter the name Age, select the Integer data type, and then, click Finish.
Enter the name License Date, select the String data type, and then, click Finish.
Enter the name License Status, select the String data type, and then, click Finish.
Enter the name Number Accidents, select the Integer data type, and then, click Finish.
Figure 4-7 All required fields in the Driver business object
4.2.4 Creating the event
Next, you create the business event that is received from CICS. The event contains an event
object that stores the information that is required to populate the business objects.
Request_data event object: When emitting events from CICS, you can have only one
event object in which all the data fields are stored. This event object is called
Request_Data. This limitation means that the fields for both the driver and the vehicle are
placed in the Request_Data event object and then mapped to the correct fields of the
necessary business object.
Chapter 4. Decision server events 81
Creating the event
To create the event, follow these steps:
1. Right-click the RequestForQuote project, and select New Event.
2. Select Create a blank event, and click Next.
3. Enter the name Request for the event, and click Next.
4. Leave the connector set to None, and click Finish.
Creating the event object
To create the event object, follow these steps:
1. Right-click the Request Event and select New Event Object. Then, select Add a new
blank Event Object.
2. Enter the name Request_Data, and select the RequestForQuote event project and
Request event, as shown in Figure 4-8.
Figure 4-8 New Event Object
3. Click Finish, and the event object is generated.
Next, you must add the required fields to the Request_Data event object.
Creating the event object fields
The data fields for both the driver and the vehicle are added to the Request_Data event
object, because events emitted from CICS can contain only one event object. This scenario
requires the event to contain both the driver and vehicle information. This scenario uses the
Configuration note: You configure this connector for the event in 4.2.7, “Configuring
the technology connectors” on page 87.
82 Flexible Decision Automation for Your zEnterprise with Business Rules and Events
mapping capabilities in the Event Designer to map the fields from the Request_Data event
object into the correct Vehicle and Driver business objects.
To create the event object fields, follow these steps:
1. The Request_Data event object opens in the Event Object Editor after it is created in the
previous steps. If it does not open, double-click the Request_Data event object to open it.
2. Click Add in the Fields section to add a field to the event object.
3. Specify the name of the first field as First_Name, and then select the String data type.
4. Click Finish to create the first field.
5. Repeat this process for all the fields that are described in Table 4-1 to complete a full list of
fields, as shown in Figure 4-9.
Table 4-1 Fields required in the Request_Data event object
Figure 4-9 The event object with the completed list of fields
Field Name Field Data Type
First_Name String
Last_Name String
ZIP_Code String
House_Number Integer
Age Integer
License_Date String
License_Status String
Number_Accidents Integer
ID String
Make String
Model String
Value Integer
Typ e St ring

Get Flexible Decision Automation for Your zEnterprise with Business Rules and Events now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.