spring-webflow
                                
                                 spring-webflow copied to clipboard
                                
                                    spring-webflow copied to clipboard
                            
                            
                            
                        Get max-executions param value from Java code [SWF-1547]
Nicolas Romanetti opened SWF-1547 and commented
From my Java code, I need to know the max-executions value as I keep track of active flows from a listener. Here is how I retrieve it currently. Could you please provide a more 'standard' way:
@Inject
public void setFlowExecutor(FlowExecutor fe) {
    // _HACK_ to retrieve the "max-executions" param present in webflow.xml conf. It is used to manage our flow menu as a FIFO.
    SessionBindingConversationManager sbcm = (SessionBindingConversationManager) ((DefaultFlowExecutionRepository) ((FlowExecutorImpl) fe)
            .getExecutionRepository()).getConversationManager();
    maxExecutions = sbcm.getMaxConversations();
}
Affects: 2.3.1
Issue Links:
- #731 Provide a Java config alternative to the webflow-config XML namespace