JBoss Community

Re: Help with examples

created by Julio Faerman in jBPM - View the full discussion

Yes, that did it :)

{code:xml}

    <scriptTask id="_2" name="Hello" >

      <script>

          System.out.println("### Starting Greetings process ###");

          org.drools.runtime.process.WorkflowProcessInstance process = (org.drools.runtime.process.WorkflowProcessInstance)kcontext.getProcessInstance();

          kcontext.getKnowledgeRuntime().insert(process);

          System.out.println("### Inserted process instance ###");

      </script>

    </scriptTask>

{code}

 

But it is stil a bit of a hack... it would be nice to be able to "prepare" the process before starting it or even having the process instance inserted automatically.

Reply to this message by going to Community

Start a new discussion in jBPM at Community