2 Replies Latest reply on Jan 3, 2006 9:21 AM by Sivajee Akula

    Task Management

    Sivajee Akula Newbie

      Hi all,

      First of all I wish everyone a very Happy New Year.

      Regarding this post, I am in need of the following functionality:

      Whenever a signal is given to a processInstance, I need to persist the Id(s) of all taskInstance(s) which were created because of the current signal.

      Is there any way to get hold of the taskInstances which were created on signal of a process-Instance?
      I had looked up the api-documentation of task-management, in which I found API for getting unfinished tasks. But from that list how can I fetch those taskInstances which were created because of the current signal.

      Looking forward for suggestions/help

      Thanks in advance


        • 1. Re: Task Management
          Alejandro Guizar Master

          Retrieve the assignment logs after your signal, like this:

          LoggingInstance loggingInstance = token.getProcessInstance().getLoggingInstance();
          List assignmentLogs = loggingInstance.getLogs(TaskAssignLog.class);
          Iterator iter = assignmentLogs.iterator();
          while (iter.hasNext()) {
           TaskAssignLog taskAssignLog = (TaskAssignLog) iter.next();
           TaskInstance taskInstance = taskAssignLog.getTaskInstance();
           // [...]

          For an example, see org.jbpm.webapp.bean.TaskBean#saveAndClose().

          • 2. Re: Task Management
            Sivajee Akula Newbie

            Thank you Alex. It had worked. Instead of using "TaskAssignLog.class", I am using "TaskCreateLog.class".

            And can you please elaborate more on these Log classes. Where they are being used in jBPM.