Gathering detailed insights and metrics for camunda-external-task-client-js
Gathering detailed insights and metrics for camunda-external-task-client-js
Gathering detailed insights and metrics for camunda-external-task-client-js
Gathering detailed insights and metrics for camunda-external-task-client-js
Implement your BPMN Service Task in NodeJS.
npm install camunda-external-task-client-js
Typescript
Module System
Node Version
NPM Version
84.9
Supply Chain
99.6
Quality
80.8
Maintenance
100
Vulnerability
99.6
License
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
Apache-2.0 License
226 Stars
283 Commits
95 Forks
25 Watchers
20 Branches
56 Contributors
Updated on Jul 13, 2025
Latest Version
3.1.0
Package Id
camunda-external-task-client-js@3.1.0
Unpacked Size
228.63 kB
Size
75.75 kB
File Count
47
NPM Version
9.6.7
Node Version
18.17.1
Published on
Apr 03, 2024
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
Implement your BPMN Service Task in NodeJS.
This package is an ECMAScript module (ESM) and provides no CommonJS exports.
NodeJS >= v18 is required
1npm install -s camunda-external-task-client-js
Or:
1yarn add camunda-external-task-client-js
1import { Client, logger } from "camunda-external-task-client-js"; 2 3// configuration for the Client: 4// - 'baseUrl': url to the Process Engine 5// - 'logger': utility to automatically log important events 6const config = { baseUrl: "http://localhost:8080/engine-rest", use: logger }; 7 8// create a Client instance with custom configuration 9const client = new Client(config); 10 11// susbscribe to the topic: 'creditScoreChecker' 12client.subscribe("creditScoreChecker", async function({ task, taskService }) { 13 // Put your business logic 14 // complete the task 15 await taskService.complete(task); 16});
Note: Although the examples used in this documentation use async await for handling asynchronous calls, you can also use Promises to achieve the same results.
External Tasks are service tasks whose execution differs particularly from the execution of other service tasks (e.g. Human Tasks). The execution works in a way that units of work are polled from the engine before being completed.
camunda-external-task-client.js allows you to create easily such client in NodeJS.
Done through polling.
1// Susbscribe to the topic: 'topicName' 2client.subscribe("topicName", async function({ task, taskService }) { 3 // Put your business logic 4 // Complete the task 5 await taskService.complete(task); 6});
1// Susbscribe to the topic: 'topicName'
2client.subscribe("topicName", async function({ task, taskService }) {
3 // Put your business logic
4 // Handle a Failure
5 await taskService.handleFailure(task, {
6 errorMessage: "some failure message",
7 errorDetails: "some details",
8 retries: 1,
9 retryTimeout: 1000
10 });
11
12});
1// Susbscribe to the topic: 'topicName' 2client.subscribe("topicName", async function({ task, taskService }) { 3 // Put your business logic 4 5 // Create some variables 6 const variables = new Variables().set('date', new Date()); 7 8 // Handle a BPMN Failure 9 await taskService.handleBpmnError(task, "BPMNError_Code", "Error message", variables); 10});
1// Susbscribe to the topic: 'topicName' 2client.subscribe("topicName", async function({ task, taskService }) { 3 // Put your business logic 4 // Extend the lock time 5 await taskService.extendLock(task, 5000); 6});
1// Susbscribe to the topic: 'topicName' 2client.subscribe("topicName", async function({ task, taskService }) { 3 // Put your business logic 4 // Unlock the task 5 await taskService.unlock(task); 6});
1// Susbscribe to the topic: 'topicName' 2client.subscribe("topicName", async function({ task, taskService }) { 3 // Task is locked by default 4 // Put your business logic, unlock the task or let the lock expire 5 6 // Lock a task again 7 await taskService.lock(task, 5000); 8});
1import { Variables } from "camunda-external-task-client-js"; 2 3client.subscribe("topicName", async function({ task, taskService }) { 4 // get the process variable 'score' 5 const score = task.variables.get("score"); 6 7 // set a process variable 'winning' 8 const processVariables = new Variables(); 9 processVariables.set("winning", score > 5); 10 11 // set a local variable 'winningDate' 12 const localVariables = new Variables(); 13 localVariables.set("winningDate", new Date()); 14 15 // complete the task 16 await taskService.complete(task, processVariables, localVariables); 17});
Have a look at our contribution guide for how to contribute to this repository.
The source files in this repository are made available under the Apache License Version 2.0.
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
security policy file detected
Details
Reason
Found 15/27 approved changesets -- score normalized to 5
Reason
dependency not pinned by hash detected -- score normalized to 4
Details
Reason
7 existing vulnerabilities detected
Details
Reason
1 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-07-14
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More