You are viewing the documentation for Blueriq 13. Documentation for other versions is available in our documentation directory.

Operations on a subscription can lead to a list of events containing changes happened on the subscribed sessions. This page describes the possible events.

EventResponse

Events from the server are packaged in an EventResponse object containing a list of events.

 

{
	events: [{ 
		type: 'page' | 'project' | 'sessionClosed' |
		      'taskStarted' | 'taskFinished' | null,        // Type of event
	}],
}

 

The events van be of multiple types that can be identified by their type property.

PageChangedEvent

The page event contains all changes of a the current page of a certain session

{
	type: 'page',
	sessionId: string,                     // The id of the session the changes occured in
	changes: [{
		type: 'add' | 'update' | 'delete', // Type of change that occured to the element with the specified key
		key: string,                       // The key of the element this change is for
		model: { ... },                    // Updated model content. Not present in case of a 'delete'
	}],
}


The model property contains a page model as specified at REST Page Models V1 page.

SessionClosedEvent

This event is triggered when a Blueriq session has been closed.

{
	type: 'sessionClosed',
	sessionId: string,                     // The id of the session that has been closed
}

ProjectChangedEvent

This event is triggered when a new project was started, resulting in a new Blueriq session to be opened.

{
	type: 'project',
	sessionId: string,                     // The id of the session for which the project has changed
	isNewTab: bool,                        // Whether or not the result is to be displayed in a new tab
	url: string,                           // New URL to go to (deprecated per 11.0, use `newSessionId` instead)
	newSessionId: string,                  // The id of the session that was started for the new project
}

TaskChangedEvent

This event is triggered when the process engine infered another active task

{
	type: 'taskStarted' | 'taskFinished' | null,  // When null, the status may be used to determine the kind of change
	sessionId: string,                            // The id of the session for which the task has changed
	status: 'open' | 'started' | 'completed' |
            'expired' | 'canceled',               // Current status of the 
	taskId: int,                                  // The id of the task
	caseId: int,                                  // The id of the case the task is part of
}
  • No labels