UNPKG

@5minds/node-red-contrib-processcube

Version:
89 lines (72 loc) 3.3 kB
<script type="text/javascript"> RED.nodes.registerType('processdefinition-query', { category: 'ProcessCube', color: '#02AFD6', defaults: { name: { value: '' }, engine: { value: '', type: 'processcube-engine-config' }, query: { value: 'payload' }, query_type: { value: 'msg' }, models_only: { value: false }, }, inputs: 1, outputs: 1, icon: 'processdefinition_query.svg', label: function () { return this.name || 'processdefinition-query'; }, 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="processdefinition-query"> <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-query"><i class="fa fa-tag"></i> Query</label> <input type="text" id="node-input-query" /> </div> <div class="form-row" style="margin-bottom: 3px;"> <input type="checkbox" checked id="node-input-models_only" style="display: inline-block; width: auto; vertical-align: top; margin-left: 30px; margin-right: 5px;"> <label style="width:auto" for="node-input-models_only">Only send models as result</label> </div> </script> <script type="text/markdown" data-help-name="processdefinition-query"> A node to query process definition on the ProcessCube Engine. The `query` can be given a direkt query field from the configutation or a message property. Only models can be queried by setting the `models_only` flag. ## Inputs : payload (Object | JSON) : Will be used as the input for the query or can be directly set as JSON. ## Outputs : processDefinitions / models (Array) : The processDefinitions / models that matched the query. : totalCount (number) : The number of matches. ### Query fields **Summary**: **Description**: Filter result for &#39;ProcessDefinitions Query&#39; #### Parameters: - Name: `offset` Required: `false` - Type: number - Description: The index of the first ProcessDefinition to include. - Name: `limit` Required: `false` - Type: number - Description: The maximum number of ProcessDefinitions to include. ### References - [The ProcessCube&copy; Developer Network](https://processcube.io) - All documentation for the ProcessCube&copy; platform - [ProcessCube&copy; LowCode Integration](https://processcube.io/docs/node-red) - LowCode integration in ProcessCube&copy; </script>