node-red-camunda8
Version:
Camunda 8 nodes for Node-RED
56 lines (45 loc) • 2.29 kB
HTML
<script type="text/javascript">
RED.nodes.registerType('complete-task', {
category: 'camunda',
color: '#F3B567',
defaults: {
name: { value: '' },
},
inputs: 1,
outputs: 0,
icon: 'complete-task.svg',
label: function () {
return this.name || 'complete task';
},
paletteLabel: 'complete task',
});
</script>
<script type="text/x-red" data-template-name="complete-task">
<div class="form-row">
<label for="node-input-name"><i class="icon-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name">
</div>
</script>
<script type="text/x-red" data-help-name="complete-task">
<p>When a Node-RED message is received at the input, this node completes a specific Zeebe task/job (with either success or failure).</p>
<h3>Inputs</h3>
<dl class="message-properties">
<dt>payload.complete <span class="property-type">function</span></dt>
<dd>A function from a <code>task-worker</code> which completes the corresponding task.</dd>
<dt>payload.fail <span class="property-type">function</span></dt>
<dd>A function from a <code>task-worker</code> which fails the corresponding task.</dd>
<dt>payload.error <span class="property-type">function</span></dt>
<dd>A function from a <code>task-worker</code> which errors the corresponding task.</dd>
<dt>payload.variables <span class="property-type">object</span></dt>
<dd>Message variables as JSON object</dd>
<dt>payload.type <span class="property-type">string</span></dt>
<dd>Complete type. Can be either "success", "failure" or "error". Defaults to "success" this will trigger the corresponding function</dd>
<dt>payload.failureMessage <span class="property-type">string</span></dt>
<dd>Failure message, that will be returned to zeebe in case the complete type is "failure"</dd>
</dl>
<h3>References</h3>
<ul>
<li>Camunda Cloud Docs: <a href="https://docs.camunda.io/docs/product-manuals/concepts/job-workers/">Job Workers</a></li>
<li>zeebe-node docs: <a href="https://www.npmjs.com/package/zeebe-node#job-workers">createWorker</a></li>
</ul>
</script>