-
1. Re: added ExecutionScope
csouillard Aug 9, 2007 10:50 AM (in response to tom.baeyens)Currently execution scopes is a stack.
The general way to manipulate a stack is to access only the top level element.
I think executionScopes concept is necessary but there is a problem to use them.
Let me take an example around BPEL :
At every time an execution is executed in a scope so we need to maitain runtime information about this scope (there could have nest scopes).
When we enter a flow, we need to maintain runtime information about this flow. So we need at the same time two different kind of information : scope and flow runtime information...
As ExecutionScope is a stack I will be able to access only the last once...
What do you think ?
An easy way to do that is to create a search method based on the type of the searched scope ?
Charles -
2. Re: added ExecutionScope
aguizar Aug 9, 2007 3:59 PM (in response to tom.baeyens)Not sure I get the intent of the API. Would we introduce keys such as KEY_PARTNER_LINKS, KEY_CORRELATION_SETS and KEY_LINKS?
If so, we do not need two different kinds of execution scopes, just use different keys. An execution scope for would use KEY_PROCESS_VARIABLES, KEY_PARTNER_LINKS and KEY_CORRELATION_SETS but not KEY_LINKS. Conversely, execution scopes for use KEY_LINKS only. -
3. Re: added ExecutionScope
tom.baeyens Aug 10, 2007 6:52 AM (in response to tom.baeyens)"csouillard" wrote:
As ExecutionScope is a stack I will be able to access only the last once...
nope. you can search the whole stack. look in ExecutionControllerIterator<Object> getRecursiveExecutionScopes();
so you can scan the stack from inner to outer scopes looking for the one you need.
does that resolve your issue ? -
4. Re: added ExecutionScope
tom.baeyens Aug 10, 2007 6:55 AM (in response to tom.baeyens)"alex.guizar@jboss.com" wrote:
Not sure I get the intent of the API. Would we introduce keys such as KEY_PARTNER_LINKS, KEY_CORRELATION_SETS and KEY_LINKS?
If so, we do not need two different kinds of execution scopes, just use different keys. An execution scope for <scope> would use KEY_PROCESS_VARIABLES, KEY_PARTNER_LINKS and KEY_CORRELATION_SETS but not KEY_LINKS. Conversely, execution scopes for <flow> use KEY_LINKS only.
you don't need keys as you mention. it's a stack of objects that maintain runtime process information for a given scope. the objects themselves can be what you want e.g. a BpelFlowScope or something like that.
the names in the keys that you mention indeed refer to data that typically would have to be maintained in execution scopes.
does that help ? -
5. Re: added ExecutionScope
csouillard Aug 10, 2007 8:08 AM (in response to tom.baeyens)In fact what I want to say is :
what is the benefit of a stack ?
Maybe we can try to find a better solution where finding an ExecutionScope by Class is good...
If I want the last ExecutionScope related to flow I call .find(FlowScope.class)...
I don't have a better solution for the moment...
Currently in the BPEL extension, we are managing a collection per type of ExecutionScope (flow, scope...)
Charles -
6. Re: added ExecutionScope
tom.baeyens Aug 10, 2007 8:51 AM (in response to tom.baeyens)i think in BPEL you need a stack too, not ?
if you have a scope with in there a sequence and in there again a scope...
then you would need at least a stack per scope class. in that case it's easier to work with just one stack instead of a map of stacks.