0

I am using Spring WebFlow2 and I would like to use a action-state to call my controller and check some server side code and then do something base on the return code..

Should I be using a action-state?

Here is my flowcode:

<action-state id="isMemeber">
     <evaluate expression="FlowActions.isMemeber(member)" />
     <transition on="SUCCESS" to="endStateMemeberExists" />
     <transition on="FAIL" to="isDeceased" />
</action-state>

Here is my Java code:

public void isMemeber(Member customer)
    {

    }

How do I return the SUCCESS or FAIL for Web Flow knows what to do?

Johnathan Smith
  • 1,112
  • 2
  • 17
  • 34

1 Answers1

1

Do this:

<action-state id="isMemeber">
   <evaluate expression="FlowActions.isMemeber(member)" />
   <transition on="yes" to="endStateMemeberExists" />
   <transition on="no" to="isDeceased" />
 </action-state>

public boolean isMemeber(Member customer)
{

}

Here is the link to the documentation

Alessandro
  • 4,382
  • 8
  • 36
  • 70
Nicolas Mommaerts
  • 3,207
  • 4
  • 35
  • 55