1 2 Previous Next 24 Replies Latest reply on Mar 18, 2008 11:11 PM by kukeltje Go to original post
      • 15. Re: Deployment order of dependent process definitions

        Ok I've answered that for myself from looking at the other threads. It is how it works.

        Something feels wrong in all this to me. I'm going to retreat and think, and maybe even make some useful suggestions :)

        • 16. Re: Deployment order of dependent process definitions

          I *really* think this needs a mention in the user guide, in the process composition section.

          • 17. Re: Deployment order of dependent process definitions
            kukeltje

            this is ideed my understanding of how it works.

            • 18. Re: Deployment order of dependent process definitions
              koen.aers

              This is indeed the default behaviour. However, it relies on a default org.jbpm.graph.node.SubprocessResolver implementation. This default implementation is org.jbpm.graph.node.DbSubProcessResolver.
              You can configure your own implementation for this and thus change this default behaviour. The configured name to use is jbpm.sub.process.resolver... Look for details in the implementation of the ProcessState node.

              Regards,
              Koen

              • 19. Re: Deployment order of dependent process definitions
                syedtaj

                I am running into the similar problems, however I am currently executing the jBPMs standalone.

                In that case how do we specify the

                sub-process


                My mail processdefinition looks something like this -

                <process-state name="invokeAutomation">
                <sub-process name="AutomationService"/>
                <transition to="cleanUpPipeline"></transition>
                </process-state>


                The problem is I get a jBPM exception
                can't create a process instance when processDefinition is null
                .

                How exactly do I bind the sub process to the main definition?

                I tried doing this as well - <sub-process name="AutomationService" binding = "late"/>

                the above does not conform to xsd but there is some code in ProcessState that lets you do binding later.

                But again how exactly do I bind.

                I also wanted to write my own resolver, as I understand the configured name is jbpm.sub.process.resolver, do I have to make this configuration in jbpm.cfg.xml. I am confused since I dont find this configuration made in the default configuration.

                If someone can help, it would be great.

                • 20. Re: Deployment order of dependent process definitions
                  syedtaj

                  I tried this as well, with no effect.


                  JbpmConfiguration jbpmConfiguration = JbpmConfiguration.getInstance();
                  JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
                  try {
                  ProcessDefinition processDefinition = ProcessDefinition.parseXmlResource("AutomationService/processdefinition.xml");
                  ProcessInstance instance = new ProcessInstance(processDefinition);
                  jbpmContext.deployProcessDefinition(processDefinition);
                  .......


                  Thus, how do we make available to the process, a sub process? How do we bind both of them?

                  Is it mandatory to deploy in JBOSS to make this happen? It should not be the case, but anyhows, I have hit a dead end.

                  The code in that is causing the exception is in DbSubProcessResolver.java -

                  subProcessDefinition = jbpmContext.getGraphSession().findLatestProcessDefinition(subProcessName);


                  This subProcessDefinition is null, how do we make sure its available. The subProcessName is correct when I print it - AutomationService.

                  Any help will be appreciated, I am stuck for a while in this one. I am sure it is a simple configuration somewhere, but I am unable to figure it out.

                  • 21. Re: Deployment order of dependent process definitions
                    syedtaj

                    Hello,

                    I found the problem, in the below code, I was using two different context objects.

                    The following link has some more details on it

                    http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3981392#3981392

                    What is also important is as this topic suggests, is the order of deployment, the sub process needs to get deployed first and then the super process needs to get deployed.

                    • 22. Re: Deployment order of dependent process definitions
                      kukeltje

                      it only needs to be deployed in that order if you do not use 'late binding' on subprocesses

                      • 23. Re: Deployment order of dependent process definitions
                        syedtaj

                        Absolutely.

                        However, I wonder why the attribute - binding="late" is not added in the xml schema, I only found out by going through the code that we can actually use that.

                        Should'nt the xml schema definition be updated?

                        • 24. Re: Deployment order of dependent process definitions
                          kukeltje

                          you mean http://jira.jboss.com/jira/browse/JBPM-1003 is not fixed? Which docs have you used? look at the latest in CVS

                          1 2 Previous Next