@pxp-nd/flow 1.0.73 → 1.0.74
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/dist/controllers/Flow.js +3 -0
- package/package.json +1 -1
package/dist/controllers/Flow.js
CHANGED
|
@@ -531,6 +531,9 @@ let Flow = class Flow extends core_1.Controller {
|
|
|
531
531
|
async validateFlow(flowId, manager) {
|
|
532
532
|
const nodes = await Node_1.default.find({ flowId, isActive: true });
|
|
533
533
|
let res = '';
|
|
534
|
+
if (nodes.length < 2) {
|
|
535
|
+
throw new core_1.PxpError(400, 'Your flow must have at least 2 steps. Please finish configuring it before start');
|
|
536
|
+
}
|
|
534
537
|
for (const node of nodes) {
|
|
535
538
|
const configActionType = !node.action.actionType.schemaJson ? {} : JSON.parse(node.action.actionType.schemaJson);
|
|
536
539
|
const configAction = !node.action.schemaJson ? {} : JSON.parse(node.action.schemaJson);
|