Exemple #1
0
 public bool TryGetRootElement(string id, out tRootElement element)
 {
     element = null;
     if (id == null)
     {
         return(false);
     }
     element = Definition.Items.FirstOrDefault(t => t.id.Equals(id));
     return(element != null);
 }
Exemple #2
0
 public static bool IsDataStore(tRootElement element)
 {
     return(element is tDataStore);
 }
Exemple #3
0
 public static bool IsCorrelationProperty(tRootElement element)
 {
     return(element is tCorrelationProperty);
 }
Exemple #4
0
 public static bool IsCollaboration(tRootElement element)
 {
     return(element is tCollaboration);
 }
Exemple #5
0
 public static bool IsInterface(tRootElement element)
 {
     return(element is tInterface);
 }
Exemple #6
0
 public static bool IsGlobalBusinessRuleTask(tRootElement element)
 {
     return(element is tGlobalBusinessRuleTask);
 }
Exemple #7
0
 public static bool IsResource(tRootElement element)
 {
     return(element is tResource);
 }
Exemple #8
0
 public static bool IsEscalation(tRootElement element)
 {
     return(element is tEscalation);
 }
Exemple #9
0
 public static bool IsPartnerRole(tRootElement element)
 {
     return(element is tPartnerRole);
 }
Exemple #10
0
 public static bool IsProcess(tRootElement element)
 {
     return(element is tProcess);
 }
Exemple #11
0
 public static bool IsPartnerEntity(tRootElement element)
 {
     return(element is tPartnerEntity);
 }
Exemple #12
0
 public static bool IsMessage(tRootElement element)
 {
     return(element is tMessage);
 }
Exemple #13
0
 public static bool IsItemDefinition(tRootElement element)
 {
     return(element is tItemDefinition);
 }
Exemple #14
0
 public static bool IsEndPoint(tRootElement element)
 {
     return(element is tEndPoint);
 }
Exemple #15
0
 public static bool IsRootElement(tRootElement element)
 {
     return(element is tRootElement);
 }
Exemple #16
0
 public static bool IsError(tRootElement element)
 {
     return(element is tError);
 }
Exemple #17
0
 public static bool IsSignal(tRootElement element)
 {
     return(element is tSignal);
 }
Exemple #18
0
 public static bool IsEventDefinition(tRootElement element)
 {
     return(element is tEventDefinition);
 }
Exemple #19
0
 public static ItemElementType GetElementType(tRootElement element)
 {
     if (IsCategory(element))
     {
         return(ItemElementType.Category);
     }
     else if (IsCollaboration(element))
     {
         return(ItemElementType.Collaboration);
     }
     else if (IsCorrelationProperty(element))
     {
         return(ItemElementType.CorrelationProperty);
     }
     else if (IsDataStore(element))
     {
         return(ItemElementType.DataStore);
     }
     else if (IsEndPoint(element))
     {
         return(ItemElementType.EndPoint);
     }
     else if (IsError(element))
     {
         return(ItemElementType.Error);
     }
     else if (IsEscalation(element))
     {
         return(ItemElementType.Escalation);
     }
     else if (IsEventDefinition(element))
     {
         return(ItemElementType.EventDefinition);
     }
     else if (IsGlobalBusinessRuleTask(element))
     {
         return(ItemElementType.GlobalBusinessRuleTask);
     }
     else if (IsGlobalManualTask(element))
     {
         return(ItemElementType.GlobalManualTask);
     }
     else if (IsGlobalScriptTask(element))
     {
         return(ItemElementType.GlobalScriptTask);
     }
     else if (IsGlobalTask(element))
     {
         return(ItemElementType.GlobalTask);
     }
     else if (IsGlobalUserTask(element))
     {
         return(ItemElementType.GlobalUserTask);
     }
     else if (IsInterface(element))
     {
         return(ItemElementType.Interface);
     }
     else if (IsItemDefinition(element))
     {
         return(ItemElementType.ItemDefinition);
     }
     else if (IsMessage(element))
     {
         return(ItemElementType.Message);
     }
     else if (IsPartnerEntity(element))
     {
         return(ItemElementType.PartnerEntity);
     }
     else if (IsPartnerRole(element))
     {
         return(ItemElementType.PartnerRole);
     }
     else if (IsProcess(element))
     {
         return(ItemElementType.Process);
     }
     else if (IsResource(element))
     {
         return(ItemElementType.Resource);
     }
     else if (IsRootElement(element))
     {
         return(ItemElementType.RootElement);
     }
     else if (IsSignal(element))
     {
         return(ItemElementType.Signal);
     }
     else
     {
         throw new ArgumentException("Unknown Item Element Type of " + element.GetType().Name);
     }
 }
Exemple #20
0
 public static bool IsGlobalUserTask(tRootElement element)
 {
     return(element is tGlobalUserTask);
 }
Exemple #21
0
 public static bool IsCategory(tRootElement element)
 {
     return(element is tCategory);
 }
Exemple #22
0
        public ItemDefinitionType GetItemDefinitionType(string elementId)
        {
            tRootElement element = GetRootElement(elementId);

            if (BpmnRootElement.IsCategory(element))
            {
                return(ItemDefinitionType.Category);
            }
            else if (BpmnRootElement.IsCollaboration(element))
            {
                return(ItemDefinitionType.Collaboration);
            }
            else if (BpmnRootElement.IsCorrelationProperty(element))
            {
                return(ItemDefinitionType.CorrelationProperty);
            }
            else if (BpmnRootElement.IsDataStore(element))
            {
                return(ItemDefinitionType.DataStore);
            }
            else if (BpmnRootElement.IsEndPoint(element))
            {
                return(ItemDefinitionType.EndPoint);
            }
            else if (BpmnRootElement.IsError(element))
            {
                return(ItemDefinitionType.Error);
            }
            else if (BpmnRootElement.IsEscalation(element))
            {
                return(ItemDefinitionType.Escalation);
            }
            else if (BpmnRootElement.IsEventDefinition(element))
            {
                return(ItemDefinitionType.EventDefinition);
            }
            else if (BpmnRootElement.IsGlobalBusinessRuleTask(element))
            {
                return(ItemDefinitionType.GlobalBusinessRuleTask);
            }
            else if (BpmnRootElement.IsGlobalManualTask(element))
            {
                return(ItemDefinitionType.GlobalManualTask);
            }
            else if (BpmnRootElement.IsGlobalScriptTask(element))
            {
                return(ItemDefinitionType.GlobalScriptTask);
            }
            else if (BpmnRootElement.IsGlobalTask(element))
            {
                return(ItemDefinitionType.GlobalTask);
            }
            else if (BpmnRootElement.IsGlobalUserTask(element))
            {
                return(ItemDefinitionType.GlobalUserTask);
            }
            else if (BpmnRootElement.IsInterface(element))
            {
                return(ItemDefinitionType.Interface);
            }
            else if (BpmnRootElement.IsItemDefinition(element))
            {
                return(ItemDefinitionType.ItemDefinition);
            }
            else if (BpmnRootElement.IsMessage(element))
            {
                return(ItemDefinitionType.Message);
            }
            else if (BpmnRootElement.IsPartnerEntity(element))
            {
                return(ItemDefinitionType.PartnerEntity);
            }
            else if (BpmnRootElement.IsPartnerRole(element))
            {
                return(ItemDefinitionType.PartnerRole);
            }
            else if (BpmnRootElement.IsProcess(element))
            {
                return(ItemDefinitionType.Process);
            }
            else if (BpmnRootElement.IsResource(element))
            {
                return(ItemDefinitionType.Resource);
            }
            else if (BpmnRootElement.IsRootElement(element))
            {
                return(ItemDefinitionType.RootElement);
            }
            else if (BpmnRootElement.IsSignal(element))
            {
                return(ItemDefinitionType.Signal);
            }
            else
            {
                throw new System.NotImplementedException(NOT_IMPLEMENT + element.GetType().Name);
            }
        }
Exemple #23
0
 public static bool IsGlobalTask(tRootElement elm)
 {
     return(elm is tGlobalTask);
 }