Designing the Process Pipeline
As a first step to creating this process flow, the developer planned out the entire pipeline before creating any records in Aptify. The developer decided upon the following 4-step process flow, as described in the following flowchart:
In this design, Steps 1 and 3 are VBScript rules that determine the course of action and Steps 2 and 4 use the standard Create Service Ticket CRUD component to create Service Tickets records. (Aptify automatically generates Create/Read/Update/Delete process components for each entity. See About the CRUD Process Components for details.)
As described in the flowchart, The designer decided to use the BeforeCommitTransaction event definition to fire this process flow during a Rental Agreements save operation. The developer chose this event for the following reasons:
- The VBScript rule in Step 1 uses the AptifyDataField.IsDirty property to determine if a vehicle's Rental Condition value has changed in this save operation. This property is available for the BeforeSave and BeforeCommitTransaction events but is not available once the saved charges are committed to the database (so querying a field's status based on the IsDirty property is not available to an AfterSave event).
- If the changes made to the Rental Agreement do not pass the entity's validation, the Process Flow will not fire (since the BeforeCommitTransaction event does not occur), which is the desired behavior. If the designer had chosen BeforeSave instead, the Process Flow would fire even if the record save ultimately failed due to a validation error (because the BeforeSave event occurs prior to validation). Since this process flow does not validate the Rental Agreements record itself, the BeforeSave event is not suitable for this process flow.
See About the Delivered Event Definitions for a description of the standard Event Definitions included with Aptify.
Having completed the design of the process pipeline, the developer moves on to the next step, Creating the Process Flows Record.
Copyright © 2014-2017 Aptify - Confidential and Proprietary