Leadtools.Ccow Namespace > ContextManager Object : JoinCommonContext Method |
true
participate in context change surveys. If false
the application will only be informed when a context change has been accepted.
true
wait for the current context change transaction to complete.
function Leadtools.Ccow.ContextManager.joinCommonContext( applicationName , contextParticipant , survey , wait )
Parameter | Type | Description |
---|---|---|
applicationName | string | Name of the application. This string must be unique relative to the other applications that have already joined the common context session. |
contextParticipant | string | The context participant interface provided by the application. |
survey | bool | If set to true participate in context change surveys. If false the application will only be informed when a context change has been accepted. |
wait | bool | If set to true wait for the current context change transaction to complete. |
Type | Description |
---|---|
int | A participant coupon that the application uses to denote itself to the context manager. |
function joinCommonContextTest(ccowService, appName, clientUrl) { // Create a new ContextManager var contextManager = new lt.Ccow.ContextManager(ccowService); // Join Common Context var coupon = contextManager.joinCommonContext(appName, clientUrl, false, true); // Get Most recent coupon var mostRecentContextCoupon = contextManager.getMostRecentContextCoupon(); console.log("mostRecentContextCoupon:" + mostRecentContextCoupon); return coupon; }