1 Reply Latest reply on Feb 22, 2006 1:47 PM by christianbacher

    TaskInstance setting variables

    christianbacher

      hello,
      (jbpm3.1,postgresql8,java1.5,jboss4.0.3SP1),

      i wan't to set a variable in the taskinstance by the call:

      JbpmConfiguration jbpmConfiguration = JbpmConfiguration.getInstance();
      JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
      // get current hibernate session from the container
      org.hibernate.Session s = getCurrentSession();
      jbpmContext.setSession(s);
      // this works
      ProcessInstance processInstance = jbpmContext.loadProcessInstanceForUpdate(piid);
      // this works
      Token token = processInstance.findToken(execPath);
      // this works
      Collection<TaskInstance> tis = processInstance.getTaskMgmtInstance().getUnfinishedTasks(token);
      TaskInstance ti = tis.iterator().next();
      // this does not work
      ti.setVariable(key,value);


      the following warning occurs:
      No connection properties specified - the user must supply JDBC connections

      after that an exception is thrown by hibernate (Dialect not set ..)

      All other jbpm instances (ContextInstance, ProcessInstance etc) are working correctly in the same context.

      It seems that there is some problem with the user provided
      Session.

      Does anyone know something about that problem?

      Thanks and Best Regards,
      Christian