Show / Hide Table of Contents

Class DecisionModelElementFactory

Decision model elements come in multiple forms DecisionModelElement, DecisionModelDiagram, DecisionModelDiagramElement, but are intended to be treated equally in all cases in API methods. To rectify this, this factory will accept JObjects representing decision model elements, and convert them appropiately.

Inheritance
object
DecisionModelElementFactory
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Quantellia.WMServer.DecisionModeler.Model
Assembly: WMServer.dll
Syntax
public class DecisionModelElementFactory

Methods

Parse(WMPrincipal, List<JObject>, WMAssetIdentifier)

Parses a list of JObjects into decision model elements. All element parsing should be performed through this factory. Returns a list of elements with field validation, but not referential validation. (i.e. The role must be among the allowed values, but the parentIDs of the elements have not been resolved.) Referential validation should be handled by the method that makes use of Parse(WMPrincipal, List<JObject>, WMAssetIdentifier) alongside ValidateDecisionModelElements(IEnumerable<IDecisionModelElementDTO>), since the way they are validated depends on the use case.

Declaration
public static List<IDecisionModelElementDTO> Parse(WMPrincipal principal, List<JObject> JElements, WMAssetIdentifier dmIdentifier)
Parameters
Type Name Description
WMPrincipal principal
List<JObject> JElements
WMAssetIdentifier dmIdentifier

The identifier to save the elements under. This should preferably be a fullPathName identifier.

Returns
Type Description
List<IDecisionModelElementDTO>

ValidateDecisionModelElements(IEnumerable<IDecisionModelElementDTO>)

Validates name uniqueness and referential correctness of the provided set of elements. Collects errors and throws if failed.

Declaration
public static void ValidateDecisionModelElements(IEnumerable<IDecisionModelElementDTO> elements)
Parameters
Type Name Description
IEnumerable<IDecisionModelElementDTO> elements

The set of elements to validate.

In this article
Back to top Copyright © 2025 Quantellia LLC.    Version 2.0.0 Revision 399     Last Updated 11/16/2025    DRAFT DOCUMENTATION. SUBJECT TO CHANGE