Injecting Data into a Pageflow

You can inject data into a pageflow process multiple times while it is in progress, regardless of whether the flow from any previous occurrence is still in progress.

You can use an event handler to do this. An event handler is a catch intermediate event with no specific trigger and incoming flow that can be triggered by an external client application using the objectAPI. Note that the event handler does not have to happen for the pageflow process to complete.

You can update a pageflow local data cache using an event handler. For example, an event handler updates the exchange rate information regularly. A pageflow process used to manage an order request can use the updated exchange rate information when issuing an invoice.

The following example illustrates injecting data into a pageflow. It involves listing all the deployed pageflows, starting a pageflow, and while it is running, injecting data using an intermediate event.

Injecting a Pageflow Event

Procedure

  1. Find out the list of deployed pageflows by calling listPageFlows.

    This function returns the module version number, which is required as an input when calling the startPageFlow function.

    You can choose to start one of the pageflows returned.

  2. Call startPageFlow and specify the parameters module name and process name to start the selected pageflow.

    This returns the instance ID, which is required for the next step in which data is injected into the pageflow.

  3. Call the injectPageFlowEvent function.

    This injects the provided DataPayload into the formal parameters associated with the pageflow.