In this task, you define the Account
and
History
concepts.
The Account
concept holds basic information about
an account: an identifier, a balance, a status, an average monthly
balance, and recent debit activity. You also learn some useful information
about concepts and how they are used.
The History
concept contains record of a debit
against a specific account. This information is used to detect
fraud.
What is a concept? A concept type is a definition of a set of properties that represent the data fields of an entity. Concept types are like Java classes, and concept instances are like Java objects.
How are concept instances created? Concept instances are created by rules, rule functions, or directly in Java. Information from event properties or payloads is often used to create concept instances, but other information can be used, for example, the results of a query or a calculation.
Keys Concepts can have application
specific keys. Unique and non-unique keys are supported. Keys can be
ordered or unordered. The property identifier
is
defined as an unordered unique key for the Account concept. This
identifier must be unique for all Account
concepts. The
History
concept has a non-unique ordered key on the
identifier
and at
properties. The
identifier
is the account that is associated with the
History concept. This is called a foreign key in
database terminology. The at
property is used to
ordered the History
concepts based on time.
Concept Relationships Concepts can have containment and reference relationships with other concepts. You set these up as concept properties, and define the kind of relationship by selecting an appropriate data type for the property. For example, a car concept can contain Wheel concepts, and can have a reference relationship to a Dealership concept.
Inheritance Concepts can also inherit from other concepts (as events can inherit from other events). Inheritance is a programming relationship and not an ontology relationship. It enables you to extend a base type for more efficient project management. See the section called “Define AccountOperation, Create, Debit, and Enable Events” for important information about inheritance.
How are concepts persisted? Instances of concepts (and events) are also known as “facts” and “entities.” They are persisted in shared memory and optionally replicated to one more more nodes.
![]() | |
See Concepts in TIBCO BusinessEvents® Extreme Application Architect’s Guide. See Concepts in TIBCO BusinessEvents® Extreme Application Developer’s Guide. |
You see the New Concept Wizard. In the
Filename field, type
History
. In the Description
field, type Maintain debit history for an
account
. Click .
In the History concept editor Properties section, add the following properties:
Table 2.3. History Concept Properties
Name | Type | Description |
---|---|---|
amount | double | Debit amount. |
at | DateTime | When debit occurred. |
identifier | String | Account identifier |
In the History concept Keys
section, define a new non-unique, ordered key named
ByAccount
by clicking on the
button. Update the key to have these
values:
Key Name -
ByAccount
Unique - Unchecked
Ordered - Checked
External Identifier - Unchecked
Properties - identifier
at
Save and close the resource.
You see the New Concept Wizard. In the
Filename field, type
Account
. In the Description
field, type This concept maintains history for account
transactions
. Click .
In the Account Concept Editor Properties section, add the following properties:
Table 2.4. Account Concept Properties
Name | Type | Description |
---|---|---|
identifier | String | Unique account identifier. |
balance | double | Current account balance. |
status | String | Current account status - Enabled
or Disabled . |
averageMonthlyBalance | double | Average monthly balance. |
recentDebitBalance | double | Recent debit activity on this account |
In the Account concept Keys
section, define a new unique, unordered key named
ByIdentifier
by clicking on the
button. Update the key to have these
values:
Key Name -
ByIdentifier
Unique - Checked
Ordered - Unchecked
External Identifier - Unchecked
Properties -
identifier
Save and close the resource.