Why not create a process deployer class that deploys your process and save your xml on the database as text at the same time, i.e. if you have not started yet. Just get the process id out so you can reference your xml file. If you have already started and want to view existing process in xml, i think you can create one be querying the struc using jdbc and forming the xml. I don't know if they have a method to reverse-engineer that directly. Anyway, just a suggestion.
There's an alternate approach that requires no coding at all. Just store a copy of your process definition anywhere in the process archive, in addition to processdefinition.xml. That way, the deployer will treat the copy as a resource file and save it to the database.
Perhaps the deployer should have the option to save processdefinition.xml as a resource. What do you guys think?
The second approach seems simple since it looks this is the natural way of doing what I want at the moment.
Thanks, guys for the answer.
In relation to your posts, guys,
does anybody have an idea how to get a hash from what is deployed in the database on one hand, and what we have locally as a par file on the other hand?
I want my app to to check at startup whether the par on the filesystem needs to be deployed to the database. Ideally, the hash would include not only processdefinition.xml, but the classfiles too.