Overview
This node interacts with Camunda Cloud's workflow engine, specifically focusing on BPMN jobs. The "Fail" operation for the "Job" resource allows users to mark an already activated BPMN job as failed. This is useful in scenarios where a job cannot be completed successfully due to some error or exceptional condition, and you want to notify Camunda Cloud of this failure so it can handle retries or escalate the issue.
Practical example: If your workflow involves processing orders and a particular job fails validation (e.g., payment declined), you can use this node operation to mark that job as failed with a custom error message. This informs Camunda Cloud to take appropriate action such as retrying the job or triggering error handling paths.
Properties
| Name | Meaning |
|---|---|
| Job Key | Identifier of an already activated BPMN job to fail, typically obtained from a previous node. |
| Error Message | Custom error message to return to Camunda Cloud explaining why the job failed. |
Output
The output is a JSON array containing objects with a single property:
success: A boolean indicating whether the job was successfully marked as failed (true).
Example output:
[
{
"success": true
}
]
No binary data is produced by this operation.
Dependencies
- Requires an active connection to Camunda Cloud via an API key credential configured in n8n.
- Uses the Zeebe Node.js client library internally to communicate with Camunda Cloud.
- The node expects the job key to correspond to an existing activated job in Camunda Cloud.
Troubleshooting
Common issues:
- Providing an invalid or non-existent job key will cause the operation to fail.
- Malformed or missing error message may lead to unexpected behavior or default error messages being used.
- Network or authentication errors if the API key credential is misconfigured or expired.
Error messages:
- Errors related to job key not found or job already completed/failed indicate the job key is incorrect or the job state has changed.
- Authentication errors suggest checking the API key credential setup.
- JSON parsing errors if input properties are incorrectly formatted (though this operation does not parse JSON variables).
To resolve these, verify the job key correctness, ensure the API credentials are valid, and provide a meaningful error message string.