Example #1
0
            public virtual ExecutionEntity createAttachableExecution()
            {
                ExecutionEntity scopeExecution      = resolveRepresentativeExecution();
                ExecutionEntity attachableExecution = scopeExecution;

                if (outerInstance.currentScope.ActivityBehavior is ModificationObserverBehavior)
                {
                    ModificationObserverBehavior behavior = (ModificationObserverBehavior)outerInstance.currentScope.ActivityBehavior;
                    attachableExecution = (ExecutionEntity)behavior.createInnerInstance(scopeExecution);
                }
                else
                {
                    if (scopeExecution.NonEventScopeExecutions.Count > 0 || scopeExecution.getActivity() != null)
                    {
                        attachableExecution        = (ExecutionEntity)scopeExecution.createConcurrentExecution();
                        attachableExecution.Active = false;
                        scopeExecution.forceUpdate();
                    }
                }

                return(attachableExecution);
            }