-
1. Re: description-tag
salaboy21 Nov 11, 2008 10:03 AM (in response to webernie)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?
http://docs.jboss.org/jbpm/v3/javadoc/org/jbpm/taskmgmt/exe/TaskInstance.html
I think that I'm missing something here...
HOpe it helps -
2. Re: description-tag
webernie Nov 11, 2008 10:53 AM (in response to webernie)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(...);
tms.getTaskInstance(task.getId()).getDescription()
and for this I need a JbpmSession. But JbpmSessions are deprecated!
So how can I use TaskMgmtSession? -
3. Re: description-tag
salaboy21 Nov 11, 2008 10:55 AM (in response to webernie)I think you need to obtain the TaskMgmtSession from de JbpmContext..
-
4. Re: description-tag
webernie Nov 11, 2008 1:13 PM (in response to webernie)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());
tms.getTaskInstance(task.getId()).getDescription();
tms.getTaskInstance(task.getId()).getTask().getDescription() );
Does anyone have other/more proposals how to obtain the content of the description-tag of a task?? -
5. Re: description-tag
salaboy21 Nov 11, 2008 1:17 PM (in response to webernie)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... -
6. Re: description-tag
webernie Nov 11, 2008 1:30 PM (in response to webernie)1. What du you mean with where I put the description?
The description is in the processdefinition.xml, for example so:
<task-node name="...">
...
...
</task-node>
2. I thought this line says that I'm getting the the description of the taskInstance:
tms.getTaskInstance(task.getId()).getDescription();
If not, what would you change? -
7. Re: description-tag
webernie Nov 11, 2008 1:32 PM (in response to webernie)The example was not sumitted right. It should look like this:
<task-node name="..."> <description> ... </description> <task name="...">...</task> </task-node>
-
8. Re: description-tag
salaboy21 Nov 11, 2008 1:33 PM (in response to webernie)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! -
9. Re: description-tag
webernie Nov 17, 2008 9:22 AM (in response to webernie)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???