[Design of JBoss ESB] - Re: jBPM in JBossESB
by rex.sheridan
Esteban, I think we may have a slight miscommunication. My idea is to put the ESB message into the jBPM ContextInstance, not to get the jBPM context into the message (although that is useful too).
>From what I can see in the code it is possible to get the message into the context. However, I think it currently requires some mechanism outside the CommandInterpreter (i.e. another action in the pipeline) to set it up. Here is what I think that action code may look like.
| public Message process(Message message) {
|
| CommandVehicle command = new CommandVehicle(CommandVehicle.Operation.setProcessInstanceVariables);
|
| Map<String, Object> variables = new HashMap<String, Object>();
| variables.put("message", message);
| command.setVariableValues(variables);
|
| return command.toCommandMessage();
|
| }
|
What I am really looking for is some way to configure the CommandInterpreter to do this for me.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4020014#4020014
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4020014
19 years, 1 month
[Design of JBoss jBPM] - Re: cannot deploy processdefinition from GPD via jbpm-enterp
by jeffdelong
Opps, got left out somehow. What I meant was that:
| <field name="isCurrentSessionEnabled"><true /></field>
|
needed to be set to false.
With CMTransactionFactory, Hibernate expects a transaction to already be started. When uploading via the console, this does not appear to be the case. So JTATransactionFactory is required, which means Hibernate will start the transaction if one does not already exist.
isCurrentSessionEnabled (getCurrentSession() )does not appear to get a current session if a transaction is not already in progress, even with JTATransactionFactory set. This may be a defect in Hibernate? My recommendation in this situation is to inject the session into the jbpmContext via jbpmContext.setSession(session). Granted this is more work for the developer, so getting getCurrentSession to work would be preferable.
This is simple to test. Just deploy jbpm-enterprise.ear to JBoss (I tested with 4.0.5), start it, and attempt to deploy a processdefinition from the GPD.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4019914#4019914
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4019914
19 years, 1 month