Implement a way to access an input value of an adhoc aciton while evaluating its output
Currently, when we define an adhoc action we can define it's output as a YAQL/Jinja expression like this:
my_action:
base: std.http
base-input:
url: ...
headers ...
input:
- param1
- param2
output: <% [an expression where "$" refers to the output of the base action] %>
However, while evaluating the output it's impossible to access input values of the adhoc actions, for example, "param1" in the example above.
One way to solve this problem is to provide a function to access input values. For example:
my_action:
base: std.http
base-input:
url: ...
headers ...
input:
- param1
- param2
output: <% input().param1 %>
This example assumes that the input() returns an input context of the adhoc action.
NOTE: when we evaluate expressions in Mistral, seems like we always provide same YAQL/Jinja functions, no matter what context we use, e.g. evaluating "publish" or calling an adhoc aciton. We need to look at how to load different function sets depending on a situation.
Blueprint information
- Status:
- Not started
- Approver:
- Dougal Matthews
- Priority:
- Medium
- Drafter:
- Renat Akhmerov
- Direction:
- Needs approval
- Assignee:
- None
- Definition:
- New
- Series goal:
- None
- Implementation:
- Not started
- Milestone target:
- None
- Started by
- Completed by