[jboss-user] [JBoss jBPM] - Re: jBPM in EJB environment

jdbertron do-not-reply at jboss.com
Tue Jan 15 17:59:02 EST 2008


Haha, 
Very good question.
OK, I assume you want the database, hibernate cfg and jbpm cfg hidden from your users/applets, and you want the BPM to actually run on the J2EE server.
It's possible. 
The Service Bean implementation actually relies on a couple of service beans. 
It's been a while but you basically need to look them up,

		Context initial = new InitialContext();
			Object obj = initial.lookup(remoteCommandServiceJndiName);
			RemoteCommandServiceHome remoteCommandServiceHome = (RemoteCommandServiceHome) PortableRemoteObject.narrow(obj,RemoteCommandServiceHome.class );
			remoteCommandService = remoteCommandServiceHome.create();

and then you can use the service reference by sending it commands to execute:

result = remoteCommandService.execute(new GetProcessInstanceCommand(processInstanceId));

It's a really good design, but don't get your hopes up, it's not fully functional.
There are only about 6 command objects in the library, barely enough to get a listing of processes and their definitions. That works well. You can even signal transitions. 

I'm patiently waiting to see if someone is going to contribute more commands to check permissions and set actors, get tasks etc...
It might be in there already, but I doubt it. And since the documentation, well    , you're on your own.
Please post what you find here though. I'll have to tackle that myself when I'm done with the POJO implementation.

J.D.


 


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

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



More information about the jboss-user mailing list