【问题标题】:simple example of implement camunda integrate with nodejs实现camunda与nodejs集成的简单示例
【发布时间】:2016-10-06 08:33:51
【问题描述】:

我想在 camunda 中执行下面的 bpmn 图,并在我的使用节点 js 实现的应用程序中使用它

我阅读并实现了这个例子:

https://github.com/camunda/camunda-bpm-examples/tree/master/sdk-js/nodejs

我可以连接到 camunda engine-rest 并像这样调用 camunda api:

var CamSDK = require('camunda-bpm-sdk-js');

var camClient = new CamSDK.Client({
  mock: false,
  // the following URL does not need authentication,
  // but the tradeof is that some requests will fail
  // e.g.: some filters use the reference to the user performing the request
  apiUri: 'http://localhost:8080/engine-rest'
});

var processDefinitionService  = new camClient.resource('process-definition');
var processInstanceService    = new camClient.resource('process-instance');
var filterService             = new camClient.resource('filter');
var deploymentService         = new camClient.resource('deployment');

但我不知道如何实现一个像上面 bpmn 这样的简单项目并执行它并在带有 rest api 的 nodejs 应用程序中使用它,如果可能的话,我想要这个场景的完整示例

【问题讨论】:

    标签: node.js bpmn camunda


    【解决方案1】:

    如果你想使用 nodejs 在工作流中执行任务,你可以使用external task pattern。可以在https://github.com/nikku/camunda-worker-node 上找到 nodejs 外部工作者的概念证明。但请注意,这仅用于演示目的,可能不适用于最新的 camunda 版本。但是概念应该还是一样的。

    camunda-bpm-sdk-js 基本上是Camunda REST API 的客户端。使用它,您还可以查询外部任务或用户任务并完成它们。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-11-13
      • 2020-01-20
      • 2011-07-12
      • 1970-01-01
      • 2012-03-13
      • 2012-12-14
      相关资源
      最近更新 更多