[JBoss Seam] - Re: Manager.switchConversation via Ajax4JSF actionListener d
by objectbay
Hello again,
I have put a call to ConversationEntry.unlock() into my AJAX handler, and now conversation switching seems to work reliably:
public void actionMenuSelectionChanged() {
| ConversationEntry ce = Manager.instance().getCurrentConversationEntry();
| if (ce != null && ce.isLockedByCurrentThread()) {
| ce.unlock();
| }
| if (ActionMenuItems.NEU_LEBEN.toString().equals(actionMenuSelection)) {
| Manager.instance().leaveConversation();
| Manager.instance().beginConversation("navigator");
| Manager.instance().redirect(Views.LEBEN_BERECHNUNG.toString());
| }
| }
Does that look like a plausible solution?
It seems to me that Manager.leaveConversation(), which in turn calls initializeTemporaryConversation() doesn't unlock the current conversation, possibly leaving it in a locked state. Can anyone confirm this hypothesis?
regards,
Karl
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4121789#4121789
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4121789
18 years, 6 months
[JBoss jBPM] - Re: variable validation
by twiceknightly
kukeltje, thanks for the reply. So you are saying that you perform validation before it enters jbpm and not, for example, within an action handler? My idea was a very generic framework where you declare the variables you have in each task and how they should be validated in an XML file.
With regards to the model you are saying treat the variables in the process as temporary state and when you reach the appropriate node i.e. some end state, then transform the individual variables into your pojo and then passing the pojo to your own service to be persisted?
Your definition of "naff" is correct :). Apologies for using such colloquial english.
I take your point regarding making jbpm the process not the model. Your example of a tasklist is a good one and indeed that is what I'm doing for the tasklist. However if you seperate your layers e.g. a webapp calling and EJB that utilises jbpm then a call to signal may traverse a number of nodes in the graph. This update in the state of the process needs to be communicated to the UI so that it may show the appropriate view for say the current task.
I haven't looked at Seam at all. Would Seam simplify integration between a webapp and and ejb using jbpm? What would be passed between the two layers. Currently we have shared DTOs between the webapp and the EJB.
Again thanks for the time, your response has been most helpful.
regards
Richard.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4121774#4121774
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4121774
18 years, 6 months