0 Replies Latest reply on Jan 11, 2011 10:58 AM by pawel.gutowski

    jBPM4.4 and jbpm-console: obtaining user

    pawel.gutowski

      I would like to display in the task form the information who has started the recent process instance.

      Moreover I'd like to run this porcess on jbpm-console...

       

      My idea was to make an EventListner which was supposed to set the process variable with the user id.

       

      My process jPDL looks like this:

      <process name="myprocess" xmlns="http://jbpm.org/4.4/jpdl">
          <on event="start">
              <event-listener class="org.gutek.helpers.InitProcessDataListener"/>
          </on>
      
          <start g="126,22,48,48" name="start1">
            <transition to="business creation"/>
          </start>
      
          <task candidate-users="user_a,user_b" form="org/gutek/view1.ftl" g="83,96,132,52" name="business creation">
              <transition to="end1"/>
          </task>
      
         <end g="127,291,48,48" name="end1"/>
      </process>
      

       

      The task form:

                  
             Process created by:                  
       

       

      And the listener (org.gutek.helpers.InitProcessDataListener):

      public class InitProcessDataListener implements EventListener {
          @Override    public void notify(EventListenerExecution execution) throws Exception {
      
              execution.setVariable("business_created_by", "User-X");
          }
      }
      

       

      My questions:

      1. How to find the real user creating the process, not "User-X" as above?

      2. Is it possible to find not only the process creator, but also who made the last change in the process?

       

      Jbpm-console is nice for prototyping and modelling simple processes.

      But I suppose that case shown above is too "complex" for running in the jbpm-console, so question 3:

      3. Could somebody describe in a few sentences where is the border of process complexity for running in the jbpm-console?

       

      Environment:

      jbpm-4.4

      jbpm-console: 2.1

      JBoss v.5.1.0.GA

       

       

      Best regards,

      Pawel Gutowski