Well there are two choices for implementing this :
* Using neither CdiBusinessProcessEvent, nor BusinessProcessEvent : That is, to create another class for representing task events. It's more clear in terms of code, but it will be probably confusing to observe another hierarchy of process events.
* The other solution requires to pass (and store) a VariableScope to CdiBusinessProcessEvent : However, as getting execution and process instance id is not feasible through VariableScope, I may have to modify VariableScope, ExecutionEntity and TaskEntity to use a visitor pattern to provide its own execution and process instance id.
Using #1 is more isolated, however although #2 seems nice, it will introduce execution terms in variable which I don't know if it's desired.
Any suggestions?
Regards,
Dimitris