Associate elements
- Last Updated: March 24, 2022
- 2 minute read
- Corticon
- Version 6.3
- Documentation
SYNTAX
<Collection1> += <Collection2>
<Collection1> += <Entity>
Associates all elements of <Collection2> or a single element named <Entity> with <Collection1>,
provided such an association is allowed by the Vocabulary. Every collection must be
uniquely identified with an alias or role.
Collection> and the
<Entity> being added is “one-to-one” (a straight line icon beside the association in the Rule
Vocabulary), then this associate element syntax is not used. Instead, replace element
syntax is used, since the collection can contain only one element, and any element
present will be replaced by the new element. The Operators row of the table in Vocabulary usage restrictions does not apply. Special exceptions: associate element may only be used in Action Rows (section 5 in Sections of Rulesheet that correlate with usage restrictions).
The following Rulesheet uses associate
element to associate an element of collection2 to collection1 when
boolean1 value of any element in collection2 is true.
Note that the Action is not associating all elements in
collection2 with collection1, only those elements within collection2 that satisfy the condition.
A
sample Ruletest provides two examples of Entity2
with boolean1 values, and a single Entity1. Input and Output panels shows the association
embedded in the parent entity:
![]()
brms.properties file enables a Flat payload:
com.corticon.tester.ccserver.execute.format=XML
com.corticon.designer.tester.xmlmessagingstyle=Flat
After restarting Studio, running the same sample Ruletest shows the association
dropping to the root with an href entity: