I am evaluating jBPM to use with a version control system (VCS). I know that jBPM is designed to be used in conjunction with hibernate, but I would like to replace the RDBMS by the version control system repository. (at least for task and process instances and process definitions) The process definition can easily be stored in the VCS and then parsed and loaded. The tricky part comes with processInstances and taskInstances. I could try to store these as "work items" in the VCS (like a tupple + attributes in a RDBMS).
What is the most appropriate way to implement this? - replace TaskMgmtSession and GraphSession but my own Class to retrieve tasks and processintances? - or work on the hibernate level and create a custom EntityPersister to access the VCS.
Also I wonder how it could work with concurrency (as i does with hibernate). Say user1 finishes his task. taskInstance1.end() at the same time user2 finishes his. taskInstance2.end() now the processinstance should move automatically to the next stage.