burakcanekici / multi-perspective-pm-chain

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

multi-perspective-pm-chain

Installation

  • Make sure that Docker and Docker Compose have been installed in your computer. The following image show that how to check them;

  • Download the docker-compose.yaml to any folder you want.
  • Open cmd from where you download the docker-compose.yaml file into and execute the following command;
docker-compose up
  • At the first time, the installation process could be long. If you see the containers in the Docker Desktop as the following image, the tool has been installed correctly;

The Tool

Bring up the fabric network

  • Open CLI for mp-fabricchain container and execute the following commands to bring the blockchain network up;
sudu su
cd pm-network
/bin/bash _scripts/network-up.sh

Interact with the fabric network

  • If the network is brought up as the image above, we can interact with the fabric network via the API server developed and hosted by mp-apiserver container. The API server is working on http://localhost:0146/api/datamodel path and POST, GET, and PUT methods are used for interaction.
Method Description Parameters
GET Used for downloading the Data Model in BPMN format model -> model number
POST Used for recording the result of Control-Flow analysis to the fabric network model -> model number
file -> file (in .pnml format)
PUT Used for updating the Data Model kept in fabric network, with the result of Decision or Resource analysis model -> model number
file -> file (in .pnml or .xml format)
perspective -> perspective identifier, either D or R

I preferred Postman to send HTTP requests, but you can use whatever you want;

  • In POST request, the model and file parameters should be filled properly as the following image. The model parameter is identifier for what you send in file parameter which should be output file of Control-Flow analysis. The model will be kept in blockchain with this identifier and it will be updated or downloaded via this identifier during the PUT and GET requests.
    If the relevant method is executed successfully, Transaction has been submitted message will be returned from server.

  • In PUT request, the model, perspective and file parameters should be filled properly as the following image. The model parameter is identifier for what you send in file parameter which should be output file of Decision or Resource analysis and the perspective represents that it is result of either Decision or Resource analysis. The model kept in blockchain will be updated via this identifier according to the perspective we want.
    If the relevant method is executed successfully, Transaction has been submitted message will be returned from server.

  • In GET request, only the model parameters should be filled properly as the following image. The model parameter is identifier for what you want to download in BPMN format. The model kept in blockchain will be downloaded via this identifier.
    If the relevant method is executed successfully, the BPMN file will be downloaded.

  • On the other hand, the mp-frontend container hosts a frontend application that makes interaction with the API server without using Postman or this sort of applications. You can navigate the following application page by typing http://localhost on the browser. This is not essential, but for optional.

Bring down the fabric network

  • Open CLI for mp-fabricchain container and execute the following commands to bring the blockchain network down;
sudu su
cd pm-network
/bin/bash _scripts/network-down.sh

About