-
1. Re: [JBPM4] How to maintain class files for different Proces
shekharv Jul 24, 2009 12:10 AM (in response to sushantgupta402)I am not sure i understand,
Are you saying ur process definitions refer to different versions of the same class? As in an updated process def has the updated version and older one uses the original.
Give it a name spaced package name? version1.Handler, version2.Handler? Any one consistent strategy would work I guess. -
2. Re: [JBPM4] How to maintain class files for different Proces
sushantgupta402 Jul 24, 2009 12:15 AM (in response to sushantgupta402)You understood it correctly but does is there any otehr way because changing the class name doesn't looks like a clean approach. Is there something like JBPM3 where u need not care for the class packaging?
-
3. Re: [JBPM4] How to maintain class files for different Proces
shekharv Jul 24, 2009 1:02 AM (in response to sushantgupta402)How are you deploying these processes?
-
4. Re: [JBPM4] How to maintain class files for different Proces
sushantgupta402 Jul 24, 2009 1:06 AM (in response to sushantgupta402)Using
repositoryService.createDeployment()
.addResourceFromClasspath("org/jbpm/examples/services/Order.jpdl.xml")
.deploy(); -
5. Re: [JBPM4] How to maintain class files for different Proces
shekharv Jul 24, 2009 1:08 AM (in response to sushantgupta402)Which would mean, bundled within your own application?
What do you mean by jbpm3 not caring for class packaging? -
6. Re: [JBPM4] How to maintain class files for different Proces
sushantgupta402 Jul 24, 2009 1:22 AM (in response to sushantgupta402)In JBPM3 even if there is some change in the class what all you have to do is make relevant changes in the class and deploye the whole process. No need to change the package of the class or class name. But in JBPM 4 you have to change the class name of class package both of which will result in changes not related to the business process modification.
-
7. Re: [JBPM4] How to maintain class files for different Proces
shekharv Jul 24, 2009 1:40 AM (in response to sushantgupta402)OK, I do not think we are on the same page,
Why do you want to change the class name or package name in the first place? The reason I recommended as an option was if you had to change the behavior of a certain class that gets invoked as part of the jbpm process execution.
Say you have an assignment handler com.foo.Assign. This is currently deployed in a process definition ABC with version 1. If you have to deploy version 2 of the process, with changes to the code to com.foo.Assign, not always can you go ahead and do that, because some executions might already exist out there that could potentially break if you change the code of that class. If that is the case you have to version your class accordingly, and use the newer version in the new process deployment. If you think that changing the code does not impact the process definition, then why change the name of the class? -
8. Re: [JBPM4] How to maintain class files for different Proces
sushantgupta402 Jul 24, 2009 1:47 AM (in response to sushantgupta402)But in JBPM3 even if there is a chnage in the class definition one need not version their classes. JBPM takes care of the class versioning itself. But it seems that facility is not there in the JBPM4 please refer
<JBPM4 Home directory>/doc/userguide/html_single/index.html#deployingclasses.
But once discussing with one of the guy somewhere I came to know there is a way to handle this without changing the class but I could not recollect it. So posted in the forum. -
9. Re: [JBPM4] How to maintain class files for different Proces
camunda Jul 24, 2009 2:38 AM (in response to sushantgupta402)Hi sushantgupta402.
True, jbpm 3 deployed class files to the database. We discussed that for jbpm 4 but at least moved it to a later stage. Actually I thiunk it is not a good idea to deploy classes to the database.
YOu could still achieve something like that if you use the JBoss deployer, but this is still experimental in the current code base.
It goes in this direction: http://www.bpm-guide.de/2008/10/16/jbpm-deployer-for-jbpm-in-enterprise-environments/ and http://www.bpm-guide.de/2008/11/14/jbpm-deployer-status-and-sourcecode/
Cheers
Bernd -
10. Re: [JBPM4] How to maintain class files for different Proces
camunda Jul 24, 2009 2:39 AM (in response to sushantgupta402)