Understanding flow processing in offline mode
With correctly configured flows that create cases, users can complete assignments, even when an offline-enabled mobile app is not connected to a network. With the following guidelines, you can ensure that your offline-enabled mobile app operates reliably.When you design an application that users can access with an offline-enabled mobile app, you configure case types as offline-enabled. Each of those case types must contain flows that are either a standard back-to-back assignment flow that starts with an assignment or a screen flow.
Flows and subprocesses
In the context of offline-enabled mobile apps, flows and subprocesses have the following features:
- You can execute flows, including flows that create cases.
- You can expand flows, and only the following shapes are supported offline:
- Assignment shapes.
- Question shapes.
- Decision shapes with decision tables, when rules, decision trees, decision maps, and simple Boolean expressions that run on the client.
- Decision shapes that are the first shapes of screen flows.
- Utility shapes that are at the end of the screen flow. The utility does not run when offline but becomes available online when the completed assignments are sent to the server during synchronization.
When the flow reaches any other shape when offline, the flow processing stops.
When you design applications that use subprocesses, consider the following information:
- When offline, a subprocess can run for the current work item in the following situations:
- The subprocess is in the main flow.
- The subprocess consists of another nested subprocess.
- The subprocess is located next to an assignment shape.
- Offline-enabled apps support changing the path of a flow based on likelihood values for connectors that leave a subprocess. When the results of two connectors match, the offline processing engine selects the one with the highest likelihood value.
Further application design considerations:
- When you build an application on top of another application, in cases that you use in offline-enabled mobile apps, save the flows from the original application in the class of the current application, and do not reuse flows instead.
- A worklist that is displayed in an application that users access with an offline-enabled mobile app must be of the Assign-Worklist class.
- You can create work with parameters.
- The pyWorkParty page is not supported in offline mode. Modify the logic in the application to not refer to this page.
pega.process.flow.setFlowEndStatus()method to set a flow result. This method overrides the status that is set with a property in the end shape of the subprocess.
- Users can route assignments to other users. The Review page is displayed for the user to confirm the operation. The assignment is actually routed to a new assignee when the flow is synchronized with the server.
- The confirmation page that is used in cases is the one that is set on the pyStartCase flow.
- The latitude and longitude coordinates are recorded for assignments that are performed in offline mode.
- Both the client and the server processing date/time stamps are recorded for each assignment that is completed in offline mode. The
datetimestamp in the audit trail is populated during data synchronization with the then current server date/time value.
- Offline-supported flow processing features
Offline-enabled mobile apps support a selected set of flow processing features. To ensure that your application operates reliably without a network connection, get familiar with the flow processing features that are supported in offline mode.
- Enabling offline support for case types
You can work on assignments and create cases while your device is offline. By enabling offline support for a case type, you allow case workers to move cases closer to resolution while your application is disconnected from the network.
- Understanding data transform support in offline mode
- Creating a stand-alone process
Create a stand-alone process, or flow, to support or supplement the steps in a case life cycle. By creating a process outside the context of a case life cycle, you can reuse the process in other cases.
- Calling one process from another process
You can add a subprocess to a process in a stage to call an existing flow in your application. By using subprocesses, you can compartmentalize functionality and simplify the presentation of a process in a case type.
- Types of processes (flows)
You can create different types of processes, or flows, based on the shapes or steps that you choose or way that you integrate your process with the case life cycle. By understanding what distinguishes one flow type from another, you can select the configuration options that meet your business needs.