09-13-2010 06:56 PM
…
@EJB(name="ejb/friends")
private FriendsServiceRemote friendsServiceRemote;
…
ProcessEngineImpl engine = (ProcessEngineImpl) ProcessEngines.getDefaultProcessEngine();
Map<String, Object> variables = new HashMap<String, Object>();
variables.put("friendsServiceRemote", friendsServiceRemote);
engine.getRuntimeService().startProcessInstanceByKey("helloWorld", variables);
…
…
<serviceTask id="javaService" name="javaService" activiti:method-expr="#{friendsServiceRemote.doSomething}" />
…
doSomething is a method of my EJB. This solution works without any problems. What's happening behind the scenes? Is it a good idea to set the whole EJB as variable?
…
@Stateless
public class FriendsService extends BpmnActivityBehavior implements FriendsServiceRemote, ActivityBehavior {
…
public void execute(ActivityExecution execution) throws Exception {
System.out.println("huhu");
performDefaultOutgoingBehavior(execution);
}
}
…
…
<serviceTask id="javaService" name="javaService" activiti:class="de.backend.services.friends.impl.FriendsService" />
…
Works, but I have to implement and extend the Activiti stuff and I can't invoke different methods of the same EJB. 11-08-2010 09:14 AM
11-09-2010 11:15 AM
11-10-2010 05:08 AM
11-10-2010 06:03 AM
01-27-2011 01:09 PM
01-28-2011 06:03 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.