cancel
Showing results for 
Search instead for 
Did you mean: 

is it possible to cast Execution to DelegateExecution

jaiwo99
Champ in-the-making
Champ in-the-making
Hi all,

i have just a question, does somebody know, if i can cast Execution to DelegateExecution, so i can get the variables, here is an example:
Map<String, Object> properties = ((DelegateExecution) getRuntimeService().createExecutionQuery().processInstanceId(processInstanceId).singleResult()).getVariables();

or should I get the varaibles in some other ways?

Thx, James
2 REPLIES 2

roig
Champ in-the-making
Champ in-the-making
DelegateExecution is the only impl for Execution, so the cast itself is safe for now. The problem is that no one assures you that in term of business logic it is safe

jaiwo99
Champ in-the-making
Champ in-the-making
DelegateExecution is the only impl for Execution, so the cast itself is safe for now. The problem is that no one assures you that in term of business logic it is safe

Hello roig,

I would try to finde it out! Thx! If it does not work fine, ich can also use ExecutionListener, i think!  :lol:

but I just wanna get the variables so far, I think it should be ok, if DelegateExecution is the impl of the Execution.

Have a nice day,
James