OpenMonitoringWSResult OpenMonitoringWS(BpmProcessId tObject, OpenMonitoringWSArg tArg)
tObject. Moniker of opened process.
tArg. Operation execution parameters.
The OpenMonitoringWS operation gets URL that can be used for opening WebSocket connection for process execution monitoring.
To execute the operation, in the tObject field specify moniker of opened process. The moniker can be obtained after executing the OpenBpmProcess operation. In the tArg.key field specify unique key of executed process instance. The key is available in the list collection of execution results of the GetProcessInstances operation. In the tArg.giud field specify GUID of structure of the executed process instance, that is available in the instId field of result of the GetBpmMonitoringWorkspace operation.
The operation results in the URL that can be used to provide a permanent connection between browser and BI server via WebSocket protocol. URL format that should be sent to the WebSocket designer: ws://BI server URL[:port]/service?id= + output URL.
Below is the example of getting URL for opening WebSocket connection. The request contains moniker of opened process, process instance key, and process structure GUID. The response contains the URL.
{
"OpenMonitoringWS" :
{
"tObject" :
{
"id" : "MGJFJPPOBBDDGOAECMABJPKINDGPEBIEBLJDEKDGIANBKOGK!M!S!BPIMOEODAPBBDDGOAEDHLCADLCMDDIJDCEGJPKIJEBEEOLAHIL"
},
"tArg" :
{
"key" : "98037",
"guid" : "{99654793-F719-4107-AD36-F1060FCD62F5}"
}
}
}
{
"OpenMonitoringWSResult" :
{
"url" : "BPMMONID!{6386DAFD-2FB5-4E14-B5A2-569F41AD14A8}"
}
}
public static OpenMonitoringWSResult OpenMonitoringWS(string moniker, int instanceKey, string instanceWSGUID)
{
var somClient = new SomPortTypeClient(); // Proxy object for operation execution
// Operation execution parameters
var tGet = new OpenMonitoringWS()
{
tObject = new BpmProcessId() { id = moniker },
tArg = new OpenMonitoringWSArg()
{
key = instanceKey,
guid = instanceWSGUID
}
};
// Get monitoring age URL
var result = somClient.OpenMonitoringWS(tGet);
return result;
}
See also: