Design User centric and System centric components

Integrate IBM Business Process Manager with Hybrid MobileFirst application

Use IBM MobileFirst Platform Foundation through Secure Sockets Layer with IBM BPM Advanced

Ganesh Nagalingam
Geek Culture
Published in
10 min readApr 16, 2021

--

Note to Readers

This article was initially published in IBM developerWorks publication during the year June 2015 as shown below. As the links to this article has been moved, I wanted to republish it in MEDIUM to help Beginners and Intermediate who might be interested in this subject.

Article initially published in IBM developerWorks

Introduction

If a business process contains activities that communicate from Business Process Modelling Notation (BPMN) to Business Process Execution Language (BPEL), you can integrate IBM BPM Advanced with IBM MobileFirst Platform Foundation. Then process participants (business users) don’t need to be sitting in front of a computer. They can trigger the request from a mobile device and invoke a business process, which is an easy way to arrive at the same result.
This article walks through a business use case that defines the interaction between a hybrid MobileFirst application, the user-centric BPMN in IBM Process Designer, and the system-centric BPEL in IBM Integration Designer through Advanced integration services (AIS).
The solution used in this article shows how a business user can send a request from a mobile device and create a process instance in IBM Business Process Manager through SSL integration. When the process instance is created successfully, the process instance ID is returned back to the mobile device for reference. As human activities are involved, the business user claims the process instance using the IBM BPM Process Portal. In cases when only system activities are involved, human intervention is not required, and the business process is automatically completed on request from the mobile device.

Scope

This article shows how to integrate IBM® Business Process Manager (BPM) Advanced with hybrid MobileFirst application using the IBM MobileFirst Platform Foundation through a Secure Sockets Layer (SSL).

Prerequisites

IBM BPM Advanced
IBM Process Designer
IBM Integration Designer
IBM MobileFirst Platform Foundation
Eclipse
Android SDK

Overview of integration steps

This article illustrates integration techniques through a proof-of-concept.
First, create a stand-alone Process Center profile to use for the development environment. For test and production environments, create a Process Server and use it for application deployment.
a. Secure access to an HTTPS web service that is exposed by a business process definition (BPD) and is controlled by a worklight.properties file that checks for ssl.keystore.path, ssl.keystore.type, ssl.keystore.password.
b. The hybrid MobileFirst application communicates with an inbound web service exposed by a BPD in Process Center.
c. Integrate HTTP adapter through SSL between IBM BPM Advanced and hybrid MobileFirst application.
d. Generate SSL certificates. Create and configure keystore in worklight.properties.
e. Orchestrate BPMN to connect with BPEL through Advanced integration services.
f. Create a stand-alone Process Center profile in the development environment to publish and deploy business process applications and Service Component Architecture(SCA) applications in IBM BPM Advanced. An advantage is to have one Java virtual machine running, which benefits low-memory systems.
g. Create and deploy HTTP SOAP adapters in the IBM MobileFirst Platform Foundation.

Architecture

Fig 1. Architecture

IBM BPM Advanced is built on IBM WebSphere Application Server Network Deployment. The advantage of creating a stand-alone Process Center profile supports both Process applications and SCA applications.
The high-level integration diagram in Figure 1 shows the communication pattern between the hybrid MobileFirst application, the HTTP adapter that is deployed in IBM MobileFirst Platform Foundation, and the web service exposed by a BPD in Process Center. The BPMN connects BPEL through Advanced Integration Services(AIS).
Hybrid MobileFirst application sends a request to the HTTP SOAP adapter. The HTTP SOAP adapter is deployed in the IBM MobileFirst Platform Foundation (an IBM Liberty single-node template). The HTTP SOAP adapter sends an SSL request to the inbound web service exposed by Process Center. The web service returns a response that is converted into Java Script Object Notation (JSON) in hybrid MobileFirst application.

What is IBM BPM Advanced ?

Business process management is the systematic method of examining your organization’s existing business processes and implementing improvements to make your workflow more effective and more efficient. Every organization uses business processes to accomplish work. A business process is a set of business activities that represent the required steps to achieve a business objective. Business processes often require a combination of internal activities and activities that must be performed by humans. Therefore, you can look at business process management as the intersection between people, processes, and technology. The business process management approach is iterative as you design, model, create, simulate, monitor, and optimize your processes on a regular basis. The feedback you receive from testing and monitoring your processes drives continuous improvements to your organization’s workflows. The Process Center repository contains all IBM BPM assets. The high-level assets are process applications, toolkits, tracks, and snapshots. Both the business analyst and the integration developer contribute to the same process applications and toolkits. Process Designer contributes business processes and data types. Integration Designer contributes modules, libraries, and BPEL business logic.

Create a stand-alone Process Center profile using BPMConfig tool

A stand-alone Process Center profile has the advantage of publishing and deploying process applications and SCA applications respectively using a single profile. A stand-alone Process Center profile can be created using the BPMConfig command-line tool and giving the profile properties file as an argument. The next section gives details on how to create a stand-alone Process Center profile. Screen captures show the key properties to be set and the command to execute to make a successful profile creation.

You can take either a top-down approach or a bottom up approach to create, publish and unit test that will have one server profile running (one Java Virtual Machine) on the local machine. If you have low-memory systems, adopt the stand-alone Process Center approach, because it helps to store, test process applications and toolkits that are authored in IBM Process Designer and IBM Integration Designer.

Top-down approach
Create toolkits or process applications in the Process Designer that contain interfaces and business objects that can be imported into IBM Integration Designer where you implement the business logic. This approach is usually followed by stakeholders and business analysts.

Bottom-up approach
Developers and Architects, create SCA modules, implement, and test them. Import the toolkit or the process application into IBM Integration Designer in the Process Center perspective. Then the SCA module can be associated to a process application or toolkit.
A stand-alone Process Center profile has the capability to deploy process applications and SCA applications. Install the IBM BPM Advanced binary files.
The BPMConfig command-line tool takes the profile properties file as an argument to successfully create a stand-alone Process Center.

Complete the following steps:
1. Create a stand-alone Process Center profile from the command prompt by running the following command:
BPMConfig.bat –create –de standalonePC.properties
2. In the properties file, create set the values for your project as shown below. The key values to set for successful profile creation are shown in the following example properties file. Replace appropriate values as needed for your local setup.

Fig 2. profile.properties

Design and configure Hybrid MobileFirst application in the IBM MobileFirst Platform Foundation

IBM MobileFirst Platform Foundation, formerly IBM Worklight, helps enterprises deliver on their mobile strategy. It provides an open and comprehensive platform to not only build, but also test, run, and manage your native, hybrid and mobile web applications.
IBM MobileFirst Platform Studio offers leading tools for mobile applications development that help maximize code reuse and accelerate development.

Business value proposition

Enterprise Application Integration (EAI) provides an open, extensible framework for connecting applications within or between enterprises. EAI solutions ensure compliance and interoperability through open messaging, open queuing, open development tools, adapters (applications, web, ecommerce, communications, legacy, generic), and data standards (XML, EDI, HL7, Swift) across all major platforms. Within an EAI framework, web service integration exists at both the adapter and the business process level. Adapters provide communications and data transformation capabilities to enabling rapid integration into packaged, legacy and custom applications. Any of these applications can in turn access a web service or be called by a web service through a SOAP adapter to web service, which enables these existing applications. The adapter performs the hard work by mapping the existing system into the web service interface. A hybrid MobileFirst application can seamlessly integrate through HTTP adapters deployed in IBM MobileFirst Platform Foundation and invoke a web service exposed by a BPD in Process Center.
At the business process level, business process management solutions are used to control the flow of business process activities across the systems and users involved. BPM solutions typically offer process modeling, implementation, monitoring, management, and process optimization services to streamline processes and improve efficiency. A web service can be called as needed from any activity within a business process, and in turn, a larger business process can be exposed as a web service to be called by other systems or partners. A web service is an application that adheres to new connectivity standards (SOAP, WSDL, and UDDI) that are based on more mature Internet standards (HTTP and XML). This standards-based connectivity allows a web service implementation to dynamically discover and interact with other web services automatically. A stand-alone Process Center profile in IBM BPM Advanced, provides the advantage for systems that face low memory of having only one Java virtual machine running in a development environment. The profile helps to store, test and manage process applications and toolkits that are authored using Process Designer and Integration Designer.

The following subsections describe key integration features.

A web service exposed by a BPD in Process Center is an HTTPS service. In order to access an SSL service from a hybrid MobileFirst application, the certificate from the Process Center server must be imported and added to the keystore in the cacerts file. This certificate enables the mobile application to successfully invoke the web service in Process Center.
Figure 3 shows adapter checks for the SSL certificate in the configuration file before invoking the web service in Process Center.

Fig 3. SSL configuration

IBM MobileFirst Platform Foundation and adapter configuration

A web service can be discovered in hybrid MobileFirst application by choosing the appropriate adapter. To create a SOAP over an HTTP service, HTTP SOAP adapters are created and deployed in IBM MobileFirst Platform Foundation. As the web services exposed by Process Center are SSL enabled, certificates should be imported and converted as keystores and added to the cacerts file. The adapters check the worklight.properties file for the certificate path, type, and password before invoking the web service.
Figure 4 shows how to create and import certificates into keystore and add them to the cacerts file. This step is only required if the certificate of the back-end web service is not signed by a well-known certificate authority.

Fig 4. Create keystore using keytool

Deploy and run your process application

A stand-alone Process Center profile is used to publish and deploy process applications (BPMN) and SCA applications (BPEL/ESB).

BPMN in IBM Process Designer

The BPMN process connects to BPEL through Advanced integration services. The business process definition in the process application exposes an HTTPS web service that is consumed by a hybrid MobileFirst application. To start the business process, the hybrid MobileFirst application invokes the web service exposed by a BPD, which is executed by integration service encapsulated in a BPD. The integration service executes tw.system.startProcessByName to start the business process specified with input parameters received from the hybrid MobileFirst application, and it returns the processId for reference.
After the process payment activity is successful, an email is sent to the customer from the business process to inform the status, as shown in
Figure 5.

Fig 5. Business process Definition(BPD)

Process execution

Figure 6 shows the input values given in the Mobile Browser Simulator for Android. A business user executes a process in IBM Business Process Manager by sending a request, and a successful response is returned that has the process ID created in IBM BPM Advanced.
pId…258 and “success”:”true”
The business user submits the required data using a mobile device, which automatically creates a process instance ID in IBM BPM and returns a response to the mobile device to show the successful creation of the process instance ID with the ID 258.

Fig 6. Mobile browser simulator

The next section shows Business Process instance created in Process Portal that can be claimed. As the first activity in the process diagram is a human activity, it has to be claimed and needs human intervention.

IBM BPM Process Portal

Figure 7 shows the request sent from the hybrid MobileFirst application has successfully created a process instance in Process Portal. The Process instance (Process ID 258) is created in the IBM BPM Process Portal.

Fig 7. Process portal and process instance

Conclusion

We have reached the end and we have learnt how to integrate a hybrid MobileFirst application and IBM BPM Advanced through SSL configurations.
Create a stand-alone Process Center profile using the BPMConfig tool and passing the properties file as an argument.
The advantage of using a stand-alone Process Center profile in IBM BPM Advanced is that you can publish and deploy process applications and SCA applications in systems with low memory (for example, laptops) with only one Java virtual machine(JVM) running.

published on 17th April 2021

--

--