Events
Additionally server sends events / notifications when there is some change.
All events have one common property which is:
eventEventenum Type of the event
Allowed values
JobResultsEvent sent when job optimization is finished.
JobAddInforms that a new job has been created and added to the queue.
JobDeleteInforms that a job has been just deleted.
JobStateInforms that job’s state has just changed.
JobProgressInforms about progress of a job.
StatusEvent sent when server’s state is changed.
The
eventproperty identifies the type of the event.
JobResults
The JobResults event is sent when job optimization if finished.
jobIdintID of the job that has been finished.
resultOutputResults of the optimization in a form of Output data group object.
JobAdd
The JobAdd event informs that a new job has been created and added to the queue.
jobIdintID of the job that has been created.
JobDelete
The JobDelete event informs that a job has been just deleted.
jobIdintID of the job that has been deleted.
JobState
The JobState event informs that job’s state has just changed
jobIdintID of the job the state of which has changed.
stateJobStateenum State of the job
Allowed values
sNewThe job is new and waiting in a queue.
sPendingThe job is currently optimized.
sCanceledThe job was cancelled.
sDoneThe job was optimized.
sErrorThere was an error while handling the job.
State of the job.
errorCodeErrorCodeenum Contains the error code
Allowed values
ecNoActiveLicenseFoundNo active license was found.
ecConfigParsingFailedThere was an error while parsing the configuration data group.
ecInputParsingFailedThere was an error while parsing the input data group.
ecNoActiveProfilesFoundNo active optimization profiles were found. Probably all of them are not active.
ecNoResultsFoundNo results found.
There may be many reasons for this, e.g., no stocks provided, stock material groups not matching piece material groups, too small stock items, etc.ecUnexpectedExceptionThere was an unexpected error. Please contact us to solve the problem!
If the job state is set to
sError, thenerrorCodeCustomProperty contains the error code.errorDescriptionstringAdditional error information.
JobProgress
The JobProgress event informs about progress of a job.
jobIdintID of the job.
progressfloatOptimization progress in percent, so 100 means 100%.
combinationCountintNumber of combinations checked.
scorefloatCurrent score of the optimization.
Status
The Status event is sent when server’s state is changed.
statusStatusenum The status of the server.
Allowed values
idleThe server is waiting for jobs to optimize.
workingThe server is currently optimizing a job.
The status of the server.
queueSizeintThe queue size, not including the active job.