schema.states.foreachstate.json Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of serverlessworkflow-api Show documentation
Show all versions of serverlessworkflow-api Show documentation
Java SDK for Serverless Workflow Specification
{
"type": "object",
"javaType": "io.serverlessworkflow.api.states.ForEachState",
"javaInterfaces": [
"io.serverlessworkflow.api.interfaces.State"
],
"description": "Execute a set of defined actions or workflows for each element of a data array",
"extends": {
"$ref": "defaultstate.json"
},
"properties": {
"inputCollection": {
"type": "string",
"description": "Workflow expression selecting an array element of the states data"
},
"outputCollection": {
"type": "string",
"description": "Workflow expression specifying an array element of the states data to add the results of each iteration"
},
"iterationParam": {
"type": "string",
"description": "Name of the iteration parameter that can be referenced in actions/workflow. For each parallel iteration, this param should contain an unique element of the inputCollection array"
},
"batchSize": {
"type": "integer",
"default": "0",
"minimum": 0,
"description": "Specifies how many iterations may run in parallel at the same time. Used if 'mode' property is set to 'parallel' (default)"
},
"actions": {
"type": "array",
"description": "Actions to be executed for each of the elements of inputCollection",
"items": {
"type": "object",
"$ref": "../actions/action.json"
}
},
"usedForCompensation": {
"type": "boolean",
"default": false,
"description": "If true, this state is used to compensate another state. Default is false"
},
"mode": {
"type": "string",
"enum": [
"sequential",
"parallel"
],
"description": "Specifies how iterations are to be performed (sequentially or in parallel)",
"default": "parallel"
}
},
"oneOf": [
{
"required": [
"name",
"type",
"inputCollection",
"inputParameter",
"end"
]
},
{
"required": [
"name",
"type",
"inputCollection",
"inputParameter",
"transition"
]
},
{
"required": [
"start",
"name",
"type",
"inputCollection",
"inputParameter",
"end"
]
},
{
"required": [
"start",
"name",
"type",
"inputCollection",
"inputParameter",
"transition"
]
},
{
"required": [
"name",
"type",
"inputCollection",
"inputParameter",
"actions",
"end"
]
},
{
"required": [
"name",
"type",
"inputCollection",
"inputParameter",
"actions",
"transition"
]
},
{
"required": [
"start",
"name",
"type",
"inputCollection",
"inputParameter",
"actions",
"end"
]
},
{
"required": [
"start",
"name",
"type",
"inputCollection",
"inputParameter",
"actions",
"transition"
]
}
]
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy