Rule#

Fully qualified class name of the UML model DDI-CDI 1.0: DDICDIModels::DDICDILibrary::Classes::Process::Rule

Definition#

A rule has a condition part and an action part. A rule takes the form of: If [Condition} Then [Action]. A rule belongs to a rule set which is a component of rule based scheduling performed by the processing agent

Examples#

If Exists [InformationObject] Then Perform [Activity]

Diagram#

Diagram

Attributes#

Attributes
Attributes#

Name

Inherited from

Description

Data Type

Multiplicity

Default value

identifier

- own class -

Identifier for objects requiring short- or long-lasting referencing and management.

Identifier

0..1

Associations#

Associations
Associations#

Direction

Association

Description

Multiplicity of Rule

Package of Other Class

Other Class

Multiplicity of other class

Aggregation Kind

Inherited from

from

Rule hasPrecondition ConditionalControlLogic

The condition part of a rule is associated with conditonal control logic.

0..*

- own package -

ConditionalControlLogic

0..*

none

own class

to

RuleSet has Rule

A rule is a member of a rule set.

0..*

- own package -

RuleSet

0..1

none

own class

Encodings#

Syntax representations / encodings

All syntax representations except the Canonical XMI are provided as reference points for specific implementations, or for use as defaults if sufficient in the form presented.

Fragment for the class Rule (entire model as XMI)

 1<packagedElement xmlns:StandardProfile="http://www.omg.org/spec/UML/20131001/StandardProfile"
 2                  xmlns:uml="http://www.omg.org/spec/UML/20131001"
 3                  xmlns:xmi="http://www.omg.org/spec/XMI/20131001"
 4                  xmi:id="DDICDIModels-DDICDILibrary-Classes-Process-Rule"
 5                  xmi:uuid="http://ddialliance.org/Specification/DDI-CDI/1.0/XMI/#Rule"
 6                  xmi:type="uml:Class">
 7   <ownedComment xmi:id="DDICDIModels-DDICDILibrary-Classes-Process-Rule-ownedComment"
 8                  xmi:uuid="http://ddialliance.org/Specification/DDI-CDI/1.0/XMI/#Rule-ownedComment"
 9                  xmi:type="uml:Comment">
10      <annotatedElement xmi:idref="DDICDIModels-DDICDILibrary-Classes-Process-Rule"/>
11      <body>Definition 
12============ 
13A rule has a condition part and an action part. A rule takes the form of: If [Condition} Then [Action]. A rule belongs to a rule set which is a component of rule based scheduling performed by the processing agent  
14
15Examples 
16========== 
17If Exists [InformationObject] Then Perform [Activity]</body>
18   </ownedComment>
19   <name>Rule</name>
20   <ownedAttribute xmi:id="DDICDIModels-DDICDILibrary-Classes-Process-Rule-identifier"
21                    xmi:uuid="http://ddialliance.org/Specification/DDI-CDI/1.0/XMI/#Rule-identifier"
22                    xmi:type="uml:Property">
23      <ownedComment xmi:id="DDICDIModels-DDICDILibrary-Classes-Process-Rule-identifier-ownedComment"
24                     xmi:uuid="http://ddialliance.org/Specification/DDI-CDI/1.0/XMI/#Rule-identifier-ownedComment"
25                     xmi:type="uml:Comment">
26         <annotatedElement xmi:idref="DDICDIModels-DDICDILibrary-Classes-Process-Rule-identifier"/>
27         <body>Identifier for objects requiring short- or long-lasting referencing and management.</body>
28      </ownedComment>
29      <lowerValue xmi:id="DDICDIModels-DDICDILibrary-Classes-Process-Rule-identifier-lowerValue"
30                   xmi:uuid="http://ddialliance.org/Specification/DDI-CDI/1.0/XMI/#Rule-identifier-lowerValue"
31                   xmi:type="uml:LiteralInteger"/>
32      <upperValue xmi:id="DDICDIModels-DDICDILibrary-Classes-Process-Rule-identifier-upperValue"
33                   xmi:uuid="http://ddialliance.org/Specification/DDI-CDI/1.0/XMI/#Rule-identifier-upperValue"
34                   xmi:type="uml:LiteralUnlimitedNatural">
35         <value>1</value>
36      </upperValue>
37      <name>identifier</name>
38      <isID>true</isID>
39      <type xmi:idref="DDICDIModels-DDICDILibrary-DataTypes-StructuredDataTypes-Identifier"/>
40   </ownedAttribute>
41   <ownedAttribute xmi:id="DDICDIModels-DDICDILibrary-Classes-Process-Rule-ownedAttribute"
42                    xmi:uuid="http://ddialliance.org/Specification/DDI-CDI/1.0/XMI/#Rule-ownedAttribute"
43                    xmi:type="uml:Property">
44      <lowerValue xmi:id="DDICDIModels-DDICDILibrary-Classes-Process-Rule-ownedAttribute-lowerValue"
45                   xmi:uuid="http://ddialliance.org/Specification/DDI-CDI/1.0/XMI/#Rule-ownedAttribute-lowerValue"
46                   xmi:type="uml:LiteralInteger"/>
47      <upperValue xmi:id="DDICDIModels-DDICDILibrary-Classes-Process-Rule-ownedAttribute-upperValue"
48                   xmi:uuid="http://ddialliance.org/Specification/DDI-CDI/1.0/XMI/#Rule-ownedAttribute-upperValue"
49                   xmi:type="uml:LiteralUnlimitedNatural">
50         <value>*</value>
51      </upperValue>
52      <association xmi:idref="DDICDIModels-DDICDILibrary-Classes-Process-Rule_hasPrecondition_ConditionalControlLogic"/>
53      <type xmi:idref="DDICDIModels-DDICDILibrary-Classes-Process-ConditionalControlLogic"/>
54   </ownedAttribute>
55</packagedElement>

Fragment for the class Rule (entire XML Schema)

 1<xs:element name="Rule"
 2            type="RuleXsdType"
 3            xml:id="Rule">
 4  <!-- based on the UML class DDICDIModels::DDICDILibrary::Classes::Process::Rule -->
 5  <xs:annotation>
 6    <xs:documentation>Definition 
 7          ============ 
 8          A rule has a condition part and an action part. A rule takes the form of: If [Condition} Then [Action]. A rule belongs to a rule set which is a component of rule based scheduling performed by the processing agent  
 9          
10          Examples 
11          ========== 
12          If Exists [InformationObject] Then Perform [Activity]</xs:documentation>
13  </xs:annotation>
14</xs:element>
15<xs:complexType name="RuleXsdType"
16                xml:id="RuleXsdType">
17  <xs:annotation>
18    <xs:documentation>Definition 
19          ============ 
20          A rule has a condition part and an action part. A rule takes the form of: If [Condition} Then [Action]. A rule belongs to a rule set which is a component of rule based scheduling performed by the processing agent  
21          
22          Examples 
23          ========== 
24          If Exists [InformationObject] Then Perform [Activity]</xs:documentation>
25  </xs:annotation>
26  <xs:sequence>
27    <xs:element name="identifier"
28                type="IdentifierXsdType"
29                minOccurs="0"
30                maxOccurs="1"
31                xml:id="Rule-identifier">
32      <xs:annotation>
33        <xs:documentation>Identifier for objects requiring short- or long-lasting referencing and management.</xs:documentation>
34      </xs:annotation>
35    </xs:element>
36    <xs:element name="Rule_hasPrecondition_ConditionalControlLogic"
37                minOccurs="0"
38                maxOccurs="unbounded"
39                xml:id="Rule_hasPrecondition_ConditionalControlLogic">
40      <xs:annotation>
41        <xs:documentation>The condition part of a rule is associated with conditonal control logic.</xs:documentation>
42      </xs:annotation>
43      <xs:complexType>
44        <xs:complexContent>
45          <xs:restriction base="AssociationReferenceXsdType">
46            <xs:sequence>
47              <xs:element name="ddiReference"
48                          type="InternationalRegistrationDataIdentifierXsdType"
49                          minOccurs="0"
50                          maxOccurs="1"
51                          xml:id="Rule_hasPrecondition_ConditionalControlLogic-ddiReference"/>
52              <xs:element name="validType"
53                          minOccurs="0"
54                          maxOccurs="unbounded"
55                          xml:id="Rule_hasPrecondition_ConditionalControlLogic-validType">
56                <xs:simpleType>
57                  <xs:restriction base="xs:NMTOKEN">
58                    <xs:enumeration value="ConditionalControlLogic"/>
59                  </xs:restriction>
60                </xs:simpleType>
61              </xs:element>
62            </xs:sequence>
63          </xs:restriction>
64        </xs:complexContent>
65      </xs:complexType>
66    </xs:element>
67  </xs:sequence>
68</xs:complexType>

Fragment for the class Rule (entire JSON Schema)

 1"cls-Rule": {
 2  "description": "http://ddialliance.org/Specification/DDI-CDI/1.0/RDF/Rule",
 3  "type": "object",
 4  "properties": {
 5    "@context": {
 6      "$ref": "#/defs/at-context"
 7    },
 8    "@id": {
 9      "type": "string",
10      "format": "iri-reference"
11    },
12    "@type": {
13      "const": "Rule"
14    },
15    "identifier": {
16      "$comment": "cardinality 0..1 – from cdi:Rule",
17      "$ref": "#/defs/dt-Identifier"
18    },
19    "hasPrecondition": {
20      "description": "Rule_hasPrecondition_ConditionalControlLogic",
21      "$comment": "cardinality 0..-1",
22      "anyOf": [
23        {
24          "$ref": "#/defs/target-ConditionalControlLogic"
25        },
26        {
27          "type": "array",
28          "items": {
29            "$ref": "#/defs/target-ConditionalControlLogic"
30          }
31        }
32      ]
33    },
34    "has_Rule_OF_RuleSet": {
35      "description": "RuleSet_has_Rule",
36      "$comment": "cardinality 0..1",
37      "$ref": "#/defs/target-RuleSet"
38    },
39    "sameAs": {
40      "$ref": "#/defs/owl:sameAs"
41    }
42  },
43  "required": ["@type"],
44  "additionalProperties": false
45},
46"target-Rule": {
47  "description": "all subclasses of http://ddialliance.org/Specification/DDI-CDI/1.0/RDF/Rule",
48  "anyOf": [
49    { "$ref": "#/defs/cls-Rule" },
50    { "type": "string", "format": "iri-reference" }
51  ]
52},

Fragment for the class Rule (main ontology)

 1# class Rule
 2# based on the UML class DDICDIModels::DDICDILibrary::Classes::Process::Rule
 3cdi:Rule
 4  a rdfs:Class, owl:Class, ucmis:Class;
 5  rdfs:label "Rule";
 6  rdfs:comment "Definition \n============ \nA rule has a condition part and an action part. A rule takes the form of: If [Condition} Then [Action]. A rule belongs to a rule set which is a component of rule based scheduling performed by the processing agent  \n\nExamples \n========== \nIf Exists [InformationObject] Then Perform [Activity]"@en;
 7  
 8.
 9
10cdi:Rule-identifier
11  a rdf:Property, owl:ObjectProperty, ucmis:Attribute;
12  rdfs:label "identifier";
13  rdfs:comment "Identifier for objects requiring short- or long-lasting referencing and management."@en;
14  rdfs:domain cdi:Rule;
15  rdfs:range cdi:Identifier;
16.
17
18
19cdi:Rule_hasPrecondition_ConditionalControlLogic
20  a rdf:Property, owl:ObjectProperty, ucmis:Association;
21  # ASSOCIATION
22  rdfs:label "hasPrecondition";
23  skos:altLabel "Rule_hasPrecondition_ConditionalControlLogic";
24  rdfs:comment "The condition part of a rule is associated with conditonal control logic."@en;
25  rdfs:domain cdi:Rule;
26  rdfs:range cdi:ConditionalControlLogic;
27.

Fragment for the class Rule (entire JSON-LD)

 1{
 2  "@context": [
 3    {
 4      "cdi": "http://ddialliance.org/Specification/DDI-CDI/1.0/RDF/",
 5      "xsd": "http://www.w3.org/2001/XMLSchema#",
 6
 7      "identifier": {
 8        "@id": "cdi:Rule-identifier",
 9        "@type": "@id",
10        "@context": "Identifier.jsonld"
11      },
12      
13      "hasPrecondition": {
14        "@id": "cdi:Rule_hasPrecondition_ConditionalControlLogic",
15        "@type": "@id",
16        "@context": "ConditionalControlLogic.jsonld"
17      },
18      "has_Rule_OF_RuleSet": {
19        "@reverse": "cdi:RuleSet_has_Rule",
20        "@type": "@id",
21        "@context": "RuleSet.jsonld"
22      },
23      " comment ": "tag:json-should-support-trailing-commas"
24    }
25  ],
26  "generatedBy": "This code was generated by the Eclipse Acceleo project UCMIS M2T on 2025-08-29 14:34:53.",
27  "basedOn": "based on the UML data type DDICDIModels::DDICDILibrary::Classes::Process::Rule"
28}

Fragment for the class Rule (entire SHACL - Shapes Constraint Language)

 1# class Rule
 2# based on the UML class DDICDIModels::DDICDILibrary::Classes::Process::Rule
 3<#Rule> a sh:NodeShape;
 4    sh:targetClass cdi:Rule;
 5	sh:message "See http://ddialliance.org/Specification/DDI-CDI/1.0/RDF/Rule";
 6	sh:closed true;
 7	sh:ignoredProperties ( owl:sameAs );
 8    sh:property [
 9			sh:path rdf:type;
10			sh:in (   cdi:Rule
11			 ) ;
12    ];
13    # attributes
14    sh:property <#Rule-identifier>;
15    # associations from Rule
16    sh:property <#Rule_hasPrecondition_ConditionalControlLogic>;
17    # associations to Rule
18    sh:property <#rev_RuleSet_has_Rule>;
19
20
21
22.
23
24<#Rule-identifier> a sh:PropertyShape ;
25    sh:path cdi:Rule-identifier;
26    sh:node [ sh:property [ sh:path rdf:type; sh:minCount 1; sh:in (
27        cdi:Identifier
28      
29    ) ]];
30    sh:maxCount 1;
31.
32
33<#Rule_hasPrecondition_ConditionalControlLogic> a sh:PropertyShape ;
34    sh:path cdi:Rule_hasPrecondition_ConditionalControlLogic;
35	sh:node [ sh:property [ sh:path rdf:type; sh:minCount 1; sh:in (
36        cdi:ConditionalControlLogic
37      
38    ) ]];
39.
40<#rev_Rule_hasPrecondition_ConditionalControlLogic> a sh:PropertyShape ;
41    sh:path [ sh:inversePath cdi:Rule_hasPrecondition_ConditionalControlLogic ];
42.

Fragment for the class Rule (entire ShEx - Shape Expressions)

1# class Rule
2# based on the UML class DDICDIModels::DDICDILibrary::Classes::Process::Rule
3cdi:RuleShape CLOSED {
4	a [cdi:Rule];
5	cdi:Rule-identifier	@cdi:IdentifierShape?;
6	cdi:Rule_hasPrecondition_ConditionalControlLogic	@cdi:ConditionalControlLogicShape *;
7	
8	^cdi:RuleSet_has_Rule @cdi:RuleSetShape ?;
9	}