1
0
Fork 0
mirror of synced 2024-09-21 11:53:49 +12:00
budibase/packages/server/src/automations/steps/loop.js

51 lines
1.1 KiB
JavaScript
Raw Normal View History

2022-03-25 22:26:55 +13:00
exports.definition = {
name: "Looping",
icon: "Reuse",
tagline: "Loop the block",
description: "Loop",
stepId: "LOOP",
internal: true,
inputs: {},
schema: {
inputs: {
properties: {
option: {
customType: "loopOption",
2022-03-28 22:01:56 +13:00
title: "Input type",
2022-03-25 22:26:55 +13:00
},
binding: {
type: "string",
title: "Binding / Value",
},
iterations: {
type: "number",
title: "Max loop iterations",
},
failure: {
type: "string",
title: "Failure Condition",
},
},
required: ["type", "value", "iterations", "failure"],
},
outputs: {
properties: {
2022-03-28 22:01:56 +13:00
items: {
2022-03-25 22:26:55 +13:00
customType: "item",
description: "the item currently being executed",
},
2022-03-28 22:01:56 +13:00
success: {
type: "boolean",
2022-03-29 22:29:51 +13:00
description: "Whether the message loop was successfully",
2022-03-28 22:01:56 +13:00
},
iterations: {
type: "number",
descriptions: "The amount of times the block ran",
},
2022-03-25 22:26:55 +13:00
},
required: ["success"],
},
},
type: "LOGIC",
}