6 Replies Latest reply on Aug 10, 2007 8:51 AM by Tom Baeyens

    added ExecutionScope

    Tom Baeyens Master

      check out the API for execution scopes. the idea is that this is the list of runtime executions scopes to implement e.g. runtime scope in BPEL processes. also for synchronizing concurrency, execution scopes could be used.

      tests to validate the list manipulations are also on the TODO (hint!, hint! :)

        • 1. Re: added ExecutionScope
          Charles Souillard Newbie

          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
            Alejandro Guizar Master

            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 Master

               

              "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 ExecutionController

              Iterator<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 Master

                 

                "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
                  Charles Souillard Newbie

                  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 Master

                    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.