Source-linked AI summary

CATERPILLAR: A Business Process Execution Engine on the Ethereum Blockchain

Orlenys López-Pintado, Luciano García-Bañuelos, Marlon Dumas, Ingo Weber, Alex Ponomarev

arXiv:1808.03517v3cs.SE

TL;DR

Blockchain primitives support collaborative processes among mutually untrusting parties but are cumbersome to use directly, motivating a combination with BPMN-based BPMS abstractions. Caterpillar compiles BPMN models into Solidity smart contracts whose on-chain runtime stores process state and routes execution, demonstrating broad BPMN support with measured gas overheads and known scalability and access-control limitations.

  • Problem

    Directly implementing collaborative business processes with blockchain primitives is cumbersome and error-prone, while the paper seeks to combine blockchain capabilities with BPMS abstractions for mutually untrusted parties.

  • Method

    Caterpillar uses single-pool BPMN models, compiles them into Solidity smart contracts, and maintains process state and runtime storage on the Ethereum blockchain.

  • Results

    Caterpillar executes and monitors complete collaborative processes on-chain, supports advanced BPMN constructs, and consumes two to three times more gas on average than Default and Optimized approaches.

  • Takeaways & Limitations

    Caterpillar provides compliance by design for process-centric decentralized applications by encoding process control-flow logic in smart contracts.

  • Takeaways & Limitations

    The generic worklist handler lacks access control, and the evaluation suggests limited scalability for very large process models on public blockchains.

Abstract

from arXiv · show

Blockchain platforms, such as Ethereum, allow a set of actors to maintain a ledger of transactions without relying on a central authority and to deploy scripts, called smart contracts, that are executed whenever certain transactions occur. These features can be used as basic building blocks for executing collaborative business processes between mutually untrusting parties. However, implementing business processes using the low-level primitives provided by blockchain platforms is cumbersome and error-prone. In contrast, established business process management systems, such as those based on the standard Business Process Model and Notation (BPMN), provide convenient abstractions for rapid development of process-oriented applications. This article demonstrates how to combine the advantages of a business process management system with those of a blockchain platform. The article introduces a blockchain-based BPMN execution engine, namely Caterpillar. Like any BPMN execution engine, Caterpillar supports the creation of instances of a process model and allows users to monitor the state of process instances and to execute tasks thereof. The specificity of Caterpillar is that the state of each process instance is maintained on the (Ethereum) blockchain and the workflow routing is performed by smart contracts generated by a BPMN-to-Solidity compiler. The Caterpillar compiler supports a large array of BPMN constructs, including subprocesses, multi-instances activities and event handlers. The paper describes the architecture of Caterpillar, and the interfaces it provides to support the monitoring of process instances, the allocation and execution of work items, and the execution of service tasks.

1 INTRODUCTION

Caterpillar addresses the challenge of executing collaborative business processes among mutually untrusting parties by combining BPMN abstractions with Ethereum smart contracts. It provides an on-chain BPMN execution engine whose compiler supports broad BPMN constructs and whose evaluation examines blockchain execution tradeoffs.

  • Motivation: Blockchain combines decentralized transaction ledgers and smart contracts, but implementing business processes directly with these primitives is cumbersome, error-prone, and skill-intensive.BPMSs instead provide process-model abstractions for rapid implementation and maintenance without low-level specialized development.
  • Research question: Caterpillar asks how BPMS abstractions can be combined with blockchain capabilities to execute collaborative processes between mutually untrusted parties.
  • Contribution: Caterpillar maintains process-instance state on Ethereum and performs workflow routing with smart contracts generated by a BPMN-to-Solidity compiler.The compiler covers subprocesses, multi-instance activities, and event handlers.
  • Contribution: Once deployed, Caterpillar can execute and monitor process instances without an off-chain component, targeting process-centric decentralized applications with compliance by design.The article also describes the architecture, implementation, and interfaces, and evaluates efficiency tradeoffs involving Ether consumption.

2 BACKGROUND AND RELATED WORK

The background introduces blockchain and Ethereum smart contracts, while related work shows that most prior approaches record or constrain interactions rather than execute complete BPMN processes on-chain. Caterpillar advances this landscape with broader BPMN support and fuller on-chain execution.

  • 2.1 Background: A blockchain is a distributed append-only transaction store replicated across computational nodes, with cryptographic validation and consensus providing tamper-proofness without mutual trust.
  • 2.1 Background: Ethereum smart contracts are blockchain-deployed programs executed by network nodes through transactions, with persistent contract storage and external interaction through APIs.Solidity was selected for Caterpillar because it is widely used and supported for generating EVM bytecode.
  • 2.2 Related Work: Earlier blockchain-process approaches compile restricted BPMN choreographies into Solidity or monitor message exchanges with specialized tokens.These approaches generally use blockchain to record, monitor, or enforce interaction ordering while leaving most process execution to party-specific systems.
  • 2.2 Related Work: Prior work by the authors transformed BPMN diagrams into Solidity for coordination and lower execution costs, but remained restricted to flat processes.
  • 2.2 Related Work: Caterpillar extends prior approaches toward an execution engine with broad BPMN support, including hierarchical models, while placing critical process components on-chain.

3 RUNNING EXAMPLE

The running example is an order-to-cash process organized around a root model and a reusable shipment subprocess. It illustrates user tasks, explicit instantiation, and multiple carrier-selection subprocess instances before shipment completion.

  • Process structure: The example separates an ORDER TO CASH root process from a reusable GOODS SHIPMENT subprocess called by the root model.
  • Instantiation: Caterpillar requires explicit instantiation through a plain start event and does not support implicit instantiation via start timers or start messages.
  • Order handling: Execution begins with Submit PO and Validate PO user tasks, which create work items and support purchase-order entry and validation.
  • Shipment handling: The shipment subprocess creates multiple CARRIER SELECTION subprocess instances so supplier and carrier companies can obtain quotes before a clerk selects a carrier.The demonstration repository fixes the number of instances through a process variable set to two by default.
  • Completion: After shipment, parallel paths handle corresponding invoice payments and possible invoice reissuance before reaching their end events.

4.1 Design Principles

Caterpillar is designed for low-trust collaborative processes where blockchain smart contracts enforce the agreed BPMN model directly. Its principles model collaboration as a shared single-pool process, preserve state and subprocess links on-chain, and allow execution logic to run independently of off-chain runtime components.

  • Compliance by design: Blockchain can enforce collaborative process compliance by rejecting transactions that do not conform to the process model, rather than merely monitoring deviations.Caterpillar embodies this compliance-by-design approach.
  • Compliance by design: Compliance by design targets settings with low trust, high non-compliance impact, and costly conflict resolution, whereas monitoring is suitable under more favorable conditions.
  • Design goals: Caterpillar starts from a high-level collaborative process specification and automates its compilation and deployment into the blockchain platform.
  • Modeling: Collaborative processes use a single-pool BPMN model with each party represented as a lane, so hand-offs are sequence flows rather than message exchanges.
  • State management: Process models may contain linked subprocesses, and the full process state plus metadata for retrieving subprocess links is recorded on-chain.
  • Execution: Process execution logic is translated into smart-contract functions that can run independently of any off-chain runtime component.

4.2 Architecture Overview

Caterpillar organizes process execution into layered on-chain, off-chain, and user-facing components. The on-chain layer stores and executes process logic, while off-chain tools compile, deploy, and monitor it.

  • Architecture Overview: The architecture has three layers: On-chain Runtime and Storage, Off-chain Runtime, and top-level tools for editing, configuration, and monitoring.The on-chain layer is replicated across blockchain full nodes, while the other layers provide supporting tools and interfaces.
  • On-chain Runtime and Storage: The On-chain Runtime and Storage layer contains replicated smart contracts, the Ethereum log, and a Process Repository for compilation artifacts and related data.Smart contracts encode process models and execution logic; events are recorded in the blockchain log.
  • Off-chain Runtime: The Off-chain Runtime provides tools to compile, deploy, and monitor business processes deployed on the On-chain layer.Its components can be hosted separately by different actors in a collaborative process.
  • User-facing Tools: The top layer supports executable-process editing, process-configuration packaging, and monitoring of process-instance execution.These tools provide user-facing support around the blockchain-based runtime.

4.3 On-Chain Runtime and Storage

Caterpillar’s on-chain runtime stores process state and execution data on Ethereum and uses smart contracts, registries, repositories, and logs to coordinate process execution.

  • Runtime and Storage: On-chain runtime components execute smart contracts that fully encode deployed process models, while the Process Repository stores data needed to execute them.The Ethereum log records events emitted by these contracts for access by external components.
  • Process State: Generated process contracts store control-flow state, task inputs, and data required to evaluate decision-gateway conditions for each process instance.Developers may specify additional process variables beyond these minimum requirements.
  • Runtime Components: The Workflow Handler manages process control flow, the Worklist Handler manages user tasks, and the Services Bridge manages programmatic service-task interactions.The latter two use mediator contracts to forward requests through events and receive responses through contract calls.
  • Instantiation: The Contract Factory instantiates and binds workflow and worklist contracts for a BPMN model before starting the process instance.The Runtime Registry tracks deployed process instances and their relationships to other runtime contracts.
  • Interfaces: Workflow and Worklist interfaces expose operations for advancing process state, handling events, finishing instances, and accessing work-item information.The listed interfaces include workflow stepping and worklist-related contract operations.
  • Runtime Registry: The Runtime Registry maps process identifiers, contract addresses, factories, resources, and parent-child process relationships.Its interfaces support factory registration, resource registration, process instantiation, identifier lookup, and address enumeration.

4.4 Off-chain Runtime

Caterpillar’s off-chain runtime supplies optional tools for compilation, deployment, monitoring, and task registration, while on-chain contracts preserve execution integrity.

  • Off-chain Runtime: The off-chain runtime lets external applications compile BPMN models, deploy contracts, query process-instance status, and register task execution.Its service-oriented components interact with both the on-chain runtime and the repository.
  • Runtime Independence: Off-chain components are optional because parties can invoke smart-contract transactions directly or implement their own runtime.Task transactions execute only when the process instance’s current state permits them.
  • Runtime Independence: Tampering with an off-chain component cannot alter the integrity of blockchain-recorded execution, but it can affect notifications and other observations.A secured component can query the blockchain before performing a notified task to detect such tampering.
  • Compiler: The BPMN compiler first produces Solidity contracts and a compilation dictionary, then produces EVM bytecode and ABI definitions through the Solidity compiler.The dictionary maps BPMN elements to generated code for later monitoring and interaction.
  • Compiler: For flat models, Caterpillar generates workflow, worklist, and factory contracts that respectively implement process flow and data, work-item execution, and instantiation.The worklist contract handles stakeholder work items and process-data exchange.
  • Deployment: Process deployment updates registry relationships and registers required factories and resources before the root contract is instantiated.Many deployment steps are optional and can be performed lazily before the relevant interaction is reached.
  • Monitoring and Task Execution: The Execution Monitor traverses the hierarchy of process contracts to collect active work items and service tasks from on-chain state.Started activities are represented as bit masks, and subprocess instances are traversed during the query.

4.5 Web Portal

The Caterpillar Web Portal exposes modeling, configuration, and execution functions through a form-based interface for administrators and process workers.

  • Portal Structure: The Web Portal has Modeling, Configuration, and Execution panels for interacting with Caterpillar’s off-chain runtime.The panels target process administrators and process workers.
  • Modeling: The Modeling panel creates or imports BPMN models and supports enriching them with Solidity snippets before compilation.Compilation fails when embedded Solidity code contains errors.
  • Configuration: The Configuration panel updates process-model relations and supports deploying or instantiating contracts for worklists and service-task interactions.It can associate compatible externally produced worklist contracts with deployed processes.
  • Execution: The Execution panel retrieves deployed models and running instances and allows stakeholders to execute tasks.It accesses repository information and instance lists from the Runtime Registry.

5 COMPILING BPMN INTO SOLIDITY SMART CONTRACTS

Caterpillar compiles annotated BPMN models into Solidity smart contracts covering diverse BPMN constructs and coordinating process execution through generated contracts and interfaces.

  • Supported BPMN constructs: The compiler accepts annotated BPMN models containing user, service, and script tasks; gateways; events; call activities; subprocesses; and parallel or sequential multi-instance activities.It also supports interrupting and non-interrupting message boundary events.
  • Generated contract structure: Caterpillar organizes generated contracts around process execution, worklist management, and interfaces that mediate calls between contracts.The process contract updates instance state, while worklist functions expose and complete externally executed work items.
  • External tasks: User tasks generate start, external completion, and process-contract completion functions, with exported and imported data mapped to process-variable operations.The completion function validates the caller, updates variables, marks the task complete, and updates the process-instance state.
  • Contract interfaces: Caterpillar uses interfaces to mediate calls between worklist and process-related contracts, avoiding direct Solidity-contract interaction that would increase deployment gas consumption.The generated WorklistInterface exposes the relevant start, work-item, and completion functions.
  • External tasks: Service tasks use the same interaction pattern as user tasks, but their oracle-contract API is specified in the process model rather than supplied by a predefined worklist contract.External resources respond through transactions after receiving information from the blockchain event log.
  • Control-flow encoding: Process control flow is encoded with integer state variables: marking records tokens on sequence flows, while startedActivities records triggered external or reusable elements.The step function receives updated local state, activates outgoing edges, completes activities, and continues until no enabled elements remain.

6 IMPLEMENTATION AND EVALUATION

Caterpillar combines an off-chain runtime and web interface with Ethereum smart contracts to deploy, monitor, and execute BPMN process instances. Its evaluation examines feasibility, correctness, and gas costs, including comparisons with three baselines.

  • 6.1 REST API: Caterpillar’s REST API exposes models, process instances, worklists, and services for interacting with BPMN processes on the blockchain.The Deployment Mediator handles model resources, while the Execution Monitor responds to process-related requests.
  • 6.1 REST API: Users submit BPMN 2.0 XML models for compilation and deployment, then request process-instance creation and query instance status through HTTP endpoints.The Deployment Mediator triggers compilation before deployment, and instance URLs include the underlying contract address.
  • 6.1 REST API: Process-state responses identify started user and service tasks, their parameters, and URLs for task execution through HTTP requests.The interface can generate forms from task parameters and return values exported from smart-contract state.
  • 6.2 Evaluation: The experimental comparison uses Basic, Default, and Optimized baselines representing progressively different allocations of execution logic and runtime functionality.Basic records tamper-proof event traces, whereas Default and Optimized enforce control flow with more runtime functionality left off-chain.
  • 6.2.3 Results and discussion: Caterpillar correctly ignores non-conforming requests when the corresponding task is not enabled, while its gas costs reflect its broader functionality.Instantiation is considerably cheaper for Basic, and Caterpillar consumes two to three times more gas than Default and Optimized on average.

7 CONCLUSION

Caterpillar combines BPMN-based process modeling with on-chain execution for collaborative business processes. The paper identifies missing access control and scalability boundaries for the presented system.

  • Contribution: Caterpillar executes collaborative BPMN processes with process-instance state, links, and control-flow logic maintained on-chain.The system uses smart contracts as the coordination mechanism between parties.
  • Contribution: Caterpillar extends earlier blockchain-based process execution work to support subprocesses, boundary events, and multi-instance activities.
  • Limitations: The generic worklist handler lacks access control, allowing any party to alter the execution state of any process instance.The paper identifies suitable access control for collaborative processes as future work.
  • Limitations: Caterpillar may not scale to very large process models with hundreds or thousands of elements, particularly on public blockchains.The paper suggests consortium blockchains or alternative blockchain configurations as directions for improving scalability.
Loading 1808.03517v3…