I am new to jBPM so this question may sound dumb.
I just joined a project which uses jBPM with a process of 100+ tasks. Now in the integration testing, in order to test a task, for example task #75, we have to go through the first 74 tasks to prepare the process instance, which is obviously very time consuming.
My question is that: is it possible to make a snapshot of the process instance, its token tree, and its task instances, then restore the whole thing later? In my example, I will make a snapshot right after task #74 is done, then do my testing of #75, then rewind back to the snapshot so I can retake #75 if needed.
I am thinking of serialize all these objects into an external file.
Please let me if there is an existing approach out there. and please comment on this approach if it is possible.
Thanks a lot.
You can easily do unit test for each step : you create the workflow programatically, you set the variables manually with code too, you execute what you want and test the result... Pretty classic.