Hello,
I’m working on a project to integrate Camunda with Redmine, an open-source project management application.
I tested the API using postman and I’m getting a response there but when I implement the http-connector
for the same request and map the output to ${response}
, I’m getting a blank value in the response
variable, confirmed this by logging using a JavaScript external task worker.
I rechecked everything including url
, method
, headers
, the Auth key etc. I also tried with a different public API and I could see the JSON output in logs, using the same code. But as soon as I changed it with the Redmine URL, the response string is blank.
What am I missing?
I’m attaching a test BPMN below, it includes the URL and Auth key.
This is the code in the external worker:
const { Client, logger } = require(‘camunda-external-task-client-js’);
const open = require(‘open’);
const config = { baseUrl: 'http://localhost:8080/engine-rest', use: logger, asyncResponseTimeout: 10000 };
const client = new Client(config);
client.subscribe('logger', async function({ task, taskService }) {
const redmine_response = task.variables.get('redmine_response');
console.log(`Response -> ${redmine_response}`);
await taskService.complete(task);
});
redmine-api-test.bpmn (3.6 KB)