collaborative business processes execution on blockchain

31
Collaborative Business Processes Execution on Blockchain: The Caterpillar Approach Orlenys López-Pintado Marlon Dumas, Luciano García-Bañuelos, Ingo Weber November 19, 2019

Upload: others

Post on 11-Dec-2021

1 views

Category:

Documents


0 download

TRANSCRIPT

Collaborative Business Processes

Execution on Blockchain: The

Caterpillar Approach

Orlenys López-Pintado

Marlon Dumas, Luciano García-Bañuelos, Ingo Weber

November 19, 2019

https://infinitechain.io/#an-home

2

Background

BLOCKCHAIN

P2P Network

No Central Authority

Untrusted Parties

Append only chain

Each node stores a copy

Consensus

Validate Transactions

Create/Validate Blocks

Proof of Work

Smart Contracts

3

Message-Based Collaborative Processes

Fig. 1: Supply Chain Scenario from Weber et al. 2016

4

Drawbacks

Bilateral message exchange is not geared to building consensus,

hence:• Correct execution hinges on parties checking on each other

• Traceability is a nightmare

• Exceptions cause havoc

• Disputes require manual resolution

• Process change and new partner on-boarding are hard

• Money flows happen outside the collaborative process

Electronic Data Interchange (EDI) networks can help• But rely on a central trusted provider to which everyone must be connected

• Quite inflexible

• …and money flows still happen elsewhere

5

Collaborative Processes on Blockchain

Blockchain enables us to approach collaborative process execution

differently

• No messages, only blockchain transactions

Collaborative process models can be translated to smart contracts• Maintain execution state

• Ensure that the process is executed correctly

Process execution data on blockchain• Single source of truth across the participants

• Full traceability

6

Blockchain for Collaborative Process Execution

(1) Blockchain as a recording medium• Parties still exchange messages and maintain the state of the part of the

process

• Each event (e.g. task completion) in the collaborative process is written on

the blockchain

• Supported by some BPMSs (e.g. Bizagi)

• No need for smart contracts

• Compliance by monitoring

(2) Blockchain as an execution medium• No more messages. All events are recorded as blockchain transactions.

• Smart contracts check compliance before changing the state of the process

• Compliance by design

7

CATERPILLARA Blockchain-Based Business Process Management System

BPMN Process Model

Ethereum

Blockchain

? ?

? ?

ATERPILLAR

Smart Contracts

8

Caterpillar: Design Principles

1. Transparent design of collaborative business processes• A collaborative process model looks exactly like a regular intra-organizational process

• One lane = one role in the collaboration

• Sequence flow across lanes → handover between two parties

• Kiss goodbye to bilateral messages…

9

Collaborative Process on Blockchain

10

Caterpillar: Design Principles

1. Transparent design of collaborative business processes• A collaborative process model looks exactly like a regular intra-organizational process

• One lane = one role in the collaboration

• Sequence flow across lanes → handover between two parties

• Kiss goodbye to bilateral messages…

2. Everything needed to execute the process is on the blockchain• All process instance state on the blockchain

• All execution logic is encoded in smart contracts

• Design-time component and tools only needed to deploy the process

• Off-chain runtime component is purely for convenience, BYO runtime is OK

3. Actors may be bound to roles at runtime

• According to policies that are tied to the deployed process model and enforced by smart

contracts

11

System Architecture

12

Demo Video

13

Access Control

Alice’s company Bob’s company

Purchase

GoodsShip

Goods

Carrier

Collaborative Process

Role Based Access Control (RBAC)?

14

Challenges

Alice’s company Bob’s company

Purchase

GoodsShip

Goods

Carrier

Carrier

Carol’s company

TRUSTAlice

Bob

Collaborative Process

15

Challenges

Alice’s company Bob’s company

Purchase

GoodsShip

Goods

Carrier

LACK OF TRUST

Collaborative Process

ACTORS CHANGE DYNAMICALLY

TRUST RELATIONS CHANGE DYNAMICALLY

Dave’s company Carol’s companyWendy’s company

16

Role Binding Model

Customer Supplier

Task * 1 Role

Role 1 1 Actor per (sub-)process instance

All assignments in sub-scopes stored

in a set

User Group

System

IoT

Blockchain

Account/identity

17

Binding Policy Specification

Customer Supplier

Supplier Candidate Carrier

Under Shipment, Supplier nominates Candidate;

Under Shipment, Supplier nominates Carrier in Candidate endorsed-by Customer;

Nominator

Policy Statement Operations

Nominee

Binding Constraint

nominate

release

vote

Endorsement Constraint

Customer is case-creator;

Customer nominates Supplier;

18

Role Lifecycle

UNBOUND NOMINATED

RELEASING BOUND

Nominate(E)

Nominate(!E)

Vote

(E not satisfied)

Vote

(E satisfiable)

Vote

(E satisfied)

Release(!E)

Release(E)

Vote

(E not satisfied)

Vote

(E satisfiable)

Vote

(E satisfied)

19

Policy Consistency

N E

A is case-creator;

A nominates B;

A nominates C;

C nominates D, endorsed-by A and B;

uA nA bA

N E

uB nB bB

N E

uC nC bC

N E

uD nD bD

A & B

N

N

E

E

N

A & B

E

NO DEADLOCKS

20

Web Interface

21

ProblemCOMPILED APPROACHES

Lack of FLEXIBILITY

Code Generation:

Model Dependent

Redundant

Conformance with the model

Immutable = Secure = Tamper proof

Avoid changes in the process model during its execution

How to flexibly and cost-efficiently execute collaborative processes

involving mutually untrusted parties on a blockchain platform?

COST-EFFICIENCY?

22

Interpreter Overview

2018- C. Sturm et al. (Single Contract Execution) INTERPRETED EXECUTION

Dynamic data structures to

store process-specific data.

Process perspectives decoupled on a Modular Architecture

Flexibility for the participants of the process to react under unexpected

situations during the execution

(1)Keeping different variants of the same model,

(2)Deviating the flow during the execution temporarily,

(3)Permanently modifying a process model with impact in all the future instances

BPMN Interpreter- Single Smart

contract encoding BPMN Standard

System Architecture

23

Dynamic & Space-Optimized Data Structures

24

IFlow(preC, postC, typeInfo)

G2:

preC = 0001100000 = 96

postC = 0010000000 = 128

typeInfo = 0000011010 = 26

Is Activity?

typeInfo & 1 != 0

Is User Task?

typeInfo & 2057 == 2057

Dynamic Data Structures

25

IData

BPMN Interpreter

26

Instance Creation

Process Execution

Throw Event (…)

Thy Catch Event (…)

Kill Process (…)

Broadcast Signal (…)

BPMN Interpreter

27

28

Experimental Results

Caterpillar Compiled: 0.011 – 0.031 ETH (1.66 – 4.54 EUR)

Costs for Average Gas Price

Full Execution (24-10-2019)

Caterpillar Interpreted:

0.007 – 0.010 ETH (0.95 – 1.39 EUR)

Processes including:

15 - 60 BPMN elements

29

Download and Try

http://git.io/caterpillar

• Open-source (LGPL)

• NodeJS (off-chain components) + Solidity (on-chain)

• Docker image available (for Compiled Caterpillar)

30

Remaining Challenges

• Cost and throughput are major challenges

• 0.02-0.04 Ether per process instance for real (but small) processes (EUR 5+ if compiled)

• Encryption of case data and seamless access to encrypted case data

• Given an RBAC model with dynamic role binding

• Current version of Caterpillar tied to Ethereum

• Open question: is it possible to support seamless interoperation with multiple blockchain platforms?

31

Want to know more?

• O. López-Pintado, L. García-Bañuelos, M. Dumas, I. Weber, A. Ponomarev. “Caterpillar: A Business Process

Execution Engine on the Ethereum Blockchain.” Software Practice and Experience, 2019.

• https://arxiv.org/abs/1808.03517

• O. López-Pintado, M. Dumas, L. García-Bañuelos, I. Weber: “Dynamic Role Binding in Blockchain-Based

Collaborative Business Processes.” In CAiSE’2019.

• https://arxiv.org/abs/1812.02909

• O. López-Pintado, M. Dumas, L. García-Bañuelos, I. Weber: “Interpreted Execution of Business Process

Models on Blockchain.” In EDOC’2019.

• https://arxiv.org/abs/1906.01420

• O. López-Pintado, L. García-Bañuelos, M. Dumas, I. Weber:“Caterpillar: A Blockchain-Based Business

Process Management System.” Proceeding of BPM’2017 Demos (tool paper)

THANK YOU !!!