UNPKG

@5minds/node-red-contrib-processcube

Version:
83 lines (70 loc) 3.28 kB
<script type="text/javascript"> RED.nodes.registerType('processinstance-delete-advanced', { category: 'ProcessCube DevOps', color: '#02AFD6', defaults: { name: { value: '' }, engine: { value: '', type: 'processcube-engine-config' }, query: { value: 'payload' }, query_type: { value: 'msg' }, delete_releated: { value: false }, }, inputs: 1, outputs: 1, icon: 'font-awesome/fa-sign-in', label: function () { return this.name || 'processinstance-delete-advanced'; }, oneditprepare: function () { $('#node-input-query').typedInput({ default: 'msg', types: ['msg', 'json'], }); $('#node-input-query').typedInput('value', this.query); $('#node-input-query').typedInput('type', this.query_type); }, oneditsave: function () { (this.query = $('#node-input-query').typedInput('value')), (this.query_type = $('#node-input-query').typedInput('type')); }, }); </script> <script type="text/html" data-template-name="processinstance-delete-advanced"> <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-link"></i> Engine-URL</label> <input type="text" id="node-input-engine" placeholder="Engine-URL" /> </div> <div class="form-row"> <label for="node-input-query"><i class="fa fa-search"></i> Query</label> <input type="text" id="node-input-query" /> </div> <div class="form-row" style="margin-bottom: 3px;"> <label style="width:auto" for="node-input-delete_releated"><i class="fa fa-trash"></i> Related Data</label> <input type="checkbox" checked id="node-input-delete_releated" style="display: inline-block; width: auto; vertical-align: top; margin-left: 5px; margin-right: 3px;" /> <label style="width:auto"> Delete</label> </div> </script> <script type="text/markdown" data-help-name="processinstance-delete-advanced"> Delete outdated instances of a process model in ProcessCube. *Supported only on engines version 19 or higher.* ## Inputs The node can take an input query from either a specific field on the msg object or as a json object directly in the nodes configuration. In both cases the node supports the following fields in the query: : processInstanceId (String): The IDs of the ProcessInstances to delete. : processModelId (String): The ID of the ProcessModel to delete the instances from. : finishedBefore (Datetime): The date before which the instances should be deleted. : finshedAfter (Datetime): The date after which the instances should be deleted. ## Outputs ### References - [The ProcessCube Developer Network](https://processcube.io) - All documentation for the ProcessCube&copy; platform - [Node-RED Integration in ProcessCube&copy;](https://processcube.io/docs/node-red) - Node-RED integration in ProcessCube&copy; </script>