Using IBM MobileFirst to enable IBM BPM process applications in mobile environments

Mobile application developers can use IBM® MobileFirst Platform Foundation to enable mobile applications to access IBM Business Process Manager process applications. The IBM BPM adapter for MobileFirst solution consists of two adapters that provide access to the IBM BPM REST APIs on the IBM BPM server.

The generic and application-specific adapters are deployed on the MobileFirst server and provide a common way for applications that run on mobile devices to invoke REST APIs on IBM BPM servers. The mobile applications do not invoke the REST APIs directly. Instead, they invoke the procedures within the MobileFirst adapters. The adapter serves as a gateway that mediates the communication and access of the mobile applications to the IBM BPM backend server. It translates the procedure call from the mobile applications into the REST API invocation, receives the results from the IBM BPM server, and then passes the response back to the mobile applications.

To ensure secure connectivity, two firewalls are used in a typical setup, one between the mobile device and the MobileFirst server and another between the MobileFirst server and the IBM BPM server. The MobileFirst server is exposed behind a firewall in the DMZ of your enterprise, and the mobile applications are installed and run on mobile devices that exist behind an additional firewall, outside of the enterprise network.

The generic adapter

The IBM BPM servers provide a set of APIs that are implemented using the Representational State Transfer (REST) services. The APIs contain Uniform Resource Identifiers (URIs) that are used to access business process and task data.

The generic adapter provides access to the business process definition (BPD) runtime environment REST APIs that IBM BPM exposes for public consumption. When you develop a mobile application by using MobileFirst, the JavaScript code for your application invokes various procedures within the generic adapter instead of invoking the REST APIs directly. The following diagram illustrates how the generic adapter is used to provide access to the IBM BPM REST APIs.

The image illustrates how the generic adapter is used to provide access to the IBM BPM REST APIs.

The application-specific adapter

In addition to the generic adapter, users can also generate an application-specific adapter for a process application. The application-specific adapter provides a common set of procedures for each exposed BPD and case type that is found in the process application (and its dependent toolkits) for which the adapter is generated. Note that only the BPDs and case types that are exposed to the user who performs the export are included in the adapter generation. Therefore, if you want your admin user to export the application-specific adapter that has procedures for all the exposed BPDs and case types in your process application, you must add your admin ID or group as a member to the group of all the exposed items. The procedures form an abstraction layer that hides some of the IBM BPM specific details from the mobile application developer's view to improve developer productivity.

For example, the generic adapter might contain a procedure called startProcess which can be used to start an instance of a BPD. The required inputs to this procedure include the BPD ID and possibly the Process Application ID. In contrast, you may have a process application called OnlineBankingApplication which contains a BPD called CheckDeposit. The application-specific adapter that was generated for this process application includes a procedure called startCheckDepositProcess, which can be used to start an instance of the CheckDeposit BPD. The procedure does not require the BPD ID or Process Application ID parameters to be passed by the mobile application because that information would be contained in the procedure. The startCheckDepositProcess procedure within the application-specific adapter delegates to the startProcess generic procedure while supplying the application-specific details related to the CheckDeposit BPD.

The ability to generate an application-specific adapter for a specific process benefits a mobile developer who does not need to understand the low-level details of the BPD. The following diagram illustrates the relationship between the application-specific adapter and the generic adapter.

The image illustrates how the application-specific adapter sits on top of the generic adapter and is used as a higher level invocation of the processes.

For more information about IBM MobileFirst Platform Foundation, see the IBM MobileFirst Platform Foundation documentation.