jbpm - query all unassigned tasks -
i'm using jbpm 6.2 , i'm trying query tasks have not been assigned yet. taskservice doesn't seem (or @ least have not found proper method).
how can done?
i did using bamtasksummary table, not sure if way it.
to first tried bamtaskeventlistener @ runtimemanager (so started recording table):
defaultregisterableitemsfactory registerableitemsfactory = new defaultregisterableitemsfactory(); registerableitemsfactory.addtasklistener(bamtaskeventlistener.class); emf = persistence.createentitymanagerfactory("org.jbpm.persistence.jpa"); runtimeenvironmentbuilder builder = runtimeenvironmentbuilder.factory.get() .newdefaultbuilder().entitymanagerfactory(emf).registerableitemsfactory(registerableitemsfactory) .knowledgebase(kbase);
with code had problem, bamtaskeventlistener didnt have empty constructor in jbpm 6.2 , there problem in instantiation...i extended add empty constructor , worked fine:
public class bamtaskeventlistenerext extends bamtaskeventlistener{ public bamtaskeventlistenerext() { super(null); // todo auto-generated constructor stub } public bamtaskeventlistenerext(boolean flag) { super(flag); // todo auto-generated constructor stub } public bamtaskeventlistenerext(entitymanagerfactory emf) { super(emf); // todo auto-generated constructor stub } }
and registeded:
defaultregisterableitemsfactory registerableitemsfactory = new defaultregisterableitemsfactory(); registerableitemsfactory.addtasklistener(bamtaskeventlistenerext.class);
Comments
Post a Comment