Open topic with navigation

TIBCO BusinessEvents® Enterprise Edition 6.3.1

# Reference Relationships

In a reference relationship, one concept instance references another concept instance.

A concept that is the target of a reference can itself refer to one or more other concepts. Reference relationships are not, however, hierarchical.

The relationship is defined by a `ConceptReference` property in the referring concept.

See Containment and Reference Concept Relationship Rules for rules governing the behavior of concepts linked by containment or reference. The table also helps you to choose which is the appropriate type of relationship for your needs.

Note: Properties of concept references cannot be used in a condition.

## Reference Example: Order with SalesRep and Customer

To configure a concept `Order` to reference a concept `SalesRep`, you add a `ConceptReference` property, `Rep` for example, whose value is the ID of concept `SalesRep`. The `Rep` property provides the link between the referring and referenced concepts:

- `Order` (Concept) — `Rep` (property) — `SalesRep` (Concept)

You can also define additional reference relationships such as:

- `Order` (Concept) — `BackupRep` (property) — `SalesRep` (Concept)
- `Order` (Concept) — `Lines` (property array) — `LineItem` (Concept)
- `Order` (Concept) — `Cust` (property) — `Customer` (Concept)
- `Customer` (Concept) — `Orders` (property) — `SalesRep` (Concept)

## Reference Examples: Self Reference

A concept definition can have a reference relationship to itself. This is generally because the instances of one concept definition can have reference relationships to other instances of the same definition. For example:

- A `ListItem` concept has a `next` property which is a reference to a `ListItem` concept.
- A `Person` concept has a `spouse` property which is a reference to a `Person` concept.
- A `Person` concept has a `children` property which is an array of references to Person concepts.

## When a Contained or Referred Concept Instance is Deleted

There is an important difference in behavior when history is tracked for an array property, and when history is not tracked, or the property is not an array.

Effect of deleting a contained or referenced concept:

ContainedConcept or ConceptReference Property | Effect of deleting a Contained or Referenced Concept:
--- | ---
Single value property, regardless of history setting. | The value of the `ContainedConcept` or `ConceptReference` property becomes null.
Multiple-value property (array), with History is set to 0 or 1 (historical values are not tracked). | The array entry that held the deleted concept is removed, reducing the array size by one. Note: Delete higher position numbers before lower position numbers to ensure the correct entries are deleted. The array entry that held the deleted concept is removed, reducing the array size by one, and reducing by one the index of every entry in the array at a higher index than the deleted one. (When deleting multiple entries at once, delete higher position numbers before lower position numbers to ensure the correct entries are deleted.)
Multiple-value property (array), whose History is set to 2 or more (historical values are tracked). | The array entry that held the deleted concept remains and its value is set to null, so that history can be tracked.

Did you find this helpful?

YesNo
Great!
Thanks for taking the time to give us some feedback.
Sorry about that

Why wasn't this helpful? (check all that apply)

Could not find what I was looking for
Instructions confusing or unclear
Instructions did not work

Want to tell us more?

Please select at least one option or provide details about the issue!!

Error occurred while submitting feedback.

Error2 occurred while submitting feedback.

TIBCO BusinessEvents® Enterprise Edition

Copyright © 2004-2024. Cloud Software Group, Inc. All Rights Reserved.