cancel
Showing results for 
Search instead for 
Did you mean: 

Does xpath or json path get evaluated in pipeline parameters?

krupalibshah
Contributor

I am trying to see if I can retrieve the payload when a pipeline is exposed as a task?

Example:
Payload : 10

Pipeline parameter:
p = /a/b OR $.a.b

I want ‘p’ to take the value as 10 (in this case) and show up under pipeline parameter when ‘capture’ is enabled.

Is this supported? If yes, how?

10 REPLIES 10

@krupalibshah, I think the eval() function is what you’re looking for. See if the following additions to your mapper help point you in the right direction.

image

tstack
Former Employee

Yes, the eval() function should be used to dynamically evaluate an expression. There is also jsonPath() function to dynamically evaluate a JSON-Path.

Can you give me an example?

Here is what works.

eval-pipeline-params_2017_11_13.slp (3.3 KB)

In your example, I see pipeline parameter with json path.
If we capture its value, and invoke the pipeline via a triggered task, will the parameter be evaluated to value 10 and the same will be shown under pipeline parameter in execution statics?