You want to obtain a task Description??
why don't you use TaskMgmtSession http://docs.jboss.org/jbpm/v3/javadoc/org/jbpm/db/TaskMgmtSession.html
and then with your TaskInstances the getDescription() method?
I think that I'm missing something here...
HOpe it helps
Thanks for your quick answer!
In the projekt I'm working on, there is no TaskMgmtSession. So I create a new one:
TaskMgmtSession tms = new TaskMgmtSession(...);
and for this I need a JbpmSession. But JbpmSessions are deprecated!
So how can I use TaskMgmtSession?
I think you need to obtain the TaskMgmtSession from de JbpmContext..
With TaskMgmtSession I can obtain the Task-ID and the Task-Name but the Description is always NULL :-(
I tried these lines, but it doesn't work.
JbpmConfiguration jbpmConfiguration = JbpmConfiguration.getInstance();
JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
TaskMgmtSession tms = new TaskMgmtSession(jbpmContext.getSession());
Does anyone have other/more proposals how to obtain the content of the description-tag of a task??
Yes, now I realize the problem... is not an API problem..
Is that you are setting the description of the task-node and not the description of the taskInstance.
Check out in your code.. and look where did you put the description...
Hope it helps...
1. What du you mean with where I put the description?
The description is in the processdefinition.xml, for example so:
2. I thought this line says that I'm getting the the description of the taskInstance:
If not, what would you change?
The example was not sumitted right. It should look like this:
<task-node name="..."> <description> ... </description> <task name="...">...</task> </task-node>
To retrive the description of a task-node or a taskInstance you first need to set it.
So you can set it via API with the setDescription method or you can set it in the processdefinition.xml:
<task-node name="task-node1"> <description> Task-NODE description!!!!!!!!!! </description> <task name="taskInstanceName"> <description> Task INSTANCE DESCRIPTION!!!!!!!!!! </description> </task> </task-node>
Look for the tags called description and notice the diference!
Ok, one week later I found the time to work on still the same problem.
So now I know, that when I set the description I can retrieve it again. But my task is to retrieve a description that is already written in the processdefinition.xml. That means I don't wanna set any description, because it is already in the xml file.
Can it be, that when the file is parsed the description is not retrieved?
This would mean that TaskMgmtSession doesn't help me. Is there a way to retrieve the description anyway???