0 Replies Latest reply on May 23, 2008 2:14 AM by trouby

    starting a JBPM process based on a var

    trouby

      Hey,
      According to the current @CreateProcess annotation, it is impossible to set an EL expression for the 'definition' part,


      I would like to start a process without specifying a static name. since it cannot be done with @CreateProcess I would like to do by using JBPM's apis,



      I would go for something like:


        @In private JbpmContext jbpmContext;
        
        public void myFunc() {
           ...
           ProcessInstance process = jbpmContext.newProcessInstanceForUpdate(dynamicName);          
           Process.setKey(businessKey);
           process.signal();
        }
      



      But according to Seam's code, I see that it is also required to associate the created process in the current active conversation (according to org.jboss.seam.bpm.BusinessProcess class)


      How(/why) important it is? and if it is important, how do I associate the process to the current conversation by my component?




      Thanks,


      Asaf.