If assigned with true or false values, the inspection status is pass or fail. It does not change if the value is not specified.
It is possible to access the inspection status with the
onResults
function argument. The property is named job_success as well.
/**
* Changes overall inspection status into Fail if the Read_Barcode_1
* The tool has not found a single CODE 128 barcode.
*
* Please do not remove 'export' keyword or this comment.
* onResults function triggers on the results of each job run.
* For more detailed information please refer to the documentation.
* @param {IMainArguments} input_result - object with results of the job.
* @returns {IMainResult} - object-defining outputs per interface.
*/
export function onResults(input_result) {
const results = input_result.tool_results_by_names.Read_Barcode_1;
if (results.decode_count != 1) {
return {
job_success: false
}
}
if (results.decodes[0].symbology != "CODE128") {
return {
job_success: false
}
}
return {
job_success: input_result.job_success
}
}