best practice for defining many custom actions in login webflow

42 views
Skip to first unread message

Pablo Vidaurri

unread,
Sep 7, 2021, 5:39:29 PM9/7/21
to CAS Community
I'm able to inject a custom action into the login webview and have the action execute:
val prevActionState = flow.getTransitionableState(CaseWbflowConstants.STATE_ID_REAL_SUBMIT);
val newActionState = createActionState(flow, "mybusinessLogic1Action", mybusinessLogic1Action);

createTransitionForState(prevActionState, CasWebflowConstants.STATE_ID_SUCCESS, "mybusinessLogic1Action",true);
createTransitionForState(newActionState, CasWebflowConstants.STATE_ID_SUCCESS, CasWebflowConstants.STATE_ID_CREATE_TICKET_GRANTING_TICKET );
createTransitionForState(newActionState, CasWebflowConstants.TRANSITION_ID_ERROR, CasWebflowConstants.VIEW_ID_ERROR);


Now my question is, what if I have 20 custom actions to inject into the flow. What is the best way to do this? It seems I can simply chain these actions together:
  • STATE_ID_REAL_SUBMIT (on success to to  mybusinessLogic1Action)
  • mybusinessLogic1Action (on success go to  mybusinessLogic2Action  )
  • mybusinessLogic2Action  (on success go to 3)
  • ...
  • mybusinessLogic20Action  (on success go to TGT Action)
  • STATE_ID_CREATE_TICKET_GRANTING_TICKET 

but it seems like a maintenance nightmare. Is there a better way to handle this so I can later inject mybusinessLogic6_5Action between actions 6 and 7. Is that where ordering comes into play? If so, it's not clear how that is setup or how it works. It seems I would still need to define the transition to the next state even if using ordering.

-psv

Pablo Vidaurri

unread,
Sep 11, 2021, 10:38:32 PM9/11/21
to CAS Community, Pablo Vidaurri
In this post https://fawnoos.com/2021/08/20/cas64-webflow-extensions/#webflow-configurers
towards the end of the "webflow configurers" section, there is a line that says:
Note that each CasWebflowConfigurer implementation may be assigned a specific order which is a numeric weight that determines its execution position once webflow auto-configuration kicks into action.

I would like to understand how this works regarding the transition states. Has anyone used Order before in their webflows?

-psv

Reply all
Reply to author
Forward
0 new messages