KB Article #178707

MBC_HIERCHMSGENV functions: notification to Sentinel not sent when expected

Problem

- an MBC create a group of several files using MBC_HIERCHMSGENV.HoldSession.

- before grouping the messages, a notification sent to Sentinel using MBC_HIERCHMSGENV.SentinelCreateTrackedObject :

SendSNTLEvent $SessionId
MessageId $MessageId
To $myTO
Composant "beginning ediapplgrouper"
NewUserObjectId $MyTO.$Cycleid;

- the notification is only inserted in Sentinel AFTER the grouping is executed (after MBC_HIERCHMSGENV.ReleaseSession).

- however, the timestamp is the one corresponding to when the file entered the grouping.


Resolution

* all log events and Sentinel messages are written when a session ends.

* therefore, they must create a new session (

DECLARE $emptyDATAIO CONSTANT DATAIO.Handle;

$NewSessionId = MBC_HIERCHMSGENV.CreateSession($emptyDataIO);

)

write what they want to write immediately on this session, and then start it with MBC_HIERCHMSGENV.StartSession.

* it will write as soon as ProcessMessage or the current top-level-callback ends, and not when the original session (ProcessMessage $SessionId parameter) ends (so not when the grouping is done)