Rule Tracing Concepts

  • Updated

Trace Frame

Activities logged by the rule tracing are represented as Trace Frames.  A frame may encapsulate aspects and other frames.

A frame has the following mandatory attributes:

  • FrameId  - The unique frame identifier.
  • Timestamp - The point in time the activity was recorded.
  • FrameType - The type of activity being traced. (E.g. SetValue, EvaluateRule, ValueChanged.)

It may also have the following optional attributes:

  • SourceDefId - The GUID of the Def in the RuleApplication relating to this activity.
  • StateId - The ElementIdentifier relating to this activity. (E.g. {Entity1::1}/Entity1/Calc1)

Aspect

Aspects represent properties specific to each rule engine activity.  They exist as a name-value pair.

E.g. Name=Result, Value=1234.

Frame Type

Each frame has a type to describe the type of activity being traced.  The frame types to be recorded can be configured using irSDK at either a high-level (RuleExecutionSettings.EnableRuleTracing) for trace event visualization, or fine-grained (RuleExecutionSettings.TraceFrameTypes) for low-level debugging.  irVerify uses the high-level settings.

Trace Events

If the trace is viewed from irVerify (or the EventReader is used from irSDK), the Trace Frames are converted into a high-level list of Trace Events. A Trace Event is the result of a collection of Trace Frames.  The events closely represent the logical flow of the authored rules and can be viewed in irAuthor to assist debugging rule execution.

A Trace Event may encapsulate a list of Attributes and Evaluations.

  • Attributes - A name-value pair belonging to the event.
  • Evaluations - The decomposition of source syntax rules and their evaluated results.

A Trace Event has the following attributes:

  • EventId - The unique event identifier.
  • ParentEventId - The parent event identifier.
  • Timestamp - The point in time the event’s root Trace Frame was recorded.
  • EventFraneId - The identifier of the event’s root Trace Frame.
  • DisplayName  - The display text of the original authored rule.
  • Result - The result of the rule or action, if there is one.
  • Context - The context under which the event took place. (E.g. Entity1, RuleSet1)
  • StateId - The ElementIdentifier relating to this event. (E.g. {Entity1::1}/Entity1/Calc1)

Was this article helpful?

0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.