[jboss-dev-forums] [Design of JBoss jBPM] - Re: web services question
alex.guizar@jboss.com
do-not-reply at jboss.com
Tue Aug 29 15:15:54 EDT 2006
Ronald,
Adding a new operation per command is fine; I wanted to confirm it was the approach you were following. The only alternative I can think of is a message-style endpoint. That option would take us back to deal with SOAP elements ourselves, tough.
We can do the "overloading" with the document bare approach. The command will be a single structure instead of individual parameters. By wrapping related optional parameters in separate elements, you can easily tell the 'overload' of the command being requested in the service implementation bean:
class StartProcessCommand {
| ProcessDefinitionInfo processDefinition;
| VariablesInfo variables;
| }
|
| class CommandServiceImplBean {
|
| public void startProcess(StartProcessCommand command) {
| ProcessInstance pi;
|
| if (command.variables == null)
| pi = jbpmContext.newProcessInstance(command.processDefinition.name);
| else
| pi = jbpmContext.newProcessInstance(command.processDefinition.name,
| command.variables.toMap());
|
| pi.signal();
| }
| }
The above snippet is pseudocode, but you get the idea. I do not see a good reason to use the command facility as opposed to invoking operations in the jbpm context directly either.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3968200#3968200
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3968200
More information about the jboss-dev-forums
mailing list