@5minds/node-red-contrib-processcube
Version:
Node-RED nodes for ProcessCube
62 lines (54 loc) • 2.36 kB
HTML
<script type="text/javascript">
RED.nodes.registerType('usertask-output', {
category: 'ProcessCube',
color: '#02AFD6',
defaults: {
name: { value: '' },
engine: { value: '', type: 'processcube-engine-config' },
result: { value: 'payload' },
result_type: { value: 'msg' },
},
inputs: 1,
outputs: 1,
align: 'right',
icon: 'usertask_output.svg',
label: function () {
return this.name || 'usertask-output';
},
oneditprepare: function () {
$('#node-input-result').typedInput({
default: 'msg',
types: ['msg', 'json'],
});
$('#node-input-result').typedInput('value', this.result);
$('#node-input-result').typedInput('type', this.result_type);
},
oneditsave: function () {
(this.result = $('#node-input-result').typedInput('value')),
(this.result_type = $('#node-input-result').typedInput('type'));
},
});
</script>
<script type="text/html" data-template-name="usertask-output">
<div class="form-row">
<label for="node-input-name"><i class="fa fa-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name" />
</div>
<div class="form-row">
<label for="node-input-engine"><i class="fa fa-tag"></i> Engine-URL</label>
<input type="text" id="node-input-engine" placeholder="http://engine:8000" />
</div>
<div class="form-row">
<label for="node-input-result"><i class="fa fa-tag"></i> Result</label>
<input type="text" id="node-input-result" />
</div>
</script>
<script type="text/markdown" data-help-name="usertask-output">
A node which sends the result of a usertask to the ProcessCube.
## Inputs
: payload (Object | JSON) : Will be used as the result for the usertask or can be directly set as JSON.
: payload.usertask.flowNodeInstanceId (String) : The flowNodeInstanceId of the usertask that will be finished.
### References
- [The ProcessCube© Developer Network](https://processcube.io) - All documentation for the ProcessCube© platform
- [ProcessCube© LowCode Integration](https://processcube.io/docs/node-red) - LowCode integration in ProcessCube©
</script>