-
1. Re: Seam and jBPM - designer produces package, in components.xml the file is referenced
mwohlf Mar 16, 2009 4:26 PM (in response to kibojan)as far as I understand the output from the designer tool the package consist of 3 files:
- processimage.jpg: a picture of the process as seen in the designer
- gpd.xml: some layout information about the positions of the nodes and edges of the process picture
- processdefinition.xml: is probably the file you need in components.xml, the process definition itself
I have just a stub for jbpm in components.xml and feed the whole file directly into the jbpmContext like this:
ProcessDefinition pd = ProcessDefinition.parseParZipInputStream(zipStream); jbpmContext.deployProcessDefinition(pd);
to make sure the tables are set up I use a postInitialization Observer:
@Scope(STATELESS) @Name("jbpmSetup") public class JbpmSetup { @Logger Log log; @In(create = true) Jbpm jbpm; @Observer("org.jboss.seam.postInitialization") public void startup() { try { jbpm.startup(); JbpmConfiguration config = jbpm.getJbpmConfiguration(); JbpmContext context = config.createJbpmContext(); context.getSession().flush(); } catch (Exception e) { e.printStackTrace(); } } }
I use this approach since there seems to be problems with process definitions being deployed multiple times on startup...
-
2. Re: Seam and jBPM - designer produces package, in components.xml the file is referenced
kibojan Mar 18, 2009 11:50 AM (in response to kibojan)Thanks for your reply but that seams like workaround. When they built the designer as they built it, they surely must have had a vision of how should that package is to be used. Now, I am using designer version 3.1.3.GA shipped along with JBoss Tools 2.1.2. Seam version is 2.0.2. which has jbpm-jpdl-3.2.2.jar bundled.
The question is:
How should I reference created package in components.xml?
- again, I am not going to experiment when I only need info about a thing that already works.every source I read on the topic says:
<value>xyz.jpdl.xml</value>
should be entered in components.xml
-
3. Re: Seam and jBPM - designer produces package, in components.xml the file is referenced
paulmkeogh Mar 18, 2009 12:23 PM (in response to kibojan)These are my notes from doing some jBPM experimentation;
The BPM resources of;
hibernate.cfg.xml
jbpm.cfg.xml
BPM/*
must reside under the EarContent folder of the xxx-ear project.
The process definition files are referenced from WebContent/WEB-INF/components.xml like;
<bpm:jbpm>
<bpm:process-definitions>
<value>BPM/checkout.jpdl.xml</value>
</bpm:process-definitions>
<bpm:pageflow-definitions />
</bpm:jbpm>
Expect obscure errors around XML parser failure if the files are not locatable.
Hope this helps. -
4. Re: Seam and jBPM - designer produces package, in components.xml the file is referenced
mwohlf Mar 18, 2009 1:11 PM (in response to kibojan)well, I don't see my approach as a workaround since:
- my requirement is to deploy a new version of the process definition without restarting the application, not sure how to do this with components.xml only
- as I understand Pete Muir at https://jira.jboss.org/jira/browse/JBSEAM-1034, deploying process definitions in components.xml is not intended for production
but I am open for better ideas of course...
-
5. Re: Seam and jBPM - designer produces package, in components.xml the file is referenced
kukeltje.ronald.jbpm.org Mar 18, 2009 1:28 PM (in response to kibojan)
Michael Wohlfart wrote on Mar 18, 2009 13:11:
well, I don't see my approach as a workaround since:- my requirement is to deploy a new version of the process definition without restarting the application, not sure how to do this with components.xml only
- as I understand Pete Muir at https://jira.jboss.org/jira/browse/JBSEAM-1034, deploying process definitions in components.xml is not intended for production
but I am open for better ideas of course...You are completely right.