-
Notifications
You must be signed in to change notification settings - Fork 2
/
camunda-services.js
30 lines (26 loc) · 1.51 KB
/
camunda-services.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// Camunda Services
// Exposes Camunda Engine Services for use with load()
// function in other Vertx verticles
// @TODO change var to const once es4x lib has
// been added for ES6 support is added
// Get the Default Process Engine
// ProcessEngines: https://docs.camunda.org/javadoc/camunda-bpm-platform/7.8/org/camunda/bpm/engine/ProcessEngines.html
var ProcessEngines = Java.type('org.camunda.bpm.engine.ProcessEngines')
var processEngine = ProcessEngines.getDefaultProcessEngine()
// Get the Repository Service
var authorizationService = processEngine.getAuthorizationService()
var caseService = processEngine.getCaseService()
var decisionService = processEngine.getDecisionService()
var externalTaskService = processEngine.getExternalTaskService()
var filterService = processEngine.getFilterService()
var formService = processEngine.getFormService()
var historyService = processEngine.getHistoryService()
var identityService = processEngine.getIdentityService()
var managementService = processEngine.getManagementService()
var repositoryService = processEngine.getRepositoryService()
var runtimeService = processEngine.getRuntimeService()
var taskService = processEngine.getTaskService()
// Json handling using Camunda Json Util library. See link for more details:
// https://docs.camunda.org/javadoc/camunda-bpm-platform/7.8/org/camunda/bpm/engine/impl/util/json/package-tree.html
var JSONObject = Java.type('org.camunda.bpm.engine.impl.util.json.JSONObject')
var JSONArray = Java.type('org.camunda.bpm.engine.impl.util.json.JSONArray')