cancel
Showing results for 
Search instead for 
Did you mean: 

Clarification about DelegateExecution and Execution

gokceng1
Champ in-the-making
Champ in-the-making
Hi,
The classes I've mentioned are:

org.activiti.engine.runtime.Execution
org.activiti.engine.delegate.DelegateExecution

The latter is used in JavaDelegate and ExecutionListeners. The former is the result of some RuntimeService API methods. Is there a relation between them? Is casting one to another is safe or may I use one of them's id to get/query another?

Afaik, DelegateExecution or ExecutionEntity is a small representation of an Execution at some activity. At each step Activiti can supply DelegateExecution or ExecutionEntity via ExecutionListener or JavaDelegate methods. I can get the main/broader view of the related execution using runtimeService.createExecutionQuery() method.

If there are some other relations or explanations over those classes could you please explain?

Thanks.
4 REPLIES 4

gokceng1
Champ in-the-making
Champ in-the-making
You can discard ExecutionEntity totally. I've noticed it's implementation of those two other interfaces.

gokceng1
Champ in-the-making
Champ in-the-making
Any idea?

jbarrez
Star Contributor
Star Contributor
DelegateExecution hides a bit of the complexity so people can't burn their fingers when using it in a JavaDelegate.

gokceng1
Champ in-the-making
Champ in-the-making
Thanks