-
1. Re: Task priority problem
tom.baeyens Aug 24, 2005 10:33 AM (in response to guillem)http://jira.jboss.com/jira/browse/JBPM-325
thanks for reporting. i'll have a look later. you can monitor progress in the issue.
regards, tom. -
2. Re: Task priority problem
michaelholtzman Aug 1, 2006 1:12 PM (in response to guillem)The JIRA issue for this is marked as closed, but it is STILL a problem.
(http://jira.jboss.com/jira/browse/JBPM-325)
The priority assigned to the task in the process definition is not propagated to the task instance.
If we look at the hibernate cfg for task ...<?xml version="1.0"?> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"> <hibernate-mapping default-access="field"> <class name="org.jbpm.taskmgmt.def.Task" table="JBPM_TASK"> <cache usage="nonstrict-read-write"/> <id name="id" column="ID_"><generator class="native" /></id> <!-- GRAPHELEMENT --> <property name="name" column="NAME_" /> <many-to-one name="processDefinition" column="PROCESSDEFINITION_" foreign-key="FK_TASK_PROCDEF"/> <map name="events" cascade="all"> <cache usage="nonstrict-read-write"/> <key column="TASK_" foreign-key="FK_EVENT_TASK" /> <index column="EVENTTYPE_" type="string"/> <one-to-many class="org.jbpm.graph.def.Event" /> </map> <list name="exceptionHandlers" cascade="all"> <cache usage="nonstrict-read-write"/> <key column="TASK_" foreign-key="none" /> <list-index column="GRAPHELEMENTINDEX_" /> <one-to-many class="org.jbpm.graph.def.ExceptionHandler" /> </list> <!-- ============ --> <property name="description" type="string_max" column="DESCRIPTION_" length="4000"/> <property name="isBlocking" column="ISBLOCKING_" /> <property name="isSignalling" column="ISSIGNALLING_" /> <property name="dueDate" column="DUEDATE_" /> <property name="actorIdExpression" column="ACTORIDEXPRESSION_" /> <property name="pooledActorsExpression" column="POOLEDACTORSEXPRESSION_" /> <many-to-one name="taskMgmtDefinition" column="TASKMGMTDEFINITION_" foreign-key="FK_TASK_TASKMGTDEF"/> <many-to-one name="taskNode" column="TASKNODE_" foreign-key="FK_TASK_TASKNODE"/> <many-to-one name="startState" column="STARTSTATE_" foreign-key="FK_TASK_STARTST"/> <many-to-one name="assignmentDelegation" column="ASSIGNMENTDELEGATION_" foreign-key="FK_TASK_ASSDEL" cascade="all" /> <many-to-one name="swimlane" column="SWIMLANE_" foreign-key="FK_TASK_SWIMLANE"/> <many-to-one name="taskController" column="TASKCONTROLLER_" foreign-key="FK_TSK_TSKCTRL" cascade="all" /> </class> </hibernate-mapping>
... there is no property for PRIORITY. When a task instance is spawned from the task, it always gets the default priority of "3". -
3. Re: Task priority problem
kukeltje Aug 1, 2006 5:27 PM (in response to guillem)hmm.. the testcase itself does probably not use persistency, so it works as long as persistency is not involved. I reopend this issue. Lets see what Tom thinks about it. What version of jBPM are you using btw?
-
4. Re: Task priority problem
michaelholtzman Aug 1, 2006 6:07 PM (in response to guillem)Currently using 3.1, but I hope to migrate to 3.1.2 in the next few weeks.
-
5. Re: Task priority problem
kukeltje Aug 1, 2006 6:18 PM (in response to guillem)hmm..... I looked into this a little and came to the conclusion (should have seen that directly) that your hbm file is for the the task in the process definition, org.jbpm.taskmgmt.def.Task. Task instances are in org.jbpm.taskmgmt.exe.TaskInstance. The accompanying hbm file contains the priority, at least it does in the 3.1.2 branche. It does not mean it is no bug, but it could be I reopened the issus to quick.
There are some testcases for this, could you create a unit test WITH db? -
6. Re: Task priority problem
kukeltje Aug 1, 2006 7:02 PM (in response to guillem)and I read again, and see that you indeed mention the PD, not PI, so sorry.
So it seams right. You can set it designtime in the PD but it is not stored in the db. Setting it runtime does work? -
7. Re: Task priority problem
michaelholtzman Aug 7, 2006 12:02 PM (in response to guillem)Yes, setting it at run time does work.
I am working around the problem by setting the priority that I need in the task assignment handler.
However, having the priority correctly assigned when the task instance is created would be "nicer". -
8. Re: Task priority problem
kukeltje Aug 7, 2006 12:27 PM (in response to guillem)setting it runtime also persists it, right?
-