[jboss-user] [jBPM] - How to clone and WorkflowProcess object on jBPM5
antmendoza
do-not-reply at jboss.com
Sun Apr 28 14:30:53 EDT 2013
antmendoza [https://community.jboss.org/people/antmendoza] created the discussion
"How to clone and WorkflowProcess object on jBPM5"
To view the discussion, visit: https://community.jboss.org/message/810695#810695
--------------------------------------------------------------
Hi,
I'm trying to clone and WorkflowProcess object but I didn't found any way to do it.
That's because I need to modify a process (adding HT Activities, etc.. through UI) how is associated with each instance on runtime, having as many process as process instances.
I have tested some code like this,
+ String xml = XmlRuleFlowProcessDumper.INSTANCE.dump(+
+ workflowProcessImpl, true);+
+ WorkflowProcessImpl workflowProcessImpl = readProcessFromXml(xml);+
where readProcessFromXml is
+ SemanticModules modules = new SemanticModules();+
+ modules.addSemanticModule(new ProcessSemanticModule());+
+ XmlProcessReader reader = new XmlProcessReader(modules,+
+ ProcessHelper.class.getClassLoader());+
+ reader.read(new InputStreamReader(new ByteArrayInputStream(xml+
+ .getBytes())));+
+ List<org.drools.definition.process.Process> processes = reader+
+ .getProcess();+
+ WorkflowProcessImpl process = (WorkflowProcessImpl) processes.get(0);+
but some process information is lost.
Is there any way to clone a WorkflowProcessImpl object?
Thanks.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/810695#810695]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20130428/e44e2618/attachment.html
More information about the jboss-user
mailing list