[JBoss jBPM] - Retriving task instances for user
by dlipski
Hi
I have one more problem using jBPM.
If i want to get all task instances for actor (push/pull) do i have to start from getTaskMgmtSession().findTaskInstances(actorID) always?
Is there any other way ?
If no, how to get task instances gropued by task nodes ?
Something like this doesn't work (ClassCast):
List<TaskInstance> tasks = workflowConfig.createJbpmContext().getTaskMgmtSession().findTaskInstances(actorId);
|
| Map<TaskNode, List<TaskInstance>> instancesGrouped = new HashMap<TaskNode, List<TaskInstance>>();
| for(TaskInstance task : tasks)
| {
| //ClassCast here
| TaskNode taskNode = (TaskNode)task.getToken().getNode();
| List<TaskInstance> instances = instancesGrouped.get(taskNode);
| if(instances == null)
| {
| instances = new ArrayList<TaskInstance>();
| instancesGrouped.put(taskNode,instances);
| }
| instances.add(task);
|
| }
Maybe there is other, simplier way to do this.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3958872#3958872
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3958872
19 years, 9 months
[JBoss Seam] - Re: Persistence - Switching DB to Postgres - Schema Export f
by tkrah
Edit:
Ok - forget to sync the databases in dvd-ds.xml and persistence.xml.
Now i changed following files:
dvd-ds.xml, persistence.xml and jboss-beans.xml to use my postgres DB.
Now i get another exception - which confuses me, because the url is correct, and the driver class too - using this jdbc url and driver in another project, which works fine there.
| Caused by: org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (org.jboss.resource.JBossResourceException: Apparently wrong driver class specified for URL: class: org.postgresql.Driver, url: jdbc:postgresql://localhost:5432/mydb)
|
and before that:
| Caused by: org.jboss.resource.JBossResourceException: Failed to register driver for: org.postgresql.Driver; - nested throwable: (java.lang.ClassNotFoundException: No ClassLoaders found for: org.postgresql.Driver)
|
Included jdbc3-postgresql.jar in WEB-INF/lib directory of dvdstore example - anything else i have to do?
kind regards
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3958870#3958870
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3958870
19 years, 9 months