ChorChain

Description

ChorChain is a model-driven framework based on Blockchain technology. It supports the whole life-cycle of BPMN Choreographies from their modelling to their distributed execution and successive audit. This last phase allows participants to interact in a distributed manner via blockchain, in respect of the reference model. Indeed, ChorChain provides an integrated modeler for the Choreographies creation and the instantiation/subscription operations for their deployment. When all the given roles are covered, the framework translates the BPMN file into a Solidity smart contract that is then deployed to the Blockchain. The user can interact with the deployed contract in the specific page, performing the message exchange described in the model interacting with the Blockchain, taking advantage of its properties. The last phase allows users to audit the desired process, enabling the analysis of the exchanged messages with additional information.

ChorChain is freely available here, it includes a list of BPMN example models that can be run on ChorChain.

USER GUIDE

STEP-BY-STEP TUTORIAL

STEP-BY-STEP GUIDE

The first page handles the Sign-up and Sign-in functionalities.

The registration is bound by the account currently logged in Metamask in the active browser, indeed, is not possible to register a different account from the actual one selected. This one is also suggested into a bar over the input field, together with the possibility to copy and paste it.

Through the login the user can log into the system, the only requirement is to insert an already registered account that must also match the one currently selected in Metamask.


ChorChain offers also the possibility to model the choreography diagram directly into the tool modeler.

The modeler works like most of the others BPMN tools, in addition, ChorChain allows the insertion of information through the use of an intuitive panel, double-clicking the wanted task.

The panel makes easier the process of filling the model in a translator-suitable way. Indeed, each message must be written in the structure function_name(input_type input_name), where:

  • Function_name represents the message name
  • Input_type is the type of the exchanged information through the message
  • Input_name is the name of the information

In case that the choosen message is a payment function, so it sends ether from a participant to another, it’s just necessary to check the box and automatically the modeler generates it.

The other forms are used to fill the participants and the name of the task. Once created, it’s also possible to upload the model directly into the system repository with the Save Model option.

This image has an empty alt attribute; its file name is modeler-1024x396.png

The ChorChain home page contains the repository for the models, that are visible in the left side of the page. Clicking on one of them the instance list will appear, displaying more details, such as the creator address, the instance ID, the available roles in the instance and the actual number of subscribed users. At this point, two main operations are available: Create instance and Subscribe.

This image has an empty alt attribute; its file name is HomePage-screen.jpg
CREATE INSTANCE

This function will show a panel that consents to make two operations. The first allows the user to select the choreography roles that will become optionals while the second makes the instance visible just for the inserted addresses. Once compiled (or not) the instance will be created and will be visible in the home page.

This image has an empty alt attribute; its file name is CrateInstance.png
SUBSCRIPTION

If there is a vacant role in the instance the user can cover it, taking part in the choreography. When the maximum number of mandatory participants is reached (so every role is covered) the deploy will automatically start, translating the model to a smart contract executed in the Blockchain. If a role is still vacant (so it’s optional) the user can cover it calling a dynamic subscription through a smart contract function, made visible in the interface.

This image has an empty alt attribute; its file name is Subscrciption-1024x221.png

Each user can access the exeution page that contains all the active processes on the Blockchain visible on the left side of the page.

Clicking on one of them the relative model will appear, in which the active message is highlighted in green. In the center of the page the enabled message generates the function form, however, only the participant with the associated role can trigger it. Indeed, if the user doesn’t cover the role actually involved he can’t see the input form. In the opposite case, a Metamask transaction will be generated, waiting for the confirmation from the user. To see the previous exchanged information it is necessary to double clicking a message and the right-side panel will show the desired data.

This image has an empty alt attribute; its file name is complete_example_execution_page.jpg

When a model is deployed it is accessible also in the auditing pages, Audit, Personal and Querying.

Audit Page

Here, all the instances deployed in the blockchain via ChorChain are stored, in particular, they are grouped by model in a left-side list. clicking one of the models, the BPMN diagram will appear in the center, while in the right-side list the deployed instances are showed (green tick for completed ones). It is also possible to select a role of the model to see all the participants that covered it during the different executions. In addition, several information is displayed, like the instances execution time, the gas used and fees. Selecting an instance, all its related data is showed: the related blockchain contract address, gas and fees (related only to it), the list of participants involved with their role, all the transactions generated and the messages exchanged.

This image has an empty alt attribute; its file name is audit-screen.jpg

The transactions panel shows all the transactions generated by the contract from a blockchain point of view. Indeed it is possible to find the hash of the transaction, it’s sender, the timestamp, the value exchanged (if present) and the message executed with its parameters.

This image has an empty alt attribute; its file name is transactions-list-2.jpg

The Message panel is instead oriented to show the all the messages of the model and their related transactions hashes. These have also the participant that executed it and the number of time that it was sent (if there is a cicle).

This image has an empty alt attribute; its file name is messages-list-1.jpg

Personal Page

This page is similar to the previous, however, it is focused only on the processes in which the logged user is involved. Indeed, all the information displayed is related to the instances below that don’t correspond to all the instances of the BikeRental model stored in the repository.

This image has an empty alt attribute; its file name is Personal_page-1.jpg

The main purpose of this personal page is to give a clear view to the user of its processes, allowing him to analyse data that can help him to find possible issues or possible upgrades.


Querying Page

The last page allows the user to perform personalised queries oriented to explore the entire blockchain. Indeed it contains the GraphQl interface connected to an Ethereum node.

This image has an empty alt attribute; its file name is New-query-page.jpg

This functionality is not limited to the ChorChain models, indeed its expressiveness can be used to retrieve information regarding blocks, transactions and logs of the entire network. To notice, the use of this section requires a good level of knowledge by the user.