File tree 1 file changed +24
-1
lines changed
1 file changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -248,6 +248,8 @@ A user can be allowed to resolve a task in four ways:
248
248
- ` .pre_hook.metadata.HTTPStatus ` : field ` HTTPStatus ` from the metadata of the step's pre-hook (see [ pre-hooks] ( #pre-hooks ) )
249
249
- ` .function_args.[ARG_NAME] ` : argument that needs to be given in the conifguration section to the function (see ` functions ` below)
250
250
251
+ ` STEP_NAME ` can bear the special value ` this ` , which refers to the current step.
252
+
251
253
The following templating functions are available:
252
254
253
255
| Name | Description | Reference |
@@ -736,7 +738,7 @@ conditions:
736
738
- type: skip
737
739
foreach: parent
738
740
if:
739
- - value: '{{ step.previousCheck.output.result }}'
741
+ - value: '{{ . step.previousCheck.output.result }}'
740
742
operator: EQ
741
743
expected: 'already_done'
742
744
then:
@@ -745,6 +747,27 @@ conditions:
745
747
746
748
will be run before creating any children, by pruning the parent.
747
749
750
+ It's also possible to write a `check` condition on the result of a child step with `.step.this` :
751
+
752
+ ` ` ` yaml
753
+ foreach: '{{.step.aPreviousStep.output.ids | toJson}}'
754
+ custom_states: [NOT_FOUND]
755
+ action:
756
+ type: echo
757
+ configuration:
758
+ output:
759
+ url: '{{ .iterator }}'
760
+ conditions:
761
+ - type: check
762
+ foreach: children # <- can be omitted
763
+ if:
764
+ - value: '{{ .step.this.metadata.HTTPStatus }}'
765
+ operator: EQ
766
+ expected: '404'
767
+ then:
768
+ this: NOT_FOUND
769
+ ` ` `
770
+
748
771
# ### Resources <a name="resources"></a>
749
772
750
773
Resources are a way to restrict the concurrency factor of operations, to control the throughput and avoid dangerous behavior (e.g. flooding the targets).
You can’t perform that action at this time.
0 commit comments