[jboss-dev-forums] [Design of JBoss jBPM] - Re: Commands: Maybe result should be part of the Command-Obj

camunda do-not-reply at jboss.com
Mon Apr 16 16:20:47 EDT 2007


I have one new comment on that:

Maybe it would be also a good option to always return a Map (or return the Command and have a Map always in there) to make the following approach possible:

I have written a EJB3-CommandServiceBean which has some additional informations about the processes and some Entities in the process variables. So it can load the required Entity-Objects (via JDO in that project). That could be handled in the CommandServiceBean, no problem, no overhead with multiple remote calls (jepp, we are in a Swing Client).

But how to return these additonal values? 

change the result of the execute-method is not a good idea, because then, we have to now in the code which implementation of the CommandService we use, bad idea.

add the values to the process variables? sounds good at first, but has the problem, if I add them to the processInstance (for example) before returning, they are treated as process variables and persistet (which I do not want).

So if we have a Map as a return value, every CommandService-Implementation could add, what it wants to add. And the client can look for entries in the Map and use them, if he finds something. A concept like the "hints" for the PersistenceProvider in EJB 3...

What do you think?

I know, the most of the problems are not problems in the Webapp-World, but I think it is worse to support Remote-Apps too...

Thanks for any hints, ideas and comments! Unfortunatly, I am a little bit under time pressure for that issue :-(

Regards
Bernd

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4037718#4037718

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4037718



More information about the jboss-dev-forums mailing list