How to refer to a workflow or activity input in Elsa designer Switch activity #6114
Replies: 4 comments
-
Assume you have a variable called Amount, which you can use with JavaScript. You can obtain the value of "Amount" using the following syntax: |
Beta Was this translation helpful? Give feedback.
-
Thanks. I actually don't have a variable of this name in the workflow. It is just an input value passed as Input. Should a I create a variable of this name? And the input of the same name is automatically passed onto the variable? And does the getAmount function automatically available or should I author it somewhere? Thanks a lot! Am new to Elsa and couldn't find any information about this topic in documentation. |
Beta Was this translation helpful? Give feedback.
-
Naming of method is combination of get+Amount+() and it can be use where
ever you want to get a variable so yes it is automatically available. For
the assignment the value you can use set variable activity
…On Mon, Nov 25, 2024, 00:50 Jiri Matejka ***@***.***> wrote:
Thanks. I actually don't have a variable of this name in the workflow. It
is just an input value passed as Input.
Should a I create a variable of this name? And the input of the same name
is automatically passed onto the variable?
And does the getAmount function automatically available or should I author
it somewhere?
Thanks a lot! Am new to Elsa and couldn't find any information about this
topic in documentation.
—
Reply to this email directly, view it on GitHub
<#6114 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJLAVOJDYL3DBIH5OWJ2RWL2CJC2TAVCNFSM6AAAAABRWL4BQOVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTCMZWGU4DAMA>
.
You are receiving this because you commented.Message ID:
***@***.***
com>
|
Beta Was this translation helpful? Give feedback.
-
Thanks a lot, will give this a try. |
Beta Was this translation helpful? Give feedback.
-
I have a Switch activity in the workflow definition. How can I write the conditions (cases) to work with worfklow inputs.
Example: There is an "Amount" input of integer type that is passed onto a workflow. In the Switch activity I need to decide wheter the Amount is grater than 500 or lower and make two brances based on that.
I suppose to use C# syntax (as there is no other option if the Type dropdown). It is clear, but how can I refer to a workflow input? Or possibly an Activity Input?
thanks
Jiri
Beta Was this translation helpful? Give feedback.
All reactions