This is an automated email from the ASF dual-hosted git repository.

heneveld pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/brooklyn-docs.git


The following commit(s) were added to refs/heads/master by this push:
     new c7b75186 minor tidies to workflow docs
c7b75186 is described below

commit c7b751866ece234e1213b7cefdd96d324046d572
Author: Alex Heneveld <[email protected]>
AuthorDate: Fri Nov 25 12:25:08 2022 +0000

    minor tidies to workflow docs
---
 guide/blueprints/workflow/examples/oauth/oauth.yaml |  4 ++--
 guide/blueprints/workflow/variables.md              | 10 +++++++---
 2 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/guide/blueprints/workflow/examples/oauth/oauth.yaml 
b/guide/blueprints/workflow/examples/oauth/oauth.yaml
index 0ac6a735..88978ef7 100644
--- a/guide/blueprints/workflow/examples/oauth/oauth.yaml
+++ b/guide/blueprints/workflow/examples/oauth/oauth.yaml
@@ -14,7 +14,7 @@ services:
 
           steps:
             - step: http www.googleapis.com/oauth2/v2/userinfo
-              replayable: "yes"
+              idempotent: yes
               headers:
                 Authorization: Bearer ${entity.sensor.google_access_token}
               on-error:
@@ -46,7 +46,7 @@ services:
                 refresh_token: ${refresh_token}
                 grant_type: refresh_token
               method: post
-              replayable: "yes"
+              idempotent: yes
               on-error:
                 - # any error here, we just retry up to 5 times, first rapidly 
then waiting 1m between requests
                   # (could be smarter about which errors permit retry or not)
diff --git a/guide/blueprints/workflow/variables.md 
b/guide/blueprints/workflow/variables.md
index f79aad5e..82d7e184 100644
--- a/guide/blueprints/workflow/variables.md
+++ b/guide/blueprints/workflow/variables.md
@@ -137,11 +137,15 @@ The `let` step allows mathematical operations, such as:
 - let x = ${x} * 3 + 1
 ```
 
-This is the only place arithmetic is supported, setting local variables whose 
values
-at that step are restored if a workflow is "replayed" from that step.
+The spaces around the operations are required, and this is the only place 
arithmetic is supported.
+Any other usage, such as `set-sensor disallowed = ${x} + 1` or `let x = 
${x}+1` will result in strings.
+It is recommended to explicitly specify a mathematical type, `integer` or 
`double` to trigger an error
+because the string `3+1` will not be coercible to an integer.
 
+The reason `let` is the only place operations is allowed is because Brooklyn 
is able to restore local variables
+if a workflow is replayed from that step.
 This ensures that all the internal steps (excluding steps that act externally 
such as `ssh` or `container`)
-are individually idempotent, and if interrupted at the step can be safely 
resumed from that step.
+are individually idempotent, so if interrupted at the step can be safely 
resumed from that step.
 
 For example, if the following were allowed:
 

Reply via email to