private void addExecutionListener(IBaseElement element, string eventName)
        {
            IExtensionElements    extensionElements = element.ModelInstance.NewInstance <IExtensionElements>(typeof(IExtensionElements));
            IModelElementInstance executionListener = extensionElements.AddExtensionElement(BpmnModelConstants.CamundaNs, "executionListener");

            //JAVA TO C# CONVERTER WARNING: The .NET Type.FullName property will not always yield results identical to the Java Class.getName method:
            executionListener.SetAttributeValueNs(BpmnModelConstants.CamundaNs, "class", typeof(ModelExecutionContextExecutionListener).FullName);
            executionListener.SetAttributeValueNs(BpmnModelConstants.CamundaNs, "event", eventName);
            element.ExtensionElements = extensionElements;
        }
Example #2
0
        public virtual void SetValue <T>(IModelElementInstance modelElement, T value)
        {
            string xmlValue = ConvertModelValueToXmlValue(value);

            if (string.ReferenceEquals(NamespaceUri, null))
            {
                modelElement.SetAttributeValue(AttributeName, xmlValue, IdAttribute);
            }
            else
            {
                modelElement.SetAttributeValueNs(NamespaceUri, AttributeName, xmlValue, IdAttribute);
            }
        }