Skip to content

Conversation

@amanda11
Copy link
Contributor

@amanda11 amanda11 commented Sep 13, 2021

If we have an action that requires an integer or number as a parameter, and then we have a workflow that calls that action. Currently if we put a YAQL expression such as <% ctx().int_param %> as the value for the parameter, we will get an error stating that it is not a valid integer or float.
Update the workflow composer so that it handles integer parameters and numbers with YAQL in the same way it handles Jinja.

Similar change made for objects. No change needed for booleans, but to put in YAQL or Jinja with booleans have to code to the YAML view.

@amanda11 amanda11 added the bug label Sep 13, 2021
@amanda11 amanda11 added this to the 3.6.0 milestone Sep 13, 2021
@amanda11 amanda11 changed the title [WIP] Allow integer fields with YAQL expressions to be saved Allow integer fields with YAQL expressions to be saved Sep 14, 2021
@amanda11 amanda11 requested a review from m4dcoder September 14, 2021 11:29
@pradnya-orchestral
Copy link
Contributor

pradnya-orchestral commented Sep 16, 2021

@amanda11 , @m4dcoder has asked me to check your changes, one point is, in action details page if integer field value is available ,we have added ranges for timeout and limit field and as per the ranges we are enabling and disabling run button. We have added condition for run button. I have tried your changes, now it is not giving error for YAQL expression but run button is disabled . So if user has entered YAQL expression for integer or number field we have to add appropriate condition for run button so we can enable that.

@amanda11
Copy link
Contributor Author

@pradnya-orchestral @m4dcoder Thanks for the review comments, I have updated the disabled to check whether its an expression and don't disable if it is. For expression checking I've added YAQL and Jinja, as the change to put the check on value, had stopped Jinja expressions such as {{ st2kv.system.int_param }} from being used (which could be used on other integers fields as a Run parameter).

@amanda11 amanda11 merged commit 3236dd2 into master Sep 20, 2021
@amanda11 amanda11 deleted the int_yaql branch September 20, 2021 19:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants