- 
        1. Re: Clone a Process Instancekukeltje May 20, 2009 4:55 AM (in response to frinux)what is the advantage of cloning? You can always modify all values and still have a history log that shows what happened. imo much easier.If you create an adhoc task in the process, that is executed at that moment, you have a specific entry in the log that everything is reset. 
- 
        2. Re: Clone a Process Instancefrinux May 20, 2009 10:12 AM (in response to frinux)Sorry but i did not understand what you're telling me. 
 Yes, I want to keep a trace of my process, but more than that, I wanna split my process in two:
 - one (which correspond to the part before now) will be ended (processInstance.end() )
 - and the second (which correspond to the part after now) will be kept as active
- 
        3. Re: Clone a Process Instancekukeltje May 22, 2009 8:53 AM (in response to frinux)Yes, I understood what you 'want' but that is not easy. What I tried to say is: 
 - leave the intial process running
 - create a task that 'rests' all kinds of values and e.g. call it 'reset'
 - this creates a log entry that you can always trace (it's like the 'end' of the process, but not a real end)
 - you process continues.
 Much easier to achieve
- 
        4. Re: Clone a Process Instancefrinux May 26, 2009 5:31 AM (in response to frinux)Hum I can't do it this way, because I have to retrieve both processInstance after. They have to be explicitely twho processInstance, not one which has been modified. 
 I found a way though, but I can't make it work.
 I create a new ProcessInstace and give it the var I want. When saving it, I get the exception:
 save the transient instance before flushing: tokenvariablemap
 Here is my code:
 http://pastebin.com/m24690e08
- 
        5. Re: Clone a Process Instancekukeltje May 26, 2009 1:58 PM (in response to frinux)I found a way though, but I can't make it work. 
 That is cool. You found a way but cannot make it work. IMO you did not find a way then, at least not yet ;-)
 Not sure but it might be related to some hibernate deepcloning stuff. Never tried this, so I'm not sure.
- 
        6. Re: Clone a Process Instancefrinux May 26, 2009 2:24 PM (in response to frinux)Yep, I meant I may have found a way... At least I think it could be a pretty solution... 
 It must come from Hibernate, maybe it's not possible to manipulate 2 processInstances in the same jbpm session...
 I'm gonna work on this way (and I have no other idea!)
 
    