public void InitializeContext()
            {
                this.store.TransactionManager.DoWithinTransaction(() =>
                {
                    var patternModel = store.ElementFactory.CreateElement<PatternModelSchema>();
                    this.product = patternModel.Create<PatternSchema>();
                    this.product.Name = "WebService";
                });

                this.artifactExtension = ExtensionElement.GetExtension<ArtifactExtension>(this.product);
            }
        /// <summary>
        /// Handles the property change event for the AssociatedArtifact properties.
        /// </summary>
        /// <param name="e">The event args.</param>
        public override void ElementPropertyChanged(ElementPropertyChangedEventArgs e)
        {
            Guard.NotNull(() => e, e);

            if (e.DomainProperty.Id == ArtifactExtension.OnArtifactActivationDomainPropertyId ||
                e.DomainProperty.Id == ArtifactExtension.OnArtifactDeletionDomainPropertyId)
            {
                // Ensure we are not in deserialization mode.
                if (!e.ModelElement.Store.TransactionManager.CurrentTransaction.IsSerializing)
                {
                    ArtifactExtension artifactExtension = (ArtifactExtension)e.ModelElement;
                    if (artifactExtension != null)
                    {
                        artifactExtension.EnsureActivateArtifactExtensionAutomation();
                        artifactExtension.EnsureDeleteArtifactExtensionAutomation();
                    }
                }
            }
        }