orlenyslp / caterpillar Goto Github PK
View Code? Open in Web Editor NEWCaterpillar: A BPMN-based BPMS for Ethereum
License: BSD 3-Clause "New" or "Revised" License
Caterpillar: A BPMN-based BPMS for Ethereum
License: BSD 3-Clause "New" or "Revised" License
Hi,
when i run caterpillar-core i get this error:
Error: No default engine was specified and no extension was provided.
at new View (C:\Users\Lenovo\Caterpillar-master\v1.0\caterpillar-core\node_modules\express\lib\view.js:62:11)
at Function.render (C:\Users\Lenovo\Caterpillar-master\v1.0\caterpillar-core\node_modules\express\lib\application.js:569:12)
at ServerResponse.render (C:\Users\Lenovo\Caterpillar-master\v1.0\caterpillar-core\node_modules\express\lib\response.js:961:7)
at C:\Users\Lenovo\Caterpillar-master\v1.0\caterpillar-core\out\app.js:43:9
at Layer.handle_error (C:\Users\Lenovo\Caterpillar-master\v1.0\caterpillar-core\node_modules\express\lib\router\layer.js:71:5)
at trim_prefix (C:\Users\Lenovo\Caterpillar-master\v1.0\caterpillar-core\node_modules\express\lib\router\index.js:310:13)
at C:\Users\Lenovo\Caterpillar-master\v1.0\caterpillar-core\node_modules\express\lib\router\index.js:280:7
at Function.process_params (C:\Users\Lenovo\Caterpillar-master\v1.0\caterpillar-core\node_modules\express\lib\router\index.js:330:12)
at next (C:\Users\Lenovo\Caterpillar-master\v1.0\caterpillar-core\node_modules\express\lib\router\index.js:271:10)
at Layer.handle_error (C:\Users\Lenovo\Caterpillar-master\v1.0\caterpillar-core\node_modules\express\lib\router\layer.js:73:5)
Thanks for your help.
Trying to run v2.1 on windows
When I run gulp, I get the error(s) below it says address already in user :::8090
C:\Caterpillar\v2.1\prototype\caterpillar-core>gulp
[13:04:16] Using gulpfile C:\Caterpillar\v2.1\prototype\caterpillar-core\gulpfile.js
[13:04:16] Starting 'nodemon'...
[13:04:16] Starting 'watch'...
[13:04:17] Finished 'watch' after 159 ms
[13:04:17] Finished 'nodemon' after 1.03 s
[13:04:17] Starting 'browser-sync'...
[13:04:17] Finished 'browser-sync' after 619 ms
[13:04:17] Starting 'default'...
[13:04:17] Finished 'default' after 41 μs
[13:04:17] [nodemon] 1.19.1
[13:04:17] [nodemon] to restart at any time, enter rs
[13:04:17] [nodemon] watching: out/**/*.js
[13:04:17] [nodemon] starting node out/www.js
events.js:174
throw er; // Unhandled 'error' event
^
Local: http://localhost:7000
External: http://192.168.56.1:7000
UI: http://localhost:3001
[Browsersync] Watching files...
Error: No default engine was specified and no extension was provided.
at new View (C:\Caterpillar\v2.1\prototype\caterpillar-core\node_modules\express\lib\view.js:62:11)
at Function.render (C:\Caterpillar\v2.1\prototype\caterpillar-core\node_modules\express\lib\application.js:569:12)
at ServerResponse.render (C:\Caterpillar\v2.1\prototype\caterpillar-core\node_modules\express\lib\response.js:961:7)
at app.use (C:\Caterpillar\v2.1\prototype\caterpillar-core\out\app.js:40:9)
at Layer.handle_error (C:\Caterpillar\v2.1\prototype\caterpillar-core\node_modules\express\lib\router\layer.js:71:5)
at trim_prefix (C:\Caterpillar\v2.1\prototype\caterpillar-core\node_modules\express\lib\router\index.js:310:13)
at C:\Caterpillar\v2.1\prototype\caterpillar-core\node_modules\express\lib\router\index.js:280:7
at Function.process_params (C:\Caterpillar\v2.1\prototype\caterpillar-core\node_modules\express\lib\router\index.js:330:12)
at next (C:\Caterpillar\v2.1\prototype\caterpillar-core\node_modules\express\lib\router\index.js:271:10)
at Layer.handle_error (C:\Caterpillar\v2.1\prototype\caterpillar-core\node_modules\express\lib\router\layer.js:73:5)
at trim_prefix (C:\Caterpillar\v2.1\prototype\caterpillar-core\node_modules\express\lib\router\index.js:310:13)
at C:\Caterpillar\v2.1\prototype\caterpillar-core\node_modules\express\lib\router\index.js:280:7
at Function.process_params (C:\Caterpillar\v2.1\prototype\caterpillar-core\node_modules\express\lib\router\index.js:330:12)
at next (C:\Caterpillar\v2.1\prototype\caterpillar-core\node_modules\express\lib\router\index.js:271:10)
at app.use (C:\Caterpillar\v2.1\prototype\caterpillar-core\out\app.js:21:5)
at Layer.handle [as handle_request] (C:\Caterpillar\v2.1\prototype\caterpillar-core\node_modules\express\lib\router\layer.js:95:5)
This is because of the following line
Hello everyone
Please I have an issue
When I expand “Configuration: Process Runtime Registry
Operations” to create a registry, and click the button “Create Registry”.
I always get this in terminal
node --trace-deprecation ...
to show where the warning was created)pragma solidity ^0.4.25;
contract IFunct {
// WorkList functions
function updateRuntimeRegistry(address _runtimeRegistry) public;
// Factory Functions
function setWorklist(address _worklist) public;
function startInstanceExecution(address processAddress) public;
function newInstance(address parent, address globalFactory) public returns(address);
function findParent() public view returns(address);
}
contract ProcessRegistry {
mapping (bytes32 => mapping (uint => bytes32)) private parent2ChildrenBundleId;
mapping (bytes32 => address) private factories;
mapping (bytes32 => bytes32) private policy;
mapping (bytes32 => bytes32) private taskRole;
mapping (address => bytes32) private instance2Bundle;
mapping (address => address) private instance2PolicyOp;
address[] private instances;
mapping (address => bytes32) private worklist2Bundle;
event NewInstanceCreatedFor(address parent, address processAddress);
function registerFactory(bytes32 bundleId, address factory) external {
factories[bundleId] = factory;
}
function registerWorklist(bytes32 bundleId, address worklist) external {
address factory = factories[bundleId];
require(factory != address(0));
worklist2Bundle[worklist] = bundleId;
IFunct(factory).setWorklist(worklist);
IFunct(worklist).updateRuntimeRegistry(this);
}
function findRuntimePolicy(address pCase) public view returns(address) {
return instance2PolicyOp[pCase];
}
function relateProcessToPolicy(bytes32 bundleId, bytes32 _policy, bytes32 _taskRole) external
{
taskRole[bundleId] = _taskRole;
policy[bundleId] = _policy;
}
function addChildBundleId(bytes32 parentBundleId, bytes32 processBundleId, uint nodeIndex) external {
parent2ChildrenBundleId[parentBundleId][nodeIndex] = processBundleId;
}
function newInstanceFor(uint nodeIndex, address parent) public returns(address) {
return newBundleInstanceFor(parent2ChildrenBundleId[instance2Bundle[parent]][nodeIndex], parent, instance2PolicyOp[parent]);
}
function newBundleInstanceFor(bytes32 bundleId, address parent, address policyOpAddr) public returns(address) {
address factory = factories[bundleId];
require(factory != address(0));
address processAddress = IFunct(factory).newInstance(parent, this);
instance2Bundle[processAddress] = bundleId;
instance2PolicyOp[processAddress] = policyOpAddr;
instances.push(processAddress);
IFunct(factory).startInstanceExecution(processAddress);
emit NewInstanceCreatedFor(parent, processAddress);
return processAddress;
}
function allInstances() external view returns(address[]) {
return instances;
}
function bindingPolicyFor(address procInstance) external view returns(bytes32) {
bytes32 pId = instance2Bundle[procInstance];
address pAddr = procInstance;
while(policy[pId].length != 0) {
pAddr = IFunct(pAddr).findParent();
if(pAddr == 0)
break;
pId = instance2Bundle[pAddr];
}
return policy[pId];
}
function taskRoleMapFor(address procInstance) external view returns(bytes32) {
bytes32 pId = instance2Bundle[procInstance];
address pAddr = procInstance;
while(taskRole[pId].length != 0) {
pAddr = IFunct(pAddr).findParent();
if(pAddr == 0)
break;
pId = instance2Bundle[pAddr];
}
return taskRole[pId];
}
function bindingPolicyFromId(bytes32 procId) external view returns(bytes32) {
return policy[procId];
}
function taskRoleMapFromId(bytes32 procId) external view returns(bytes32) {
return taskRole[procId];
}
function bundleFor(address processInstance) external view returns(bytes32) {
return instance2Bundle[processInstance];
}
function childrenFor(bytes32 parent, uint nodeInd) external view returns(bytes32) {
return parent2ChildrenBundleId[parent][nodeInd];
}
function worklistBundleFor(address worklist) external view returns(bytes32) {
return worklist2Bundle[worklist];
}
}
....................................................................
PROCESS RUNTIME REGISTRY COMPILED SUCCESSFULLY
CREATING RUNTIME REGISTRY INSTANCE ...
The registry creation keep on pending. Could someone please help me ?
Dear Orlenys López Pintado,
I installed Caterpillar on Linux Mint with versions of node, gulp and npm equal to:
^Cdanga@danga-mint ~/ProgramFiles/Caterpillar-master/caterpillar-core $ node -v
v8.5.0
danga@danga-mint ~/ProgramFiles/Caterpillar-master/caterpillar-core $ gulp -v
[11:31:49] CLI version 1.4.0
[11:31:49] Local version 3.9.1
danga@danga-mint ~/ProgramFiles/Caterpillar-master/caterpillar-core $ npm -v
5.3.0
danga@danga-mint ~/ProgramFiles/Caterpillar-master/caterpillar-core $
When I start gulp in the folder caterpillar-core I get an error:
filterCreationErrorCallback is not a function
See output below - can you help me out with this?
started on port 8090
Listening on port 3000
/home/danga/ProgramFiles/Caterpillar-master/caterpillar-core/node_modules/solc/soljson.js:1
(function (exports, require, module, __filename, __dirname) { var Module;if(!Module)Module=(typeof Module!=="undefined"?Module:null)||{};var moduleOverrides={};for(var key in Module){if(Module.hasOwnProperty(key)){moduleOverrides[key]=Module[key]}}var ENVIRONMENT_IS_WEB=typeof window==="object";var ENVIRONMENT_IS_WORKER=typeof importScripts==="function";var ENVIRONMENT_IS_NODE=typeof process==="object"&&typeof require==="function"&&!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_WORKER;var ENVIRONMENT_IS_SHELL=!ENVIRONMENT_IS_WEB&&!ENVIRONMENT_IS_NODE&&!ENVIRONMENT_IS_WORKER;if(ENVIRONMENT_IS_NODE){if(!Module["print"])Module["print"]=function print(x){process["stdout"].write(x+"\n")};if(!Module["printErr"])Module["printErr"]=function printErr(x){process["stderr"].write(x+"\n")};var nodeFS=require("fs");var nodePath=require("path");Module["read"]=function read(filename,binary){filename=nodePath"normalize";var ret=nod
TypeError: filterCreationErrorCallback is not a function
at Object.callback (/home/danga/ProgramFiles/Caterpillar-master/caterpillar-core/node_modules/web3/lib/web3/filter.js:153:13)
at /home/danga/ProgramFiles/Caterpillar-master/caterpillar-core/node_modules/web3/lib/web3/method.js:142:25
at /home/danga/ProgramFiles/Caterpillar-master/caterpillar-core/node_modules/web3/lib/web3/requestmanager.js:82:20
at XMLHttpRequest.request.onreadystatechange (/home/danga/ProgramFiles/Caterpillar-master/caterpillar-core/node_modules/web3/lib/web3/httpprovider.js:118:13)
at XMLHttpRequestEventTarget.dispatchEvent (/home/danga/ProgramFiles/Caterpillar-master/caterpillar-core/node_modules/xhr2/lib/xhr2.js:64:18)
at XMLHttpRequest._setReadyState (/home/danga/ProgramFiles/Caterpillar-master/caterpillar-core/node_modules/xhr2/lib/xhr2.js:354:12)
at XMLHttpRequest._onHttpRequestError (/home/danga/ProgramFiles/Caterpillar-master/caterpillar-core/node_modules/xhr2/lib/xhr2.js:544:12)
at ClientRequest. (/home/danga/ProgramFiles/Caterpillar-master/caterpillar-core/node_modules/xhr2/lib/xhr2.js:414:24)
at emitOne (events.js:115:13)
at ClientRequest.emit (events.js:210:7)
[11:28:05] [nodemon] app crashed - waiting for file changes before starting...
Hi,
I try to run a process including a XOR gateway. However, it chooses by default the sequence flow that listed first in the BPMN file. When I set the bool to false, that is used by the gateway, according to the format in the papers, it results in a compilation error of smart contracts. I use version 1. What is going wrong? Is version 1 outdated? How do I solve it? I already inspected the code thoroughly, without positive result.
DEPLOYING MODEL ...
(node:5912) UnhandledPromiseRejectionWarning: Error: ReferenceError: ejs:308
306| if (is(node, 'bpmn:ServiceTask')) { -%>
307| // <%= nodeName(node.id) %>
308| function <%= nodeName(node.id) %>_callbak (uint reqId<%= concatParameters(name2Ids.get(nodeName[0]), false, true, true) %>) external returns(bool) {
309| require(msg.sender == oracleAddresses[<%= flowNodeIndex(node.id) %>]);
310| uint index = uint(1) << reqId;
311| if(requestedID[<%= nodeRealIndex(node.id) %>] & index == index) {
Further analysis.
Filename: Caterpillar-master\v2.0\caterpillar-core\templates\bpmn2sol.ejs
line number: 308
Variable "name2Ids" is not defined in the file.
Whilst I look in the issue for more details - if there is anything missing from my end. Kindly let me know.
When gateways are added in a model, it returns a compilation error. I think the compiling process works after modification since smart contracts are printed, however, the error remains. How can this be solved? Help would be appreciated.
Execution - Panel in this project requires Nodev12.14 or V14.15, but Caterpillar - Core requires Nodev11.10.1. How to solve this problem?
If I want to use all the features of v1 correctly, what should my environment configuration be, for example: which version of nodejs to use
The project's README and scripts are not consistent on whether one should use legacy TestRPC or Ganache CLI.
I will add a PR that updates docs and scripts to only refer to the latter. I'm not sure if this is how it should be; but if it actually makes sense to use legacy TestRPC in a specific context (e.g. for Caterpillar version 1.0), I would expect that the docs explain this.
Getting below error when trying to build caterpillar-core. Please commit your package-lock.json
/Users/deenukaperera/Documents/Catepillar-2/Caterpillar/v3.0/caterpillar-core/out/models/models.controller.js:6
const abiCoder = new web3_eth_abi_1.AbiCoder();
^
TypeError: web3_eth_abi_1.AbiCoder is not a constructor
at Object.<anonymous> (/Users/deenukaperera/Catepillar-2/Caterpillar/v3.0/caterpillar-core/out/models/models.controller.js:6:18)
at Module._compile (internal/modules/cjs/loader.js:816:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:827:10)
at Module.load (internal/modules/cjs/loader.js:685:32)
at Function.Module._load (internal/modules/cjs/loader.js:620:12)
at Module.require (internal/modules/cjs/loader.js:723:19)
at require (internal/modules/cjs/helpers.js:14:16)
at Object.<anonymous> (/Users/deenukaperera/Catepillar-2/Caterpillar/v3.0/caterpillar-core/out/app.js:8:29)
at Module._compile (internal/modules/cjs/loader.js:816:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:827:10)
at Module.load (internal/modules/cjs/loader.js:685:32)
at Function.Module._load (internal/modules/cjs/loader.js:620:12)
at Module.require (internal/modules/cjs/loader.js:723:19)
at require (internal/modules/cjs/helpers.js:14:16)
at Object.<anonymous> (/Users/deenukaperera/Documents/Catepillar-2/Caterpillar/v3.0/caterpillar-core/out/www.js:3:15)
at Module._compile (internal/modules/cjs/loader.js:816:30)
[20:02:47] [nodemon] app crashed - waiting for file changes before starting...
@orlenyslp @Benedikt1992 @TimKam
Hello! We completed all of the steps for the implementation of caterpillar that are stated in the documentation. First, we created a registry and we added a Process Model from the folder "DynamicBindingExample". We added the given binding policy from the folder "models" and deployed the Task Role Map with the two required IDs. We tried to create an instance from the process model - however, we are having troubles filling out the case creator role and the case creator address. For the case creator role, we selected "Customer", for the case creator address we tried every single address we found in the terminal and the database. We are getting the error "Task Role Contract Not Found" with every single one of them. Which address is the case creator address, where do we find it?
We already spent a lot of time with this and did every step until now successfully - however, help concerning our issue would be very appreaciated.
Thank you so much in advance!
When running the Docker image as specified in the README, I get the following error:
Error: CONNECTION ERROR: Couldn't connect to node http://localhost:8545.
at Object.InvalidConnection (/usr/caterpillar/services-manager/node_modules/web3/lib/web3/errors.js:28:16)
at HttpProvider.send (/usr/caterpillar/services-manager/node_modules/web3/lib/web3/httpprovider.js:83:22)
at RequestManager.send (/usr/caterpillar/services-manager/node_modules/web3/lib/web3/requestmanager.js:58:32)
at Eth.get [as accounts] (/usr/caterpillar/services-manager/node_modules/web3/lib/web3/property.js:107:62)
at /usr/caterpillar/services-manager/out/models/models.controller.js:79:53
at Array.forEach (native)
at /usr/caterpillar/services-manager/out/models/models.controller.js:74:47
at Map.forEach (native)
at createOracles (/usr/caterpillar/services-manager/out/models/models.controller.js:73:37)
at /usr/caterpillar/services-manager/out/models/models.controller.js:102:9
I've run testrpc
in another terminal, but it still isn't working. Not sure if I'm doing something wrong 😄
hello
I installed CATERPILLAR V2.1 and I am facing some issues when I am trying to create a new instance of a process.
I passed by those steps:
first, I created registry then I added the BPMN model after the compilation of smart contract
I did the binding policy static configuration and I deployed taskRolemap.
Finally, when I tried to create A new instance of a process I didn't find the case creator Role and case creator address.
Please could you help me to solve these issues and to understand more your solution
Thanks in advance
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.