I clone this repository https://github.com/e2ebridge/bpmn into my local.
Then I attempt to follow its README.md to get start.
When I try building a REST server,I find it I Could not find process name 'TaskExampleProcess’
My developemnt enviroment:
Windows 10
npm 3.3.12
node v5.1.0
Problem Reproduction as follows:
[server.js]
/**
* Copyright: E2E Technologies Ltd
*/
"use strict";
var bpmn = require('../lib/public.js');
var path = require('path');
var port = 9998;
var urlMap = {
"TaskExampleProcess": path.join(__dirname, "./resources/projects/simple/taskExampleProcess.bpmn")
};
// Returns a restify server.
var server = bpmn.createServer({urlMap: urlMap, logLevel: "debug"});
server.listen(port, function() {
console.log('%s listening at %s', server.name, server.url);
});
[client.js]
var restify = require("restify");
// This example used the node-restify client
var client = restify.createJsonClient({url: "http://localhost:9998"});
client.post('/TaskExampleProcess', function (err, req, res, obj) {
console.log(err);
});
- step1:I run server.js,it has no errors,console ouput as follows
BPMNProcessServer listening at http://[::]:9998
- step2:Then I run client.js,console ouput as follows:
{ [InvalidArgumentError: Could not find process name 'TaskExampleProcess'.]
message: 'Could not find process name \'TaskExampleProcess\'.',
statusCode: 409,
body:
{ code: 'InvalidArgument',
message: 'Could not find process name \'TaskExampleProcess\'.' },
restCode: 'InvalidArgument',
name: 'InvalidArgumentError' }
Has anyone ever encountered this problem?What is the reason? How to solve it?
I look forward to your reply.Thanks.