Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
(async () => {
const cm = IoC.get(CORE_IDENTIFIER.client_manager, TAG.camundaBpm); // TAG.zeebe
for (let index = 0; index < 1; index++) {
await cm.createWorkflowInstance({
bpmnProcessId: "BPMN_DEMO",
variables: {
amount: 1000,
hello: "world"
}
});
}
// tslint:disable-next-line: no-console
console.log('Success!');
})();
(async () => {
enum LOCAL_IDENTIFIER {
sample_activity = 'sample_activity'
}
IoC.bindTo(HelloWorldTask, LOCAL_IDENTIFIER.sample_activity);
const worker = IoC.get(CORE_IDENTIFIER.worker, TAG.camundaBpm);
const cm = IoC.get(CORE_IDENTIFIER.client_manager, TAG.camundaBpm);
const path = `${ process.cwd() }/sample/BPMN_DEMO.bpmn`;
await cm.deployWorkflow(path);
// await cm.updateVariables({
// processInstanceId: "5c50c48e-4691-11e9-8b8f-0242ac110002",
// variables: { amount: 1000 }
// });
worker.start();
worker.run().catch((e) => console.log(e));
console.log('stop worker');
await worker.stop();
console.log('rerun worker');
worker.run().catch((e) => console.log(e));
(async () => {
enum LOCAL_IDENTIFIER {
sample_activity = 'sample_activity'
}
IoC.bindTo(HelloWorldTask, LOCAL_IDENTIFIER.sample_activity);
const worker = IoC.get(CORE_IDENTIFIER.worker, TAG.camundaBpm);
const cm = IoC.get(CORE_IDENTIFIER.client_manager, TAG.camundaBpm);
const path = `${ process.cwd() }/sample/BPMN_DEMO.bpmn`;
await cm.deployWorkflow(path);
// await cm.updateVariables({
// processInstanceId: "5c50c48e-4691-11e9-8b8f-0242ac110002",
// variables: { amount: 1000 }
// });
worker.start();
worker.run().catch((e) => console.log(e));
console.log('stop worker');
await worker.stop();
console.log('rerun worker');
(async () => {
enum LOCAL_IDENTIFIER {
activity1 = 'activity_1',
activity2 = 'activity_2',
activity3 = 'activity_3'
}
const BPMN_PROCESS_ID = "BPMN_P_DEMO";
IoC.bindTo(HelloWorldTask, LOCAL_IDENTIFIER.activity1);
IoC.bindTo(HelloWorldTask, LOCAL_IDENTIFIER.activity2);
IoC.bindTo(HelloWorldTask, LOCAL_IDENTIFIER.activity3);
IoC.bindTask(HelloWorldTaskV2, LOCAL_IDENTIFIER.activity1, { bpmnProcessId: BPMN_PROCESS_ID, version: 2 });
IoC.bindTask(HelloWorldTaskV2, LOCAL_IDENTIFIER.activity2, { bpmnProcessId: BPMN_PROCESS_ID, version: 2 });
IoC.bindTask(HelloWorldTaskV2, LOCAL_IDENTIFIER.activity3, { bpmnProcessId: BPMN_PROCESS_ID, version: 2 });
IoC.bindTask(HelloWorldTaskV3, LOCAL_IDENTIFIER.activity1, { bpmnProcessId: BPMN_PROCESS_ID, version: 3 });
IoC.bindTask(HelloWorldTaskV3, LOCAL_IDENTIFIER.activity2, { bpmnProcessId: BPMN_PROCESS_ID, version: 3 });
IoC.bindTask(HelloWorldTaskV3, LOCAL_IDENTIFIER.activity3, { bpmnProcessId: BPMN_PROCESS_ID, version: 3 });
const worker = IoC.get(CORE_IDENTIFIER.worker, TAG.camundaBpm);
const cm = IoC.get(CORE_IDENTIFIER.client_manager, TAG.camundaBpm);
// const path = `${process.cwd()}/sample/BPMN_P_DEMO.bpmn`;
// await cm.deployWorkflow(path);
for (let index = 0; index < 1; index++) {
(async () => {
enum LOCAL_IDENTIFIER {
sample_activity = 'sample_activity'
}
IoC.bindTo(HelloWorldTask, LOCAL_IDENTIFIER.sample_activity);
const worker = IoC.get(CORE_IDENTIFIER.worker, TAG.camundaBpm);
const cm = IoC.get(CORE_IDENTIFIER.client_manager, TAG.camundaBpm);
const path = `${ process.cwd() }/sample/MESSAGE_EVENT.bpmn`;
await cm.deployWorkflow(path);
await cm.publishMessage({
correlation: {},
name: "__MESSAGE_START_EVENT__",
variables: { amount: 1000 },
timeToLive: undefined,
messageId: undefined
});
await cm.updateJobRetries({ jobKey: "975e1f79-518c-11e9-bd78-0242ac110003", retries: 0 });
// setTimeout((resp) => {
const BPMN_PROCESS_ID = "BPMN_P_DEMO";
IoC.bindTo(HelloWorldTask, LOCAL_IDENTIFIER.activity1);
IoC.bindTo(HelloWorldTask, LOCAL_IDENTIFIER.activity2);
IoC.bindTo(HelloWorldTask, LOCAL_IDENTIFIER.activity3);
IoC.bindTask(HelloWorldTaskV2, LOCAL_IDENTIFIER.activity1, { bpmnProcessId: BPMN_PROCESS_ID, version: 2 });
IoC.bindTask(HelloWorldTaskV2, LOCAL_IDENTIFIER.activity2, { bpmnProcessId: BPMN_PROCESS_ID, version: 2 });
IoC.bindTask(HelloWorldTaskV2, LOCAL_IDENTIFIER.activity3, { bpmnProcessId: BPMN_PROCESS_ID, version: 2 });
IoC.bindTask(HelloWorldTaskV3, LOCAL_IDENTIFIER.activity1, { bpmnProcessId: BPMN_PROCESS_ID, version: 3 });
IoC.bindTask(HelloWorldTaskV3, LOCAL_IDENTIFIER.activity2, { bpmnProcessId: BPMN_PROCESS_ID, version: 3 });
IoC.bindTask(HelloWorldTaskV3, LOCAL_IDENTIFIER.activity3, { bpmnProcessId: BPMN_PROCESS_ID, version: 3 });
const worker = IoC.get(CORE_IDENTIFIER.worker, TAG.camundaBpm);
const cm = IoC.get(CORE_IDENTIFIER.client_manager, TAG.camundaBpm);
// const path = `${process.cwd()}/sample/BPMN_P_DEMO.bpmn`;
// await cm.deployWorkflow(path);
for (let index = 0; index < 1; index++) {
await cm.createWorkflowInstance({
bpmnProcessId: BPMN_PROCESS_ID,
variables: {
amount: 1000,
hello: "world"
}
});
}
worker.start();
worker.run();
(async () => {
enum LOCAL_IDENTIFIER {
sample_activity = 'sample_activity'
}
IoC.bindTo(HelloWorldTask, LOCAL_IDENTIFIER.sample_activity);
const worker = IoC.get(CORE_IDENTIFIER.worker, TAG.camundaBpm);
const cm = IoC.get(CORE_IDENTIFIER.client_manager, TAG.camundaBpm);
const path = `${ process.cwd() }/sample/MESSAGE_EVENT.bpmn`;
await cm.deployWorkflow(path);
await cm.publishMessage({
correlation: {},
name: "__MESSAGE_START_EVENT__",
variables: { amount: 1000 },
timeToLive: undefined,
messageId: undefined
});
await cm.updateJobRetries({ jobKey: "975e1f79-518c-11e9-bd78-0242ac110003", retries: 0 });
// setTimeout((resp) => {
// cm.publishMessage({
// correlation: {},
const BPMN_PROCESS_ID = "BPMN_P_DEMO";
IoC.bindTo(HelloWorldTask, LOCAL_IDENTIFIER.activity1);
IoC.bindTo(HelloWorldTask, LOCAL_IDENTIFIER.activity2);
IoC.bindTo(HelloWorldTask, LOCAL_IDENTIFIER.activity3);
IoC.bindTask(HelloWorldTaskV2, LOCAL_IDENTIFIER.activity1, { bpmnProcessId: BPMN_PROCESS_ID, version: 2 });
IoC.bindTask(HelloWorldTaskV2, LOCAL_IDENTIFIER.activity2, { bpmnProcessId: BPMN_PROCESS_ID, version: 2 });
IoC.bindTask(HelloWorldTaskV2, LOCAL_IDENTIFIER.activity3, { bpmnProcessId: BPMN_PROCESS_ID, version: 2 });
IoC.bindTask(HelloWorldTaskV3, LOCAL_IDENTIFIER.activity1, { bpmnProcessId: BPMN_PROCESS_ID, version: 3 });
IoC.bindTask(HelloWorldTaskV3, LOCAL_IDENTIFIER.activity2, { bpmnProcessId: BPMN_PROCESS_ID, version: 3 });
IoC.bindTask(HelloWorldTaskV3, LOCAL_IDENTIFIER.activity3, { bpmnProcessId: BPMN_PROCESS_ID, version: 3 });
const worker = IoC.get(CORE_IDENTIFIER.worker, TAG.camundaBpm);
const cm = IoC.get(CORE_IDENTIFIER.client_manager, TAG.camundaBpm);
// const path = `${process.cwd()}/sample/BPMN_P_DEMO.bpmn`;
// await cm.deployWorkflow(path);
for (let index = 0; index < 1; index++) {
await cm.createWorkflowInstance({
bpmnProcessId: BPMN_PROCESS_ID,
variables: {
amount: 1000,
hello: "world"
}
});
}
worker.start();
worker.run();
IoC.bindToObject(tracerService.getTracer(), CORE_IDENTIFIER.tracer);
IoC.bindTo(HelloWorldTask, LOCAL_IDENTIFIER.activity1);
IoC.bindTo(HelloWorldTask, LOCAL_IDENTIFIER.activity2);
IoC.bindTo(HelloWorldTask, LOCAL_IDENTIFIER.activity3);
IoC.bindTask(HelloWorldTaskV2, LOCAL_IDENTIFIER.activity1, { bpmnProcessId: BPMN_PROCESS_ID, version: 2 });
IoC.bindTask(HelloWorldTaskV2, LOCAL_IDENTIFIER.activity2, { bpmnProcessId: BPMN_PROCESS_ID, version: 2 });
IoC.bindTask(HelloWorldTaskV2, LOCAL_IDENTIFIER.activity3, { bpmnProcessId: BPMN_PROCESS_ID, version: 2 });
IoC.bindTask(HelloWorldTaskV3, LOCAL_IDENTIFIER.activity1, { bpmnProcessId: BPMN_PROCESS_ID, version: 3 });
IoC.bindTask(HelloWorldTaskV3, LOCAL_IDENTIFIER.activity2, { bpmnProcessId: BPMN_PROCESS_ID, version: 3 });
IoC.bindTask(HelloWorldTaskV3, LOCAL_IDENTIFIER.activity3, { bpmnProcessId: BPMN_PROCESS_ID, version: 3 });
const worker = IoC.get(CORE_IDENTIFIER.worker, TAG.camundaBpm);
const cm = IoC.get(CORE_IDENTIFIER.client_manager, TAG.camundaBpm);
const path = `${ process.cwd() }/sample/BPMN_P_DEMO.bpmn`;
await cm.deployWorkflow(path);
for (let index = 0; index < 1; index++) {
await cm.createWorkflowInstance({
bpmnProcessId: BPMN_PROCESS_ID,
variables: {
amount: 1000,
hello: "world",
// requestInfo: {
// 'vdm-trace-id': 'f78b0a8858ce337a:f78b0a8858ce337a:0:1',
// }
}
});
}
activity3 = 'activity_3'
}
const BPMN_PROCESS_ID = "BPMN_P_DEMO";
IoC.bindTo(HelloWorldTask, LOCAL_IDENTIFIER.activity1);
IoC.bindTo(HelloWorldTask, LOCAL_IDENTIFIER.activity2);
IoC.bindTo(HelloWorldTask, LOCAL_IDENTIFIER.activity3);
IoC.bindTask(HelloWorldTaskV2, LOCAL_IDENTIFIER.activity1, { bpmnProcessId: BPMN_PROCESS_ID, version: 2 });
IoC.bindTask(HelloWorldTaskV2, LOCAL_IDENTIFIER.activity2, { bpmnProcessId: BPMN_PROCESS_ID, version: 2 });
IoC.bindTask(HelloWorldTaskV2, LOCAL_IDENTIFIER.activity3, { bpmnProcessId: BPMN_PROCESS_ID, version: 2 });
IoC.bindTask(HelloWorldTaskV3, LOCAL_IDENTIFIER.activity1, { bpmnProcessId: BPMN_PROCESS_ID, version: 3 });
IoC.bindTask(HelloWorldTaskV3, LOCAL_IDENTIFIER.activity2, { bpmnProcessId: BPMN_PROCESS_ID, version: 3 });
IoC.bindTask(HelloWorldTaskV3, LOCAL_IDENTIFIER.activity3, { bpmnProcessId: BPMN_PROCESS_ID, version: 3 });
const worker = IoC.get(CORE_IDENTIFIER.worker, TAG.camundaBpm);
const cm = IoC.get(CORE_IDENTIFIER.client_manager, TAG.camundaBpm);
// const path = `${process.cwd()}/sample/BPMN_P_DEMO.bpmn`;
// await cm.deployWorkflow(path);
for (let index = 0; index < 1; index++) {
await cm.createWorkflowInstance({
bpmnProcessId: BPMN_PROCESS_ID,
variables: {
amount: 1000,
hello: "world"
}
});
}