This forum is now a read-only archive. All commenting, posting, registration services have been turned off. Those needing community support and/or wanting to ask questions should refer to the Tag/Forum map, and to http://spring.io/questions for a curated list of stackoverflow tags that Pivotal engineers, and the community, monitor.

AnnouncementAnnouncement Module

Collapse

No announcement yet.

Multiple evaluate in <action-state> - transition not workingPage Title Module

Multiple evaluate in <action-state> - transition not working

Sep 12th, 2011, 09:40 AM

Hi All,

I'm wondering why when I use multiple <evaluate expression> tags the transition does not pick up the result from the latest <evaluate>?
The consumerResVO.getResult() value IS NO_CONSUMER_REQUEST_FOUND but the last transition is always executed.

Comment

Yes, it triggers an event with id 'success' and therefore matches your catch-all transition. You can add 'on-entry' within your action state and do what you want within that, safe in the knowledge that no transition will be triggered.

Comment

Yes, it triggers an event with id 'success' and therefore matches your catch-all transition. You can add 'on-entry' within your action state and do what you want within that, safe in the knowledge that no transition will be triggered.

Ok thanks again!
Is it proper practice to put "setup" type <sets> and <evaluate> in the <on-entry>?

Comment

Ok thanks again!
Is it proper practice to put "setup" type <sets> and <evaluate> in the <on-entry>?

An action-state, like a view-state, is looking for an 'event' to trigger a transition that it recognises. I was surprised to learn that 'set' causes an event and after consulting the code, can see that it does. 'on-entry' does not monitor actions for events, and is therefore the perfect solution in my humble opinion!