DelegateExecution

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-03-2012 11:36 PM
I have implemented a JavaDelegate and have found that the DelegateExecution interface just doesnt give me enough information from what I know is available through the implementation.
In particular I would like:
public String getProcessDefinitionId()
public String getParent()
In particular I would like:
public String getProcessDefinitionId()
public String getParent()
Labels:
- Labels:
-
Archive
2 REPLIES 2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-04-2012 02:15 AM
That seems like a valid addition to the DelegateExecution interface. I'll make sure they're added to the 5.10. In the mean time, I guess there is no other option than casting to the implementation-class…

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-09-2012 03:22 AM
Is it possible to query the RuntimeService and RepositoryService, as an alternative, to obtain the information currently not exposed through the DelegateExecution interface? One problem I have encountered is that retrieving the process instance via the listed services will not work unless the BMPN flow has previously passed through a step that caused the process instance information to be persisted. Are there any alternatives, as I would like to avoid casting the interface to its implementation class?
Please note the fields I am after are the following:
- ProcessDefinitionName
- ProcessDefinitionId
Looking at the DelegateExecution interface under the 5.10 tag (http://svn.codehaus.org/activiti/activiti/tags/activiti-5.10/modules/activiti-engine/src/main/java/o...), it would seem the ProcessDefinitionId will be exposed, but the comments are a little confusing.
Thanks,
Luka
Please note the fields I am after are the following:
- ProcessDefinitionName
- ProcessDefinitionId
Looking at the DelegateExecution interface under the 5.10 tag (http://svn.codehaus.org/activiti/activiti/tags/activiti-5.10/modules/activiti-engine/src/main/java/o...), it would seem the ProcessDefinitionId will be exposed, but the comments are a little confusing.
/**
* The process definition key for the process instance this execution is associated with.
*/
String getProcessDefinitionId();
Will the function reveal the process definition key or id?Thanks,
Luka
