Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@5minds/node-red-contrib-processcube

Package Overview
Dependencies
Maintainers
29
Versions
244
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@5minds/node-red-contrib-processcube - npm Package Compare versions

Comparing version 1.1.4-feature-b3c80b-m14rvpwu to 1.1.4-feature-b953ba-m17k0vnb

processinstance-delete.html

3

package.json
{
"name": "@5minds/node-red-contrib-processcube",
"version": "1.1.4-feature-b3c80b-m14rvpwu",
"version": "1.1.4-feature-b953ba-m17k0vnb",
"license": "MIT",

@@ -48,2 +48,3 @@ "description": "Node-RED nodes for ProcessCube",

"ProcessinstanceQuery": "processinstance-query.js",
"ProcessinstanceDelete": "processinstance-delete.js",
"ProcessdefinitionQuery": "processdefinition-query.js",

@@ -50,0 +51,0 @@ "messageEventTrigger": "message-event-trigger.js",

@@ -7,2 +7,3 @@ module.exports = function (RED) {

node.on('input', function (msg) {
const engine = RED.nodes.getNode(config.engine);

@@ -20,22 +21,42 @@

query = {
...query,
...query
};
client.userTasks
.query(query, { identity: engine.identity })
client.userTasks.query(query, { identity: engine.identity} )
.then((matchingFlowNodes) => {
if (config.sendtype === 'array') {
msg.payload = { userTasks: matchingFlowNodes.userTasks || [] };
if (
!config.force_send_array &&
matchingFlowNodes &&
matchingFlowNodes.userTasks &&
matchingFlowNodes.userTasks.length == 1
) {
userTask = matchingFlowNodes.userTasks[0];
msg.payload = { userTask: userTask };
node.send(msg);
} else if (config.sendtype === 'multi' && matchingFlowNodes?.userTasks?.length > 1) {
matchingFlowNodes.userTasks.forEach((userTask) => {
msg.payload = { userTask };
} else {
if (!config.force_send_array) {
if (config.multisend && matchingFlowNodes.userTasks && matchingFlowNodes.userTasks.length > 1) {
matchingFlowNodes.userTasks.forEach((userTask) => {
msg.payload = { userTask: userTask };
node.send(msg);
});
} else {
if (matchingFlowNodes.userTasks == 1) {
msg.payload = {
userTasks: matchingFlowNodes.userTasks,
};
node.send(msg);
} else {
node.log(`No user tasks found for query: ${JSON.stringify(query)}`);
}
}
} else {
msg.payload = {
userTasks: matchingFlowNodes.userTasks || [],
};
node.send(msg);
});
} else if (matchingFlowNodes?.userTasks?.length >= 1) {
msg.payload = { userTask: matchingFlowNodes.userTasks[0] };
node.send(msg);
} else node.log(`No user tasks found for query: ${JSON.stringify(query)}`);
})
.catch((error) => {
}
}
}).catch((error) => {
node.error(error);

@@ -42,0 +63,0 @@ });

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc