Skip to main content

2. Building the data model

In this tutorial you extend the event store from the Fast track by hand. You add the Background check object with two activities, add an activity from a workflow table, and bring both into the Application process. You keep working in the workspace Tutorial 1 & 2 - your user name.

Step 1: Add a new object​

  1. Select Event store in the sidebar, then + Object.
  2. Fill in the Create new object dialog:
    • Source: File uploads → background_checks
    • Object name: Background check
    • Object identifier: select Select column and choose backgroundid
  3. Select Create draft object.

Create a new object

Step 2: Configure the object​

The object page opens. The source table is shown at the bottom; hover over a column header to see Add attribute, Add activity and Relate object.

  1. Hover over customerid and select Relate object.
  2. Under Object, choose Customer. The Background check join key is filled in already; under Customer, select Select column and choose customerid.
  3. Select Create relation. Relate object
  4. Hover over success and select Add attribute.

Step 3: Add activities from the object table​

Timestamp columns in the object table can become activities directly.

  1. Hover over start_datetime and select Add activity. The Relate activity to 'Background check' dialog opens with the timestamp filled in.
  2. Enter Start background check as the Activity name and select Create draft activity. Add activity from the object table
  3. Open Start background check from the Activities panel.
  4. Hover over initiatedby and select Add attribute.
  5. Rename the attribute to Resource: hover over initiatedby in the Attributes panel and select the pen icon. In Attribute name, choose Resource from the list, which shows names already used in the event store, and select Save attribute.
  6. Select Save & process.
  7. Go back to Background check through the Related objects panel and repeat steps 1 to 6 for checkfinished, with the name Finish background check.
  8. On Background check, select Save & process.

Step 4: Add an activity from the workflow table​

Activities do not have to come from the object's own table. See Activities for the ways activities can be stored.

  1. Select Event store in the sidebar. The Table column shows that the Application activities come from application_header and application_status_history.
  2. Select Sources in the sidebar. The table application_workflow shows the status Not in use; select it to preview its contents.
  3. Go back to the Event store and select + Activity.
  4. Fill in the Create new activity dialog and select Create draft activity:
    • Source: File uploads → application_workflow
    • Timestamp: created_datetime
    • Activity name: Validate application Create a new activity
  5. In the Filters panel, select Filter. Set workflowstep Equals Validate application, select + Filter, and set lifecycle Equals complete. Select Preview filters to check the result, then Save filters. Add a filter to the activity
  6. Hover over userid, select Add attribute, and rename it to Resource as in step 3.
  7. Hover over applicationid and select Relate object. Under Object, choose Application; under Application, choose applicationid. Select Create relation. Relate the activity to Application
  8. Select Save & process.

Step 5: Add the new object to the process​

  1. Select Processes in the sidebar and open Application process.
  2. Select the + on the Customer node and choose Background check.
  3. Select Process and wait until the status shows Processed. The process shows a warning banner while it has unprocessed changes.
  4. Switch to Process flow to see Start background check, Finish background check and Validate application in the flow.

Your event log now includes the new object and activities. The next tutorial goes deeper into processes.