How to add a related content in a java service using execution object
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-02-2013 08:23 AM
I am using Activit 5.14 & activiti explorer.
I have a java service defined. I would like to generate a html table and add it as a related content.
I spent some time looking at in the debugger execution object. It has lot of members such as tasks etc. But not clear to me how to get taskservice instance and task id from execution object.
In the following example I see that given taskservice instance and task id, I can create the related content.
https://docs.google.com/spreadsheet/ccc?key=0Ahh6WozhxGl9dFlMbVRxSWNFODhSWWlXXy1XcEl5SEE&usp=drive_w...
Pleas let me know how to get taskservice instance and task id from execution object.
I have a java service defined. I would like to generate a html table and add it as a related content.
I spent some time looking at in the debugger execution object. It has lot of members such as tasks etc. But not clear to me how to get taskservice instance and task id from execution object.
In the following example I see that given taskservice instance and task id, I can create the related content.
https://docs.google.com/spreadsheet/ccc?key=0Ahh6WozhxGl9dFlMbVRxSWNFODhSWWlXXy1XcEl5SEE&usp=drive_w...
Pleas let me know how to get taskservice instance and task id from execution object.
Labels:
- Labels:
-
Archive
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2013 05:31 AM
If you are in a Service-task, you can call
execution.getEngineServices().getTaskService().createTaskQuery().executionId(execution.getId()).list();
