-
1. Re: API Migration from jBPM 3 to jBPM 5
salaboy21 Sep 10, 2011 10:41 AM (in response to huionn)Hi Hui,
Let's go straight to the answers:
1) the migration project, now included in jbpm5 is only for process definitions not fo the API usage
2) Yes, you will probably need to do it manually, and it really depends on what you are doing with jBPM3, because there are some not mappeable methods
3) I'm not sure about this, you can probably get the WorkflowProcessInstance, get the Process definition with some getProcess() method or something similar and then get the start and end node. I'm not sure what do you want to do that, but I think you can do it in some way, it should be so difficult.
Hope it helps!
-
2. Re: API Migration from jBPM 3 to jBPM 5
huionn Sep 10, 2011 10:50 AM (in response to salaboy21)Thanks for your answer. You are very helpful in this community. I get the idea what I have to do now.
Anyway, just as a comment, getStart() and getEnd() of jBPM3 ProcessInstance return start date and end date respectively. The dates are important in the application.
I hope "it should be so difficult" is a typos
-
3. Re: API Migration from jBPM 3 to jBPM 5
salaboy21 Sep 10, 2011 11:01 AM (in response to huionn)hehe yes.. it was a typo.. I'm sleepy...
So if you want to get the start dates and end dates you can use your approach of storing the information somewhere with the org.drools.event.process.ProcessEventListener and then query that information. I'm not sure if adding that as process varible will be useful, do you need that information inside your process or you want to show that information in an administration console or something like that?
Cheers
-
4. Re: API Migration from jBPM 3 to jBPM 5
huionn Sep 10, 2011 11:42 AM (in response to salaboy21)Hi Mauricio,
I think you are right that the dates are not very useful. The start date is used for sorting and display purpose only.
-
5. Re: API Migration from jBPM 3 to jBPM 5
salaboy21 Sep 10, 2011 11:48 AM (in response to huionn)If it's an important requirement for you I suggest you to insert that information somewhere (for example in a database) and using the ProcessEventListener and a new named query you can restore that information when you need to display it
Hope it helps
-
6. Re: API Migration from jBPM 3 to jBPM 5
huionn Sep 10, 2011 12:35 PM (in response to salaboy21)You meant storing "start date", "end date" and other informations of process instance directly into process variable is less useful because the values are stored in binary format which cannot be queried for reporting/display?
I think I know how to do it after checking https://github.com/droolsjbpm/jbpm/blob/master/jbpm-persistence-jpa/src/test/java/org/jbpm/persistence/session/VariablePersistenceStrategyTest.java