@izara_project/izara-core-library-asynchronous-flow 1.0.50 → 1.0.51

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "author": "Sven Mason <thebarbariansven@gmail.com>",
4
4
  "license": "AGPL-3.0-or-later",
5
5
  "homepage": "https://bitbucket.org/izara-core-libraries/izara-core-library-asynchronous-flow#readme",
6
- "version": "1.0.50",
6
+ "version": "1.0.51",
7
7
  "description": "Shared asynchronous flow logic",
8
8
  "type": "module",
9
9
  "main": "index.js",
@@ -155,8 +155,9 @@ export async function createAwaitingMultipleSteps(
155
155
  ];
156
156
  }
157
157
 
158
- if (hasFlowPublish) {
158
+ if (hasFlowPublish) {
159
159
  finalRecords = records.map((record) => {
160
+
160
161
  const recordFlowType = record.flowType || flowType;
161
162
 
162
163
  if (
@@ -169,9 +170,11 @@ export async function createAwaitingMultipleSteps(
169
170
  );
170
171
  }
171
172
 
172
- const awaitingStepId =
173
- createAwaitingStepId(record.awaitingStepId, prefix) ||
174
- createParentFlowId(prefix);
173
+ let awaitingStepId = record.awaitingStepId;
174
+
175
+ if (!awaitingStepId) {
176
+ awaitingStepId = createParentFlowId();
177
+ }
175
178
 
176
179
  return {
177
180
  awaitingStepId,
@@ -754,8 +757,10 @@ export async function completeAction(
754
757
  ),
755
758
  {
756
759
  ...record.objInstanceFull.identifiers,
757
- ...record.objInstanceFull.fields,
758
760
  },
761
+ {
762
+ ...record.objInstanceFull.fields,
763
+ }
759
764
  ),
760
765
  ),
761
766
  ),