Contents


Digital process automation with BPM and blockchain, Part 1

Combine business process management and blockchain

Comments

Content series:

This content is part # of # in the series: Digital process automation with BPM and blockchain, Part 1

Stay tuned for additional content in this series.

This content is part of the series:Digital process automation with BPM and blockchain, Part 1

Stay tuned for additional content in this series.

Business process management streamlines business processes within an organization where participants normally trust each other. In contrast, blockchain enables the execution of business processes across multiple organizations and untrusted participants.

Have you ever considered combining these approaches to reach the next level of integration and automation of business processes? This series helps you do just that.

In Part 1, learn how a combination of business process management and blockchain technologies leads to smarter business processes. Then, discover blockchain services and implement service flows and a business process. You learn to work with blockchain assets in your business processes.

The issue: inconsistent data and lack of trust and transparency between multiple participants

For more than a decade, business process management served as a framework for streamlining business processes in an organization, improving the overall transparency, efficiency, and the ability to execute consistently. IBM® Business Process Manager (BPM) innovations in areas such as case management, event processing, business rules, and integration mechanisms help organizations to address strategic business goals by implementing new and continuously improving existing business processes.

To run efficiently, business processes rely on data from information systems. However, what happens when data is created and modified in information systems outside of an organization? A common procedure today is moving the data that processes need between fragmented information systems. This approach is complex and expensive and often results in outdated and inconsistent data. And more concerning, lack of transparency and trust is the consequence.

The following illustration shows six collaborating organizations that interact with vehicles, such as a manufacturer, a dealer, and a leasing company. Each organization maintains its own information system with a subset of asset data, for example, vehicle data. If vehicle data that is relevant to the dealer is updated in the information system of the manufacturer, it also needs to be updated in the information system of the dealer.

Illustration of parties in the network using fragmented information systems
Illustration of parties in the network using fragmented information systems

Enter blockchain

Blockchain technology can be an answer to interoperability, trust, and transparency issues in fragmented systems. At its core, blockchain is a distributed ledger of asset and transaction records. Smart contracts control the execution of transactions between untrusted parties and ensure that contractual conditions are met, and obligations are enforced. Permissioned blockchains ensure that all information and transactions on the blockchain are available only to network members with the right permission.

Early blockchain pilot projects across the industry are exploring ways to use a blockchain as a registry of assets - physical assets, such as cars, but also digital assets, such as music.

The following illustration shows the various parties in a network that use a shared ledger, instead of the fragmented systems in the previous illustration.

Illustration of                     parties in the network using a                     shared ledger
Illustration of parties in the network using a shared ledger

In business process management terms, the asset lifecycle is like a choreography that involves multiple participants, who all have their own business processes. These individual processes interact with one another through message-based interfaces that adhere to individual contracts between pairs of participants.

However, if the business network includes a distributed ledger that maintains a single version of the truth, the ledger provides the interface. Participants retrieve and update information on the ledger, and react to events when information is updated by others. By using a distributed ledger as the underlying system of records, all participants can achieve significant business process improvements.

Blockchain in action

If you're not familiar with what blockchain can do, take a look at the IBM Blockchain car lease demo. The demo walks through the lifecycle of a car from its inception through to disposal and shows how each stage of the supply chain can be recorded on a blockchain.

In the initial step of the scenario, the government regulator creates the registration for the new vehicle and stores it on the blockchain. The regulator then transfers the ownership of the vehicle to the manufacturer by invoking a transaction on the blockchain. The manufacturer builds the vehicle and adds relevant vehicle details to the vehicle template on the blockchain. Next, the vehicle is sold to the dealership and then transferred to the leasing company. After the car is leased to the new owner, the blockchain is updated again with the owner's details. Finally, at the end of the car's life, the scrap merchant can update the blockchain to show that the vehicle has been disposed of.

Try blockchain for yourself by deploying the IBM Blockchain car lease demo to IBM Bluemix®. Get artifacts in GitHub at IBM-Blockchain/car-lease-demo.

A perfect match: business process management and blockchain

Because the demo focuses on blockchain concepts, it does not take into account the internal business processes that run behind the scenes at each of the involved parties. To incorporate a business process management approach, consider what a business process at the dealership might look like.

The process might start with a customer walking into the dealership to buy a new car. She describes her ideal car to the sales person who then looks through the list of cars that are currently available. Luckily, there is a car that perfectly fits her needs, and she decides to buy it on the spot.

Instead of paying by cash, she chooses a leasing contract with a down payment. The sales person enters the customer's details and requests an offer from the leasing company. The customer agrees to the offer and signs the contract. She makes the down payment, and the ownership of the car is transferred to the leasing company. The happy customer receives the car keys and drives off in her new car.

For the process to work smoothly, several interactions with the blockchain are needed, shown in orange in the following diagram: Get vehicles I own, Get data of the vehicle the customer wants, and Transfer vehicle ownership to Leasing Company.

Screen capture                 of a sales process interacting with the blockchain
Screen capture of a sales process interacting with the blockchain

You see that the process kicks off by retrieving a list of the cars that the dealer owns. The sales person uses the list to help the customer find a car.

The subsequent step queries the blockchain again for details of a particular vehicle. After the sale, the car ownership information is updated on the blockchain.

In practice, the process might also use business rules to support decisions, provide supporting documents where needed, and use external services and events to check for credit worthiness, incoming payments, or received documents.

You could make the process even smarter by including more interaction with the blockchain, such as reacting to events on the blockchain that indicate fraud or other incidents. These events could directly initiate new business processes and ensure that appropriate actions are taken by the right people. The following illustration shows events on the blockchain initiating a business process to resolve incidents.

Illustration of events on the blockchain                     initiate a business process to resolve incidents
Illustration of events on the blockchain initiate a business process to resolve incidents

This example shows how business process management and blockchain complement each other and how a combined solution clears the way for the next level of integration and automation of business processes.

The following sections show details for implementing an IBM BPM and IBM Blockchain solution. Learn how to query assets and invoke transactions from a business process.

Work with blockchain assets in your business process

Dive deeper into the implementation details and learn how processes can interact with blockchain data by querying data and initiating transactions on the blockchain.

The tutorial walks through the following steps in detail:

  1. Discover IBM Blockchain services from IBM BPM.
  2. Create a service flow that uses the discovered service to retrieve asset data and make it available in the process.

    Assuming your prior knowledge of business process development, the tutorial also covers the following steps in less detail:

  3. Create another service flow that uses the discovered service to perform a transaction on the IBM Blockchain.
  4. Develop a simple process for business users to work with the IBM Blockchain data and initiate transactions.

To see how to implement the scenario with IBM BPM, you can download a sample .twx file from GitHub at LarissaAuberger/bpm-blockchain.

What you need for this tutorial

The scenario in this tutorial requires IBM BPM V8.5.7 with cumulative fix 2017.03 and a blockchain business network built with Hyperledger Composer running on Hyperledger Fabric. Hyperledger is a Linux Foundation project. Hyperledger Fabric is an open source implementation of blockchain technology. Hyperledger Composer is a set of open-source development tools, which run on top of Hyperledger Fabric for rapidly developing blockchain business networks.

Consider the following prerequisites for this tutorial:

  • IBM BPM: If you don't have the required level of IBM BPM available, consider using IBM BPM on Cloud instead. Follow instructions to register for a free trial.
  • A blockchain business network: This tutorial uses the digital property network example provided with Hyperledger Composer. The digital property network includes participants who want to buy or sell digital properties. It also provides interfaces to create and remove digital properties or to update their attributes, such as their ownership. See Installing Hyperledger Composer and Installing and developing with Hyperledger Composer in the Hyperledger Composer documentation. Hyperledger Composer includes the composer-rest-server package that provides an easy way to set up a REST API server that works with the business network. After you deploy the business network, generate the REST API.
  • Service discovery from IBM BPM: You need a Swagger definition of the generated REST APIs. To retrieve the Swagger definition, go to http://localhost:3000/explorer/swagger.json and save the Swagger definition to your local directory. To make the file easier to read, you can format it using the JSON formatter at http://jsonformatter.org.
  • Hyperledger Composer REST API server: Ensure you can reach the server from your IBM BPM environment.

Then, get sample code from GitHub at LarissaAuberger/bpm-blockchain.

Get started

Understand the process that you implement in this tutorial. When the business process starts, it interacts with the digital property network to retrieve digital properties from the business network. At the end of the process, a transaction is performed on the digital property network to update the digital property. Between the start and the end of the process, there is a generic process that implements whatever is needed to work with the assets, as shown in the following illustration:

Screen capture of                     example business process
Screen capture of example business process

Note: You can use other Hyperledger Composer business networks to integrate with IBM BPM. All you need is the Swagger definition file that describes the REST interfaces of your chosen application, so that you can discover services and use the services as described in this tutorial.

Discover your IBM Blockchain service

  1. In a browser, log in to your web Process Designer.
  2. Create a Process App and open it in the web Process Designer.
  3. From the library, create an External Service, by selecting Services > New > External Service.
  4. In the New External Service wizard, select Java, REST or Web Service, and click Next.
  5. As shown in the following screen capture, select Browse local files (Swagger) as the method to discover the service, and navigate to the Swagger file that you previously copied to your local file system. Then click Next.Screen capture of                     New External Service wizard
    Screen capture of New External Service wizard
  6. Some of the operations defined in the Swagger file need a programmatic approach for their invocation. These operations will not be part of the service interface. To invoke these operations, you create a script task and invoke them using a JavaScript API. Review the operations listed, as shown in the following screen capture, and click Next.Screen capture of                     New External Service wizard
    Screen capture of New External Service wizard
  7. On the next window, you can see that the operations were automatically discovered, as shown in the following screen capture. Specify the operations to include in the generated service, and then they are available for invoking through service tasks. Click Next. Screen capture of                     New External Service wizard
    Screen capture of New External Service wizard
  8. Create a server to invoke the REST service. Give it a name like swaggerServer. You define its configuration in a later step. Click Finish.

Explore the generated artifacts

  1. In the web Process Designer under Services > External Service you see the generated service. As shown in the following screen capture, the generated service contains the operations that you selected in step 7 with their input and output parameters and respective business object types, as defined in the Swagger definition.Screen capture of                     External Service wiindow
    Screen capture of External Service wiindow
  2. In the web Process Designer under Data > Business Objects you see business objects that are discovered based on the specification provided in the Swagger definition, as shown in the following screen capture:Screen                             capture of the web Process Designer, Data tab
    Screen capture of the web Process Designer, Data tab

Configure the REST Server

The generated external service points to a server. Now you need to specify the connection information for this server.

  1. Navigate to the Process App Settings. Select the Servers tab – you see the server that you specified in Step 8. For this server, make sure that the REST Server is selected as the type.
  2. For the Default environment, specify the host name and port of the REST server that you configured as part of the prerequisites. Save the configuration.

Create a service flow

Now create the service flow to retrieve the available digital properties from the blockchain.

  1. From the library, click Services > New> Service Flow.
  2. Specify a name for the service flow, for example, Retrieve Properties. Then click Finish.
  3. Under Variables, define an output variable with the type LandTitle, and select Is list, as shown in the following screen capture:Screen                             capture of Variables tab
    Screen capture of Variables tab
  4. On the Diagram tab, drag a Service Task onto the canvas, give it a name (for example, retrieveProperties), and wire it.
  5. In the Implementation tab in the properties, select the generated External Service as the implementation and LandTitle.find as the operation, as shown in the following screen capture. Screen capture                     of Implementation tab
    Screen capture of Implementation tab
  6. In the Data Mapping tab in the properties, leave the parameter filter blank (this returns all available digital properties) , as shown in the following screen capture. For the output mapping, specify the variable you created in the earlier step (tw.local.landTitle).Screen                             capture of properties screen
    Screen capture of properties screen

Try it yourself: Implement another service flow

Now it's your turn!

  1. Based on the following diagram, implement another service flow to retrieve a property for a given ID, change the owner of the retrieved property, and then update the property details on the blockchain.Screen                             capture of the process diagram to retrieve the property, set                             new owner, and update property
    Screen capture of the process diagram to retrieve the property, set new owner, and update property
    • To update the property, use the LandTitle.replaceById operation, as shown in the following screen capture: Screen                             capture of Properties Implementation tab
      Screen capture of Properties Implementation tab
    • Use the data mapping in the following screen capture. The data of a LandTitle type is the updated record of the property:Screen                             capture of Properties Data Mapping tab
      Screen capture of Properties Data Mapping tab

    You now have service flows that can be used to retrieve digital properties from the blockchain and perform transactions on the blockchain.

  2. Implement a process that uses the service flows and provides human services, so that business users – your process participants - can use the service flows to work with digital properties.

    Hint: If you need help, take a look at the sample process in the .twx file available on GitHub at LarissaAuberger/bpm-blockchain.

See your process and blockchain in action

Walk through the following steps, based on the sample process app provided with the .twx file.

  1. Log in to Process Portal as a business user.
  2. Start an instance of the Work with digital properties process, and claim the task.
  3. As shown in the following screen capture, explore the available properties, check their availability for sale, and click Next. Screen capture of                     Process Portal, Available Properties for a task
    Screen capture of Process Portal, Available Properties for a task
  4. Change the ownership of a property by specifying its ID (Title Id) and the new owner ID (based on what you created in the What you need for this tutorial section). Then, click Change Ownership.
  5. In the REST API explorer of the business network, verify that the owner changed according to what you specified. It should look like the following screen capture.Screen capture of                     the REST API explorer for the business network
    Screen capture of the REST API explorer for the business network

Conclusion

In this first part of the series, you got an overview of how to combine business processes and blockchain. Then you learned how to make assets that are stored on a blockchain available in an IBM BPM process. To make blockchain assets available, you discovered a REST service using the Swagger definition for an example blockchain business network. You used the generated service in a service flow, queried the blockchain for data, and used the data in a human service, so that business users can work with the data.

As you have seen, blockchain and business process manager naturally complement each other. You use blockchain to manage assets by multiple participants through well-defined, publicly visible transactions. Participants in a business network can use business process management to implement their own private business processes, integrating them into the overall public process.

For your next blockchain project, consider IBM BPM to implement your private processes. As you saw in this tutorial, IBM BPM integrates easily with Hyperledger Fabric, and you can use it to implement entire business processes without any coding. In addition you can use other capabilities such as easy involvement of people in the process, document integration and case management, business rules and event processing, and monitoring, all which help you make your business processes on top of blockchain efficient and smart. Consider using IBM BPM on Cloud: register for a free trial.

Later this year, look for Part 2, about blockchain events and how they can influence business processes, and Part 3, about mastering security in the integrated solution.

We are eager to learn about your experiences and any additional requirements you might have for integrating IBM BPM and blockchain. Connect with us on Twitter, email, or add a comment at the bottom of this article.

Acknowledgements

Many thanks to Helen O'Shea and Claudia Zentner for the careful review of this article, constructive comments, and corrections.

We also would like to thank Dan Selman and Liam Grace for their continuous support in any kind of Hyperledger questions. We highly appreciate our close cooperation on process and blockchain topics.


Downloadable resources


Related topics


Comments

Sign in or register to add and subscribe to comments.

static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=Middleware, Cloud computing, Blockchain
ArticleID=1045641
ArticleTitle=Digital process automation with BPM and blockchain, Part 1: Combine business process management and blockchain
publish-date=05152017