Skip to content

Commit 12538bf

Browse files
committed
fixed default value for usedForCompensation
Signed-off-by: Antonio Mendoza Pérez <[email protected]>
1 parent aa85950 commit 12538bf

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/lib/builders/foreachstate-builder.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ function foreachstateBuildingFn(data: Specification.Foreachstate): () => Specifi
3131

3232
//FIXME https://github.com/serverlessworkflow/sdk-typescript/issues/95
3333

34-
data.usedForCompensation = false;
34+
data.usedForCompensation = data.usedForCompensation || false;
3535
const validate = validators.get('Foreachstate');
3636
// TODO: ignore validation if no validator or throw ?
3737
if (!validate) return data;

tools/generate-builders.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ const buildersExtensions: { [key: string]: BuilderExtension } = {
6666
Foreachstate: {
6767
preValidate: `\r\n data.type = 'foreach';
6868
\r\n //FIXME https://github.com/serverlessworkflow/sdk-typescript/issues/95
69-
\r\n data.usedForCompensation = false;`,
69+
\r\n data.usedForCompensation = data.usedForCompensation || false;`,
7070
},
7171
Injectstate: {
7272
preValidate: `\r\n data.type = 'inject';`,

0 commit comments

Comments
 (0)