Custom webflow priority

41 views
Skip to first unread message

spfma...@e.mail.fr

unread,
Oct 11, 2023, 6:50:05 AM10/11/23
to cas-...@apereo.org
Hi,
 
I managed to inject some custom webflow modifications and I am facing a problem : it seems other webflows (I first added 'mfa-gauth' and then 'simple-mfa')  always supersede mine in the end, as seen in the logs :
 
2023-10-11 11:35:09,560 DEBUG [org.springframework.webflow.definition.registry.FlowDefinitionRegistryImpl] - <Registering flow definition 'org.springframework.webflow.engine.Flow' under id 'login'>
2023-10-11 11:35:11,188 DEBUG [org.springframework.webflow.definition.registry.FlowDefinitionRegistryImpl] - <Registering flow definition 'org.springframework.webflow.engine.Flow' under id 'logout'>
2023-10-11 11:35:11,420 DEBUG [org.springframework.webflow.definition.registry.FlowDefinitionRegistryImpl] - <Registering flow definition 'org.springframework.webflow.engine.Flow' under id 'mfa-simple'>
2023-10-11 11:35:11,524 DEBUG [org.springframework.webflow.definition.registry.FlowDefinitionRegistryImpl] - <Registering flow definition 'org.springframework.webflow.engine.Flow' under id 'mfa-gauth'>
2023-10-11 11:35:11,713 DEBUG [fr.tst.cas.web.flow.CustomConfiguration] - <[TST] configureWebflowExecutionPlan@CustomConfiguration - it's like registering flow definition [class fr.tst.cas.web.flow.CustomWebflowDefinition]>
2023-10-11 11:35:11,713 DEBUG [fr.tst.cas.web.flow.CustomConfiguration] - <[TST] configureWebflowExecutionPlan@CustomConfiguration - it's like registering flow definition [class fr.tst.cas.web.flow.CustomWebflowDefinition]>
2023-10-11 11:35:11,951 DEBUG [org.springframework.webflow.definition.registry.FlowDefinitionRegistryImpl] - <Registering flow definition 'org.springframework.webflow.engine.Flow' under id 'mfa-simple'>
2023-10-11 11:35:11,954 DEBUG [org.springframework.webflow.definition.registry.FlowDefinitionRegistryImpl] - <Registering flow definition 'org.springframework.webflow.engine.Flow' under id 'mfa-gauth'>
 
What is it due to ?
 
Is there a way to manage some priorities or even force things ?
 
Regards
 
 


FreeMail powered by mail.fr

Ray Bon

unread,
Oct 11, 2023, 10:42:27 PM10/11/23
to cas-...@apereo.org
The order is part of spring webflow, so look into that.


Ray

On Wed, 2023-10-11 at 11:45 +0200, spfma.tech via CAS Community wrote:
Notice: This message was sent from outside the University of Victoria email system. Please be cautious with links and sensitive information.

spfma...@e.mail.fr

unread,
Oct 12, 2023, 3:22:24 AM10/12/23
to cas-...@apereo.org
Hi,
 
Thanks for your answer.
 
I had at look at this class but first found no way to alter "order" propery as it is private and has no setter.
 
But studying the code and later unterstanding what Lombok (new to this stuff) does with setters and getters at class level (first saw only examples with property level annotations)  lead me to a more satisfying :
 
public class CustomWebflowDefinition extends AbstractCasWebflowConfigurer {
public CustomWebflowDefinition(FlowBuilderServices flowBuilderServices,
FlowDefinitionRegistry flowDefinitionRegistry,
ConfigurableApplicationContext applicationContext,
CasConfigurationProperties casProperties) {
super(flowBuilderServices, flowDefinitionRegistry, applicationContext, casProperties);
setOrder(Ordered.LOWEST_PRECEDENCE);
 
So far I have the expected result. Think I will have to tweak with order values in cas of any conflict.
 
Regards
Reply all
Reply to author
Forward
0 new messages