How Do I: Associate Code With the End of a Conversation?

When a conversation ends, the onFinish callback of the JwsContext interface is invoked.. You can write code to be executed at the end of a conversation by adding a handler for this callback to your web service.

To Add a Handler for the onFinish Callback

1. In Source View, from the left-hand drop-down list at the top of the pane, select context.

2. From the right-hand drop-down list at the top of the pane, select onFinish.

This adds a handler called context_onFinish.

3. Add your code to the body of this method.

The argument to onFinish is a boolean value that indicates whether the conversation ended because it timed out (true) or because a finish method was invoked (false).

Related Topics

Managing Conversation Lifetime