Johnathan Smith
Johnathan Smith

Reputation: 1112

Spring WebFlow2.. action-state?

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?

Upvotes: 0

Views: 268

Answers (1)

Nicolas Mommaerts
Nicolas Mommaerts

Reputation: 3263

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

Upvotes: 1

Related Questions