BPMN-Sol – BPMN溶胶区块链毕设代写

区块链毕设代写本文提供国外最新区块链项目源码下载,包括solidity,eth,fabric等blockchain区块链,BPMN-Sol – BPMN溶胶区块链毕设代写 是一篇很好的国外资料

BPMN-Sol

BPMN-Sol - BPMN溶胶

BPMN-Sol is a compiler to convert BPMN 2.0 xml to solidity smart contract.

Changes in the new version

Previously, with the version v0.0.3 of the bpmn-sol it was not possible to compile a business process model with multiple XOR gateways and multiple script tasks. When tried to compile such a diagram, the user would get a compilation error.

With the version v1.0 the functionality to compile a business process model with multiple script tasks and gateways is supported. This comes with an additional requirement with respect to modelling the diagram. Please find below the modelling requirements.

In the new version of v2.0.0 the compiler is a default import.

Modelling Requirements

In order to support the compilation of a business process model with multiple script tasks or multiple gateways, the bpmn-sol compiler expects the diagrams to be modelled in a specific way.

  • All the gateways should be named. If the gateway is not named then the compiler assigns the id of the node to the gateway. But it is encouraged to name the gateways.
  • All the sequence flows emerging out a gateway has to be named. This is highly important for the compiler to parse the diagram. Failure to specify the names for the sequence flows emerging out of the gateway will result in compilation error.

Installation

To install the package run the following command.

npm install bpmn-sol  

You can require the package by using

import compile from 'bpmn-sol'

Usage

The BPMN 2.0 xml can be converted to solidity using the compile() function. The xml to be passed should be an object with the xml value and a name for the smart contract. It has to be in below format.

const xml = {   bpmn: '<?xml version="1.0" encoding="UTF-8"?>n<bpmn:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn">n  <bpmn:process id="Process_0" name="Process_0" isExecutable="false">n    <bpmn:startEvent id="StartEvent_1">n      <bpmn:outgoing>SequenceFlow_005ctt4</bpmn:outgoing>n    </bpmn:startEvent>n    <bpmn:task id="Task_1hm78g6" name="a">n      <bpmn:incoming>SequenceFlow_005ctt4</bpmn:incoming>n      <bpmn:outgoing>SequenceFlow_06osrd7</bpmn:outgoing>n    </bpmn:task>n    <bpmn:sequenceFlow id="SequenceFlow_005ctt4" sourceRef="StartEvent_1" targetRef="Task_1hm78g6" />n    <bpmn:endEvent id="EndEvent_1rfz6w8">n      <bpmn:incoming>SequenceFlow_06osrd7</bpmn:incoming>n    </bpmn:endEvent>n    <bpmn:sequenceFlow id="SequenceFlow_06osrd7" sourceRef="Task_1hm78g6" targetRef="EndEvent_1rfz6w8" />n  </bpmn:process>n  <bpmndi:BPMNDiagram id="BPMNDiagram_1">n    <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_0">n      <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">n        <dc:Bounds x="173" y="102" width="36" height="36" />n      </bpmndi:BPMNShape>n      <bpmndi:BPMNShape id="Task_1hm78g6_di" bpmnElement="Task_1hm78g6">n        <dc:Bounds x="275" y="80" width="100" height="80" />n      </bpmndi:BPMNShape>n      <bpmndi:BPMNEdge id="SequenceFlow_005ctt4_di" bpmnElement="SequenceFlow_005ctt4">n        <di:waypoint xsi:type="dc:Point" x="209" y="120" />n        <di:waypoint xsi:type="dc:Point" x="275" y="120" />n        <bpmndi:BPMNLabel>n          <dc:Bounds x="242" y="98" width="0" height="13" />n        </bpmndi:BPMNLabel>n      </bpmndi:BPMNEdge>n      <bpmndi:BPMNShape id="EndEvent_1rfz6w8_di" bpmnElement="EndEvent_1rfz6w8">n        <dc:Bounds x="427" y="102" width="36" height="36" />n        <bpmndi:BPMNLabel>n          <dc:Bounds x="445" y="141" width="0" height="13" />n        </bpmndi:BPMNLabel>n      </bpmndi:BPMNShape>n      <bpmndi:BPMNEdge id="SequenceFlow_06osrd7_di" bpmnElement="SequenceFlow_06osrd7">n        <di:waypoint xsi:type="dc:Point" x="375" y="120" />n        <di:waypoint xsi:type="dc:Point" x="427" y="120" />n        <bpmndi:BPMNLabel>n          <dc:Bounds x="401" y="98" width="0" height="13" />n        </bpmndi:BPMNLabel>n      </bpmndi:BPMNEdge>n    </bpmndi:BPMNPlane>n  </bpmndi:BPMNDiagram>n</bpmn:definitions>n',   name: 'Sample_contract' }

When this object is passed to the compile() function it returns an object with three values Solidity code,ByteCode, ABI

For example

compile(xml)  .then(contract => {   console.log(contract);   })  .catch(error => {    console.log(error)   })

This logs the output object.

Acknowledgments

The BPMN-Sol is utilizing/forking the compiler of the Caterpillar engine. We thank the Caterpillar creator for his great work.

Contribution

Contributions are welcome. Make sure you run the tests before creating a pull request and add test cases that cover the contributed code.

To build bpmn-sol from its source files run npm run build.

Authors

  • Gowtham Mohan
  • Timotheus Kampik

BPMN-Sol

BPMN Sol是一个将BPMN 2.0 xml转换为solidity智能合约的编译器

以前,在bpmn sol的v0.0.3版本中,不可能编译具有多个XOR网关和多个脚本任务的业务流程模型。当试图编译这样一个图时,用户会得到一个编译错误

Changes in the new version

v1.0版支持使用多个脚本任务和网关编译业务流程模型的功能。这带来了一个关于图建模的附加要求。请查看以下造型要求

在v2.0.0的新版本中,编译器是默认的导入

为了支持具有多个脚本任务或多个网关的业务流程模型的编译,bpmn sol编译器希望以特定的方式对图进行建模

Modelling Requirements

要安装软件包,请运行以下命令

  • All the gateways should be named. If the gateway is not named then the compiler assigns the id of the node to the gateway. But it is encouraged to name the gateways.
  • All the sequence flows emerging out a gateway has to be named. This is highly important for the compiler to parse the diagram. Failure to specify the names for the sequence flows emerging out of the gateway will result in compilation error.

Installation

您可以使用

npm install bpmn-sol  

来要求包,BPMN 2.0 xml可以使用compile()函数转换为solidity。要传递的xml应该是一个具有xml值和智能合约名称的对象。必须采用以下格式

import compile from 'bpmn-sol'

Usage

当这个对象被传递到compile()函数时,它返回一个具有三个值的对象Solidity code,ByteCode,ABI

const xml = {   bpmn: '<?xml version="1.0" encoding="UTF-8"?>n<bpmn:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="Definitions_1" targetNamespace="http://bpmn.io/schema/bpmn">n  <bpmn:process id="Process_0" name="Process_0" isExecutable="false">n    <bpmn:startEvent id="StartEvent_1">n      <bpmn:outgoing>SequenceFlow_005ctt4</bpmn:outgoing>n    </bpmn:startEvent>n    <bpmn:task id="Task_1hm78g6" name="a">n      <bpmn:incoming>SequenceFlow_005ctt4</bpmn:incoming>n      <bpmn:outgoing>SequenceFlow_06osrd7</bpmn:outgoing>n    </bpmn:task>n    <bpmn:sequenceFlow id="SequenceFlow_005ctt4" sourceRef="StartEvent_1" targetRef="Task_1hm78g6" />n    <bpmn:endEvent id="EndEvent_1rfz6w8">n      <bpmn:incoming>SequenceFlow_06osrd7</bpmn:incoming>n    </bpmn:endEvent>n    <bpmn:sequenceFlow id="SequenceFlow_06osrd7" sourceRef="Task_1hm78g6" targetRef="EndEvent_1rfz6w8" />n  </bpmn:process>n  <bpmndi:BPMNDiagram id="BPMNDiagram_1">n    <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_0">n      <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">n        <dc:Bounds x="173" y="102" width="36" height="36" />n      </bpmndi:BPMNShape>n      <bpmndi:BPMNShape id="Task_1hm78g6_di" bpmnElement="Task_1hm78g6">n        <dc:Bounds x="275" y="80" width="100" height="80" />n      </bpmndi:BPMNShape>n      <bpmndi:BPMNEdge id="SequenceFlow_005ctt4_di" bpmnElement="SequenceFlow_005ctt4">n        <di:waypoint xsi:type="dc:Point" x="209" y="120" />n        <di:waypoint xsi:type="dc:Point" x="275" y="120" />n        <bpmndi:BPMNLabel>n          <dc:Bounds x="242" y="98" width="0" height="13" />n        </bpmndi:BPMNLabel>n      </bpmndi:BPMNEdge>n      <bpmndi:BPMNShape id="EndEvent_1rfz6w8_di" bpmnElement="EndEvent_1rfz6w8">n        <dc:Bounds x="427" y="102" width="36" height="36" />n        <bpmndi:BPMNLabel>n          <dc:Bounds x="445" y="141" width="0" height="13" />n        </bpmndi:BPMNLabel>n      </bpmndi:BPMNShape>n      <bpmndi:BPMNEdge id="SequenceFlow_06osrd7_di" bpmnElement="SequenceFlow_06osrd7">n        <di:waypoint xsi:type="dc:Point" x="375" y="120" />n        <di:waypoint xsi:type="dc:Point" x="427" y="120" />n        <bpmndi:BPMNLabel>n          <dc:Bounds x="401" y="98" width="0" height="13" />n        </bpmndi:BPMNLabel>n      </bpmndi:BPMNEdge>n    </bpmndi:BPMNPlane>n  </bpmndi:BPMNDiagram>n</bpmn:definitions>n',   name: 'Sample_contract' }

例如,它记录输出对象

BPMN Sol正在利用/分叉Caterpillar发动机的编译器。我们感谢毛毛虫创造者的伟大工作

compile(xml)  .then(contract => {   console.log(contract);   })  .catch(error => {    console.log(error)   })

欢迎投稿。确保在创建拉请求之前运行测试,并添加覆盖所贡献代码的测试用例

Acknowledgments

要从源文件构建bpmn sol,请运行npm run build

Contribution

Contributions are welcome. Make sure you run the tests before creating a pull request and add test cases that cover the contributed code.

To build bpmn-sol from its source files run npm run build.

Authors

  • Gowtham Mohan
  • Timotheus Kampik

部分转自网络,侵权联系删除区块链源码网

www.interchains.cc

https://www.interchains.cc/22234.html

区块链毕设网(www.interchains.cc)全网最靠谱的原创区块链毕设代做网站 部分资料来自网络,侵权联系删除! 最全最大的区块链源码站 ! QQ3039046426
区块链知识分享网, 以太坊dapp资源网, 区块链教程, fabric教程下载, 区块链书籍下载, 区块链资料下载, 区块链视频教程下载, 区块链基础教程, 区块链入门教程, 区块链资源 » BPMN-Sol – BPMN溶胶区块链毕设代写

提供最优质的资源集合

立即查看 了解详情