You are here:
Process Contract
A Process Contract defines the sequence of actions carried out during the execution of business processes such as orders, promotions, and visits. These actions can be user actions or system actions on the Offline mobile app or can be other actions carried out in the background. Each business process has a unique process contract in XML format. A Process Contract instantiates objects, processes, and events and controls the UI.
Examples: The Visit_RetailStoreCockpit (Visit_RetailStoreCockpitProcess.processflow.xml) process contract defines the flow of actions during the visit execution process. The Order_CopyProcess process contract defines the flow of actions for the copy order functionality.
Use a process contract when you want to:
- Load data through business objects and list objects
- Call business logic functions
- Call other processes from other UI pages
- Trigger validations
- Store data in process variables
A Process Contract can have multiple subprocesses that link several business processes. Example: A retail visit flow process contract has subprocess contracts that shows visit details, visit tasks such as start and end visits, or updating visit status. The relationship between these process contracts is hierarchical. A parent process contract usually represents a complete business process such as creating an order, creating a promotion, and a retail store overview.
Structure of a Process Contract
<Process name="MyApplication::OverviewProcess" defaultAction="ShowOverview" schemaVersion="1.0">
<Entry>
<!-- Entry element definition -->
<ProcessContext />
<EntryActions />
</Entry>
<Body>
<!-- Body element definition -->
<Actions />
</Body>
<ExitHandlers>
<!-- ExitHandlers Element definition -->
</ExitHandlers>
</Process>
Sample Process Contract
Here’s a sample process contract that shows visit details in the Retail Store Cockpit.
<Process name="Visit::DetailsProcess" defaultAction="showVisitDetails" schemaVersion="0.0.0.5">
<Entry>
<ProcessContext>
<Declarations>
<Declaration name="RetailStoreDetail" type="BoRetailStore" />
<Declaration name="Account" type="BoAccount" />
</Declarations>
<Parameters>
<Input name="BoVisit" type="BoVisit" />
</Parameters>
</ProcessContext>
<EntryActions>
<Action actionType="LOAD" name="LoadRetailStore" type="BoRetailStore">
<Parameters>
<Input name="pKey" value="ProcessContext::BoVisit.StoreId" />
</Parameters>
<Return name="ProcessContext::RetailStoreDetail" />
</Action>
<Action actionType="LOAD" name="LoadAccount" type="BoAccount">
<Parameters>
<Input name="pKey" value="ProcessContext::BoVisit.AccountId" />
</Parameters>
<Return name="ProcessContext::Account" />
</Action>
</EntryActions>
</Entry>
<Body>
<Actions>
<Action actionType="View" name="showVisitDetails">
<UIDescription>Visit::DetailsUI</UIDescription>
</Action>
<Action actionType="View" name="ShowDetail">
<UIDescription>Visit::DetailsUI</UIDescription>
<Events>
<Event name="editVisit" action="showRetailOverview" />
</Events>
</Action>
<Action actionType="View" name="showRetailOverview">
<UIDescription>Visit::RetailStoreCockpitUI</UIDescription>
</Action>
</Actions>
</Body>
<ExitHandlers>
<ExitHandler handlerName="beforeExit1" type="Validate" name="ProcessContext::BoVisit">
<OnValidationError transitionTo="showVisitDetails" />
</ExitHandler>
</ExitHandlers>
</Process>
- Process Contract Elements
Know the purpose and structure of each element in a process contract. - Considerations, Limitations, and References for a Node
There are certain standard checks to be performed for each node while creating, cloning, or modifying a process contract. - Barcode Scanning
Supported standard codes, compressed UPC codes, and compressed EANs for barcode scanning in the application.

