I have some code in a form action class that needs to get the flowExecutionKey
from the RequestContext
. I can't seem to find any documentation on how to do this. My class looks something like this:
public class MyFormAction extends FormAction
{
public Event doStuff(RequestContext context)
{
String flowExecutionKey = ...??
...
}
}
I know I really shouldn't need to ever get the flowExecutionKey, but I'm dealing with some legacy code that requires it. This method is being called as an entry action for a view state. I tried context.getFlowExecutionContext().getKey()
but it returns null. context.getFlowExecutionUrl()
also returns null. Is there any way to do this?
UPDATE
I was playing around with this some more, and context.getFlowExecutionContext().getKey()
does get the the flowExecutionKey when the method is called in the <on-render>
instead of <on-entry>
. It is also worth noting that it works during <on-entry>
on a later view state. The view state it's not working on is the very first view state in my flow. Is there some reason I can't get the flowExecutionKey in <on-entry>
on the first view state?