@5minds/node-red-contrib-processcube 1.2.3-develop-dd0a75-m1ypzayt → 1.2.3-feature-d74324-m22xfpbx

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@5minds/node-red-contrib-processcube",
3
- "version": "1.2.3-develop-dd0a75-m1ypzayt",
3
+ "version": "1.2.3-feature-d74324-m22xfpbx",
4
4
  "license": "MIT",
5
5
  "description": "Node-RED nodes for ProcessCube",
6
6
  "scripts": {
@@ -2,16 +2,40 @@
2
2
  RED.nodes.registerType('processcube-engine-config', {
3
3
  category: 'config',
4
4
  defaults: {
5
- name : { value: '' },
5
+ name: { value: '' },
6
6
  url: { value: 'http://engine:8000', required: true },
7
+ clientId: { value: '' },
8
+ clientIdType: { type: 'str' },
9
+ clientSecret: { value: '' },
10
+ clientSecretType: { type: 'str' },
7
11
  },
8
12
  label: function () {
9
13
  return this.name || this.url;
10
14
  },
11
- credentials: {
12
- clientId: { type: 'text' },
13
- clientSecret: { type: 'password' },
14
- }
15
+ oneditprepare: function () {
16
+ $('#node-config-input-clientId').typedInput({
17
+ default: 'str',
18
+ types: ['str', 'global', 'flow', 'env', 'msg', 'cred'],
19
+ });
20
+
21
+ $('#node-config-input-clientSecret').typedInput({
22
+ default: 'str',
23
+ types: ['str', 'global', 'flow', 'env', 'msg', 'cred'],
24
+ });
25
+
26
+ $('#node-config-input-clientId').typedInput('value', this.clientId);
27
+ $('#node-config-input-clientId').typedInput('type', this.clientIdType);
28
+
29
+ $('#node-config-input-clientSecret').typedInput('value', this.clientSecret);
30
+ $('#node-config-input-clientSecret').typedInput('type', this.clientSecretType);
31
+ },
32
+ oneditsave: function () {
33
+ this.clientId = $('#node-config-input-clientId').typedInput('value');
34
+ this.clientIdType = $('#node-config-input-clientId').typedInput('type');
35
+
36
+ this.clientSecret = $('#node-config-input-clientSecret').typedInput('value');
37
+ this.clientSecretType = $('#node-config-input-clientSecret').typedInput('type');
38
+ },
15
39
  });
16
40
  </script>
17
41
 
@@ -45,6 +69,11 @@ The configuration for the ProcessCube engine.
45
69
 
46
70
  ### References
47
71
 
72
+ <<<<<<< HEAD
73
+ - [The ProcessCube Developer Network](https://processcube.io) - All documentation for the ProcessCube&copy; platform
74
+ - [Node-RED Integration in ProcessCube&copy;](https://processcube.io/docs/node-red) - Node-RED integration in ProcessCube&copy;
75
+ =======
48
76
  - [The ProcessCube&copy; Developer Network](https://processcube.io) - All documentation for the ProcessCube&copy; platform
49
77
  - [ProcessCube&copy; LowCode Integration](https://processcube.io/docs/node-red) - LowCode integration in ProcessCube&copy;
78
+ >>>>>>> develop
50
79
  </script>
@@ -11,18 +11,21 @@ module.exports = function (RED) {
11
11
  const identityChangedCallbacks = [];
12
12
  this.url = n.url;
13
13
  this.identity = null;
14
-
14
+
15
+ this.credentials.clientId = RED.util.evaluateNodeProperty(n.clientId, n.clientIdType, node);
16
+ this.credentials.clientSecret = RED.util.evaluateNodeProperty(n.clientSecret, n.clientSecretType, node);
17
+
15
18
  this.registerOnIdentityChanged = function (callback) {
16
19
  identityChangedCallbacks.push(callback);
17
20
  };
18
21
 
19
- this.isIdentityReady = function() {
22
+ this.isIdentityReady = function () {
20
23
  if (this.credentials.clientId && this.credentials.clientSecret) {
21
24
  return this.identity != null;
22
25
  } else {
23
26
  return true;
24
27
  }
25
- }
28
+ };
26
29
 
27
30
  this.setIdentity = (identity) => {
28
31
  node.log(`setIdentity: ${JSON.stringify(identity)}`);
@@ -50,7 +53,7 @@ module.exports = function (RED) {
50
53
  this.credentials.clientId,
51
54
  this.credentials.clientSecret,
52
55
  authorityUrl,
53
- node,
56
+ node
54
57
  ).catch((reason) => {
55
58
  console.error(reason);
56
59
  node.error(reason);
@@ -136,7 +139,7 @@ async function startRefreshingIdentityCycle(clientId, clientSecret, authorityUrl
136
139
  if (retries === 0) {
137
140
  console.error(
138
141
  'Could not refresh identity for external task worker processes. Stopping all external task workers.',
139
- { error },
142
+ { error }
140
143
  );
141
144
  return;
142
145
  }
@@ -16,23 +16,27 @@
16
16
  <bpmn:userTask id="user_task" name="User Task">
17
17
  <bpmn:extensionElements>
18
18
  <camunda:formData>
19
- <camunda:formField id="checkbox" label="Checkox" type="checkbox" defaultValue="true" customForm="{&#34;hint&#34;:&#34;hintttt&#34;,&#34;entries&#34;:[{&#34;key&#34;:&#34;value&#34;,&#34;value&#34;:&#34;Label&#34;}]}" />
20
- <camunda:formField id="color" label="Color" type="color" defaultValue="#cd2323" />
21
- <camunda:formField id="date-time-local" label="Datetime Local" type="datetime-local" customForm="{&#34;hint&#34;:&#34;jljkkljlk&#34;}" />
22
- <camunda:formField id="email" label="Email" type="email" customForm="{&#34;hint&#34;:&#34;hklojh&#34;,&#34;placeholder&#34;:&#34;luis@luis.de&#34;}" />
23
- <camunda:formField id="header" type="header" defaultValue="This is a Heading" customForm="{&#34;style&#34;:&#34;heading_2&#34;}" />
24
- <camunda:formField id="hidden" type="hidden" defaultValue="jkljlkj" />
25
- <camunda:formField id="month" label="Month" type="month" customForm="{&#34;hint&#34;:&#34;this is a hint for month&#34;}" />
26
- <camunda:formField id="paragraph" type="paragraph" defaultValue="This is a paragraph." />
27
- <camunda:formField id="password" label="Password" type="password" customForm="{&#34;hint&#34;:&#34;Dont use smt i can guess&#34;}" />
28
- <camunda:formField id="radio" label="Radio" type="radio" customForm="{&#34;entries&#34;:[{&#34;key&#34;:&#34;value&#34;,&#34;value&#34;:&#34;Label&#34;},{&#34;key&#34;:&#34;value2&#34;,&#34;value&#34;:&#34;Label2&#34;}]}" />
29
- <camunda:formField id="range" label="Range" type="range" customForm="{&#34;step&#34;:1,&#34;min&#34;:100,&#34;max&#34;:1000}" />
30
- <camunda:formField id="select" label="Select" type="select" customForm="{&#34;entries&#34;:[{&#34;key&#34;:&#34;value&#34;,&#34;value&#34;:&#34;Label&#34;},{&#34;key&#34;:&#34;value&#34;,&#34;value&#34;:&#34;Label&#34;}],&#34;placeholder&#34;:&#34;Select Something&#34;}" />
31
- <camunda:formField id="tele" label="Tel." type="tel" customForm="{&#34;hint&#34;:&#34;jkl&#34;,&#34;placeholder&#34;:&#34;110&#34;}" />
32
- <camunda:formField id="textarea" label="Textarea" type="textarea" defaultValue="jkl" customForm="{&#34;placeholder&#34;:&#34;placeholder&#34;}" />
33
- <camunda:formField id="time" label="Time" type="time" customForm="{&#34;hint&#34;:&#34;jkl&#34;,&#34;placeholder&#34;:&#34;12:0000&#34;}" />
34
- <camunda:formField id="url" label="URL" type="url" customForm="{&#34;placeholder&#34;:&#34;http://&#34;,&#34;hint&#34;:&#34;no youtube&#34;}" />
35
- <camunda:formField id="week" label="Week" type="week" customForm="{&#34;hint&#34;:&#34;What week?&#34;}" />
19
+ <camunda:formField id="checkbox" label="Checkbox" type="checkbox" customForm="{&#34;entries&#34;:[{&#34;key&#34;:&#34;key&#34;,&#34;value&#34;:&#34;value&#34;}],&#34;hint&#34;:&#34;hint&#34;}" />
20
+ <camunda:formField id="colorpicker" label="Colorpicker" type="color" defaultValue="#e32626" customForm="{&#34;hint&#34;:&#34;hint&#34;}" />
21
+ <camunda:formField id="confirm" label="Confirm" type="confirm" customForm="{&#34;confirmButtonText&#34;:&#34;Confirm&#34;,&#34;declineButtonText&#34;:&#34;Decline&#34;}" />
22
+ <camunda:formField id="date" label="Date" type="date" defaultValue="2024-10-18" customForm="{&#34;hint&#34;:&#34;hint&#34;}" />
23
+ <camunda:formField id="datetime" label="Datetime" type="datetime-local" defaultValue="2024-10-19T12:41" customForm="{&#34;hint&#34;:&#34;hint&#34;}" />
24
+ <camunda:formField id="email" label="Email" type="email" customForm="{&#34;hint&#34;:&#34;hint&#34;}" />
25
+ <camunda:formField id="header" type="header" defaultValue="Header" />
26
+ <camunda:formField id="hidden" type="hidden" defaultValue="hidden" />
27
+ <camunda:formField id="number" label="Number" type="number" customForm="{&#34;step&#34;:1.5,&#34;hint&#34;:&#34;hint&#34;}" />
28
+ <camunda:formField id="month" label="Month" type="month" defaultValue="2024-07" customForm="{&#34;hint&#34;:&#34;hint&#34;}" />
29
+ <camunda:formField id="paragraph" type="paragraph" defaultValue="bla bla" />
30
+ <camunda:formField id="password" label="Pasword" type="password" customForm="{&#34;hint&#34;:&#34;hint&#34;}" />
31
+ <camunda:formField id="radio" label="Radio" type="radio" customForm="{&#34;entries&#34;:[{&#34;key&#34;:&#34;key&#34;,&#34;value&#34;:&#34;value&#34;}],&#34;hint&#34;:&#34;hint&#34;}" />
32
+ <camunda:formField id="range" label="Range" type="range" defaultValue="30" customForm="{&#34;step&#34;:0.4,&#34;min&#34;:3,&#34;hint&#34;:&#34;hint&#34;}" />
33
+ <camunda:formField id="select" label="Select" type="select" customForm="{&#34;entries&#34;:[{&#34;key&#34;:&#34;key&#34;,&#34;value&#34;:&#34;value&#34;}],&#34;hint&#34;:&#34;hint&#34;}" />
34
+ <camunda:formField id="tel" label="Tel." type="tel" customForm="{&#34;hint&#34;:&#34;hint&#34;}" />
35
+ <camunda:formField id="text" label="Text" type="string" customForm="{&#34;hint&#34;:&#34;hint&#34;}" />
36
+ <camunda:formField id="textarea" label="Textarea" type="textarea" defaultValue="jkljklj" customForm="{&#34;rows&#34;:14,&#34;hint&#34;:&#34;hint&#34;}" />
37
+ <camunda:formField id="time" label="Time" type="time" defaultValue="11:54" customForm="{&#34;hint&#34;:&#34;hint&#34;}" />
38
+ <camunda:formField id="url" label="URL" type="url" customForm="{&#34;hint&#34;:&#34;hint&#34;}" />
39
+ <camunda:formField id="week" label="Week" type="week" defaultValue="2024-W37" customForm="{&#34;hint&#34;:&#34;hint&#34;}" />
36
40
  </camunda:formData>
37
41
  </bpmn:extensionElements>
38
42
  <bpmn:incoming>Flow_142awo6</bpmn:incoming>