Open eriknyk opened 10 years ago
Hi, when you create a new ProcessManager, the bpmn model is stored in cache. When you start a new instance of this bpmn model you use processManager.createProcess and trigger the start Event in its callback. Parsing the xml again is only necessary when you have changes in your model.
Hi,
I saw that to use bpmn.createUnmanagedProcess("path/to/myProcess.bpmn", ...}); or bpmn.createUnmanagedProcessFromXML("<definitions ... ", ...);
the first parameter is always the bpmnXml source,.. I know that XML Parsing is a little hardest work, and it consume resources (processor and memory),..
I think that if we are always passing the bpmnXML source as first param, it always is parsing the schema to json. The question is, is there a way to persist the first parse of the schema,. (or cache), to do not parse the xml each time that we need to use an instance of a given process.
By example:
------------------------------------------File A ---------------------------------------------
------------------------------------------File B ---------------------------------------------
So, on both files I need to pass bpmnXML string, and I assume that the engine is parsing twice the xml. The best way would be parse the xml at first time, give me an ID,... and on the second file B, I create the processManager instance with the given ID, and do not pass again the XML.
BEST REGARDS.