Initializing help system before first use

Subscribing to Messages from Running Jobs following Disconnection

If a client gets disconnected, it is possible to subscribe to get messages for jobs that were submitted with a previous connection id.
  1. Record the values in following fields for each submitted job in case you need to reconnect later:
    1. computeJobId
    2. executionAttempts (from JOB_STATUS_UPDATED messages)
    3. the last run log line received (from RUNLOG_UPDATED messages, endLines property)
    Note: You only need to keep a record of jobs that are executing. When you receive a JOB_STATUS_UPDATED message indicating a job has finished, remove that record.
  2. When disconnected, reconnect to a new socket, see the previous section Create a websocket.
  3. Send a SUBSCRIBE message using the following format:
    {
    "messageType": "SUBSCRIBE", 
    	"messagePayload": {
    		"subscriptions": [
        {
    			  "computeJobId": 
    			  "18b2c77c-bbf76547-0d313ad7-ed74ace8", 
    			  "executionAttempts": 1, 
    			  "lastRunLogLine": 69
    			  }
        ]
    		}
    }
    Xpress Insight responds to the subscribe message with a message indicating the current job status for each job. The example below shows a typical message.
    {
     "computeJobId": "computeJob1",
      "messageType": "CURRENT_JOB_STATUS",
      "messagePayload": {
        "status": "EXECUTING",
        "modelStatus": null,
        "executionAttempts": 1,
        "resultUrl": null,
        "payloadUrl": "/api/scenarios/[scenario-id]/attachments/[attachment-id]/file",
        "runLogUrl": "/api/scenarios/[scenario-id]/run-log",
        "jobMetricsUrl": "/api/scenarios/[scenario-id]/job-metrics"
      }
    }
If the job identified by the computeJobId is finished, you will only receive this message. You can fetch the run log for the job using the runLogUrl defined on the message.
If a job identified by the computeJobId is still running, the messages received depend on whether the original job submission requested run log messages or solver callbacks:
  • If the original job submission requested run log messages, Insight 5 will send one or more RUNLOG_UPDATED messages for all run log lines that have been generated whilst the client was disconnected. The messages will begin after the lastRunLogLine sent on the SUBSCRIBE message for that job. It will then continue to send RUNLOG_UPDATED messages as the job proceeds as usual.
  • If the original job submission requested solver callbacks, Insight 5 will send any outstanding APP_MESSAGE raised whilst the client was disconnected, subject to the configured APP_MESSAGES timeout (if the client was disconnected too long, the job will have been terminated).

© 2001-2025 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.