2016-10-06 12 views
1

nodejs와 통합 노드 JS간단한 예를 들어 내가 camunda에서 BPMN 다이어그램 아래의 실행과 함께 구현하는 내 응용 프로그램에서 사용하려는

enter image description here

내가 읽은이 예제 구현 :

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

나는 camunda 엔진 받침대에 연결하고이 같은 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'); 

하지만 난이 시나리오

답변

0

에 대한 전체 샘플을 원하는 가능하면 nodejs를 사용하려는 경우, BPMN 위처럼 간단한 프로젝트를 구현하고 실행하는 방법을 알고 나머지 API를 nodejs 응용 프로그램에서 사용하지 말아 워크 플로에서 작업을 실행하려면 external task pattern을 사용할 수 있습니다. nodejs 외부 근로자의 개념 증명은 https://github.com/nikku/camunda-worker-node에서 찾을 수 있습니다. 하지만이 노드는 데모 목적으로 만 사용하고 최신 camunda 버전에서는 작동하지 않을 수 있습니다. 그러나 개념은 여전히 ​​동일해야합니다.

camunda-bpm-sdk-js는 기본적으로 Camunda REST API의 클라이언트입니다. 또한 외부 작업이나 사용자 작업을 쿼리하여 완료 할 수 있습니다.