A few undocumented events in the Hosted Application Toolkit..


Yep.. I said it… there are a few Easter Eggs in the Hosted application toolkit that you can use to trigger your automations.

How did that happen?  Well, somewhere along the way in the translation of documentation from CCF 2009Sp1 QFE to UII v1 the UII System level events that you can register in HAT somehow got left out.

These events are :

ContextChanged
SessionActivated
SessionDeactivated

So what do they do?

ContextChanged

When you register for a context changed event, your automation will be called each time there is an update to the context on the session that the event is registered on.  You used this much like you would use the NotifyContext Method in an adapter or hosted control.

As you know, ( or should know 🙂 ) data for an action from UII is retrieved by using the GetActionData shape in HAT.  Its important to note that this event does not pass in anything to the Action Data object at this time.

SessionActivated

When you register for a SessionActivated event, your automation will be called each time there a session change and and a Session is being Activated.  This event is driven by the SessionChanged event that is part of the UII Core engine.  In a hosted control, would hook this event to achieve the same result.

There is no Action data for this event at this time,

SessionDeactivated

When you register for a SessionDeactivated event, your automation will be called each time there a session change and and a Session is being Deactivated.  This event is driven by the SessionChanged event that is part of the UII Core engine.  In a hosted control, would hook this event to achieve the same result.

There is no Action data for this event at this time,

Wiring it up…

Wiring it up is pretty straight forward.

First you need a hosted application to attach it too or even a hosted control will do.  To be useful this hosted app will need to be a global app.  then, in your default action, you need to set up a few register events like so :

image

You will use the Event Names above, as the event you are registering for, then configure the ActionName and the ActionApplicationName to route the event trigger to where you want it to go.

Enjoy!.

Comments (0)

Skip to main content