2 Replies Latest reply on Aug 2, 2007 4:12 PM by pmuir

    Conditional @CreateProcess

    damianharvey

      I'd like to launch a Business Process from a method if the outcome requires it (in my case it is missing data that needs supervisor attention). If I try to call a method that is annotated with @CreateProcess from another method, then the process is never launched. I can use

      BusinessProcess.instance().createProcess("processName");

      If a process is launched this way it does not have access to the outjected variables so you have to use:
      @In BusinessProcessContext businessProcessContext;
      ...
      businessProcessContext.set("myVariable", "myValue");


      But what would be handy would be "ifOutcome" like @End has. Then it would be as simple as @CreateProcess(ifOutcome="error")

      Does this sounds reasonable or have I missed something?

      Thanks,

      Damian.

        • 1. Re: Conditional @CreateProcess
          damianharvey

          Also I've noticed that if I use @CreateProcess and outject any variables into the Business Process scope then they are available as task variables accessible from the taskInstance like task.variables['variableName'] however when I start the process manually as mentioned above and set the variables with businessProcessContext.set("myVariable", "myValue"); then they aren't.

          What other objects does the @Out populate?

          Thanks,

          Damian.

          • 2. Re: Conditional @CreateProcess
            pmuir

            I think this sounds reasonable, please add a feature request.