Trying to access Flow Description in JAVA script.

Not applicable

I am trying to fetch the Flow description in the target response policy java script.

There are list of relevant variables I have tried but they all are returning NULL

List of variables:-

current.flow.name
current.flow.description

apiproxy.name

Code Snippet

currentFlowDiscription = context.getVariable("current.flow.description");

currentFlowDiscription = context.getVariable("current.flow.name");

currentFlowDiscription = context.getVariable("apiproxy.name");

Ideally "currentFlowDiscription = context.getVariable("current.flow.description");" should work but for some reason its returning null,

Solved Solved
0 4 205
1 ACCEPTED SOLUTION

Not applicable

This is working fine for me.

context.getVariable('current.flow.description');

Make sure Description is set under Flows

...
<Flows>
  <Flow name="Test">
    <Description>test desc.</Description>
    ...

View solution in original post

4 REPLIES 4

Not applicable

This is working fine for me.

context.getVariable('current.flow.description');

Make sure Description is set under Flows

...
<Flows>
  <Flow name="Test">
    <Description>test desc.</Description>
    ...

Thank you, That worked.

Please mark as Answered on my recent comment. Thanks!

Not applicable

Can you please upload your sample proxy. I will take a look.