3 Replies Latest reply on Apr 27, 2007 11:14 AM by Ronald van Kuijk

    Adding Tasks programatically

    Bart Veenstra Newbie

      Hi all,

      I am investigating the use for JBPM in my current project, and I have an requirement to add and assign tasks dynamically.

      This means that when I enter a Node, it looks up an object in hte DB and then it needs to create 0..* tasks which need to be assigned to the users.

      I have seen how to create actions at runtime, but when I try to add an implementation of a TaskControllerHandler in the RuntimeAction I get an ClassCast exception:
      16:17:08,649 [main] ERROR GraphElement : action threw exception: com.sample.action.ProcessStepTask cannot be cast to org.jbpm.graph.def.ActionHandler
      java.lang.ClassCastException: com.sample.action.ProcessStepTask cannot be cast to org.jbpm.graph.def.ActionHandler

      Could someone point me in the right direction on how to add tasks programatically?

      Regards,

      Bart