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#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...