You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@brooklyn.apache.org by Paul Campbell <pa...@cloudsoft.io> on 2023/04/19 09:58:51 UTC
workflow - boolean and ternary operators
Hi,
I'm looking at implementing boolean and ternary operators as part of
workflows.
e.g.
- let boolean pass = ${output} >= 200 && ${output} < 400
- let pass_message = ${pass} ? "Yippee" : "Boo"
I'm still at the early stages, nosing about in the
SetVariableWorkflowStep class, finding my way about.
--
Paul Campbell
Software Engineer
*Cloudsoft <https://cloudsoft.io/> *| Bringing Business to the Cloud
E: paul@cloudsoft.io
Re: workflow - boolean and ternary operators
Posted by Paul Campbell <pa...@cloudsoft.io>.
Hi,
Just a quick update. I've been able to implement the operators '>',
'>=', '<', '<=', '&&' and '||'.
I've hit a wall on the ternary operator, but I've handed over to Martin
Harris to have a look at that.
The branch for anyone interested is here:
https://github.com/kemitix/brooklyn-server/tree/workflow-ternary-operator
Paul
On 19/04/2023 10:58, Paul Campbell wrote:
>
> Hi,
>
> I'm looking at implementing boolean and ternary operators as part of
> workflows.
>
> e.g.
>
> - let boolean pass = ${output} >= 200 && ${output} < 400
> - let pass_message = ${pass} ? "Yippee" : "Boo"
>
> I'm still at the early stages, nosing about in the
> SetVariableWorkflowStep class, finding my way about.
>
> --
> Paul Campbell
> Software Engineer
> *Cloudsoft <https://cloudsoft.io/> *| Bringing Business to the Cloud
>
> E: paul@cloudsoft.io
--
Paul Campbell
Software Engineer
*Cloudsoft <https://cloudsoft.io/> *| Bringing Business to the Cloud
E: paul@cloudsoft.io
Re: workflow - boolean and ternary operators
Posted by Geoff Macartney <ge...@apache.org>.
Sounds good. Let us know when you have something you'd like us to look at...
Cheers
Geoff
On Wed, 19 Apr 2023, 10:58 Paul Campbell, <pa...@cloudsoft.io> wrote:
> Hi,
>
> I'm looking at implementing boolean and ternary operators as part of
> workflows.
>
> e.g.
>
> - let boolean pass = ${output} >= 200 && ${output} < 400
> - let pass_message = ${pass} ? "Yippee" : "Boo"
>
> I'm still at the early stages, nosing about in the
> SetVariableWorkflowStep class, finding my way about.
>
> --
> Paul Campbell
> Software Engineer
> *Cloudsoft <https://cloudsoft.io/> *| Bringing Business to the Cloud
>
> E: paul@cloudsoft.io