protected virtual void ReportEffect(
OperationContext context,
Transition transition,
QualifiedName cause,
NodeId effectId)
{
if (effectId == ObjectTypes.TransitionEventType)
{
TransitionEvent e = TransitionEvent.Construct(Server);
e.InitializeNewEvent();
e.Message.Value = Utils.Format("StateMachine has moved to the {0} state.", transition.ToState.DisplayName);
e.SourceNode.Value = NodeId;
e.SourceName.Value = BrowseName.Name;
e.Severity.Value = 10;
e.ReceiveTime.Value = DateTime.UtcNow;
e.FromState.Value = transition.FromState.DisplayName;
e.ToState.Value = transition.ToState.DisplayName;
ReportEvent(e);
}
}