/// <summary>
        /// Called by an internal component in right order.
        /// </summary>
        internal void ExecuteInternal()
        {
            try
            {
                using (var execLock = DataHandler.AcquireSecurityActivityExecutionLock(this))
                {
                    if (execLock.FullExecutionEnabled)
                    {
                        Initialize(Context);
                        Store(Context);
                        Distribute(Context);
                    }
                }
                Apply(Context);
            }
            catch (Exception e)
            {
                _executionException = e;

                // we log this here, because if the activity is not waited for later than the exception would not be logged
                SnTrace.Security.WriteError("Error during security activity execution. SA{0} {1}", this.Id, e);
            }
            finally
            {
                Finish();
            }
        }