Mobile Users Need Their Complex Processes to Work

Requirements for integrating offline mobile apps with enterprise systems go well beyond simply creating, reading, updating and deleting data.

One of the more challenging areas for offline apps is supporting complex data models and relationships that need to be available offline and enforced during sync to avoid orphaned records, cascading errors and data loss.

Orphaned records are caused when data is synced to a backend system out of order. Take a real-world example of creating an opportunity, adding products to a quote with discounts and submitting the quote for approval. The opportunity has to be created before the quote, so when the quote is created it can be associated to the opportunity. If this order is switched or is not properly enforced then there will be a quote that is not associated to an opportunity and an opportunity that is not associated to a quote. The same is true for products and discounts – a quote must be created first to associate them with. The approval should not be submitted until the quote data is complete.

If opportunity creation fails and the enterprise system requires that a quote must always be created against an opportunity, attempting to create the quote will just result in an error. Without the quote, attempting to create products and discounts will cause errors and starting the quote approval process also will fail, leading to a cascade of errors.

Enterprise objects often have state models to control their lifecycle. For example, a quote may have a “Status” field with values such as “In Progress, “Pending Approval”, “Approved” and “Order Submitted”, with logic executed in the enterprise system based upon a change in this value. When the quote is modified, all changes must be successfully applied before the status field value is changed. If the backend system logic does not allow modification of quotes in “Approved” status, all products and discounts must be created before the value of the status field is changed to “Approved”, otherwise the system will reject any changes to the quote after the status changes and some of the products or discounts will not be included on the quote.

Interrelated Order Object Diagram

The TethrOn Solution

TethrOn is designed to manage the most complex enterprise data models and relationships through system configuration, not coding. The Tethron common data model (CDM) contains the definition of all objects, fields, metadata and relationships configured in the system.

When modified data is received from a mobile device, the TethrOn server traverses the CDM to build a map of all the dependencies within the data. The map is checked to ensure that all prerequisites are fully met before it performs any actions against backend systems. Actions without dependencies are performed immediately and are executed in parallel to minimize user wait time. Actions that have unmet dependencies are skipped. The map of dependencies is updated when each backend action completes. Actions that now have all of their dependencies fulfilled are performed and the process repeats until all actions have been completed.

Continuing the example above, TethrOn will attempt to create the opportunity first. If the opportunity did not completely synchronize with the server, or if creation of the opportunity failed (field value violation, backend system unavailable, etc.), execution of the quote, product, discount and approval actions would be deferred until the opportunity had been created. Once the opportunity is created, quote creation will no longer have any dependencies and TethrOn will attempt to create the quote next. This process continues down through products and discounts until all of them have been created with the correct associations.

Enterprise systems expose a collection of work flows, services and engines that are incorporated into business processes. TethrOn provides a flexible event model to trigger actions against these processes in backend systems. The quote approval is an example of an action that must be triggered at the appropriate point to complete the business process.