Context Variable "context.flow" is Behaving differently within a SharedFlow

Hi,

I am trying to build some logic based on the flow the execution is in using javascript. In the process of making a decision i am using context.flow variable . This would work as expected but when i am making use of the variable shared flow and trying to retrieve the variable , the output is SHAREDFLOW.

This behavior is not allowing me to take decision at run time. Is there any possibility getting the context flow even during the shared flow.

Thanks,

Latheef D

0 6 339
6 REPLIES 6

Context variables should work in Shared FLows.

Can you provide your sample JS code and SharedFlow logic for inspection?

@Siddharth Barahalikar Below is the snippet of what why code looks like. Can invoke this in javascript in the regular flows. And also try to invoke the script inside the shared flow.

var flowContext = context.flow;
print(flowContext); 

{ //decision making logic} 

Please let me know if you need details

This is a bug.

I believe it is b/65259899. If that is, in fact, the tracking number, then the fix for the behavior you described will be available in a cloud release "real soon now". We hope, in a few weeks.

EDIT - 2019 March 7
That is not the correct bug reference. There is a bug, and the correct reference is: b/127826421

Thanks @Dino-at-Google for the response . When it would be available for on-prem ?

We hope, soon, also. I believe it was scheduled for 1901 OPDK. What version are you using?

We are on 4.17.05 but we are planning to upgrade to 4.19.01 in early 3rd quarter.