omron — Job Monitoring Details

5.3 Monitoring of Jobs Job Request Using SQL Job requests involve inserting into both the job_request_view and job_request_detail_view. To accomplish this you will need add the segments associated with the job in the job_request_ detail_view after creating the job itself in the job_request_view. These database insertions need to be created in the same transaction. To create a job request using the POST method:

BEGIN; WITH new_jobRequest AS (INSERT INTO job_request_view(job_id, default_priority, namekey) VALUES ('JobID1', true,uuid_generate_v1()) RETURNING namekey) INSERT INTO job_request_detail_view (job_request,idx, goal, priority, segment_type, namekey) VALUES ((SELECT namekey FROM new_jobRequest),'1','Goal1',10,'Pickup',(SELECT namekey FROM new_jobRequest) || ' 1'), ((SELECT namekey FROM new_ jobRequest),'1','Goal2',20,'Dropoff',(SELECT namekey FROM new_jobRequest) || '2'); COMMIT; Job Request Using RabbitMQ inbound.JobRequest outbound.JobRequest 5.3 Monitoring of Jobs The monitoring of jobs can be accomplished with any communication channel.

Live updates can be obtained from the REST stream endpoints or from the RabbitMQ channel. On demand data can be obtained with non-stream REST calls and from the database. When monitoring jobs, keep in mind the two-step nature of job creation (refer to Job Creation Steps on page 33). If job creation fails (for instance when a specified goal doesn’t exist on the map), no job will be created and the failure will be reported on the status field of the job cre- ation record without making any job or job_segment record.

Given this functionality, a pro- grammer may find it beneficial to check the status of a created job prior to working with the job table, REST path, or RabbitMQ queue to monitor its progress. Job Monitoring Schema Entities Job monitoring schema consists of the following entities: l Job - get the status of queued jobs. l Job Segment - get the status of queued job segments. l Job History - get the history of jobs. l Job Segment History - get the history of job segments. Job Monitoring Details This section provides details for monitoring all existing jobs. The following table describes the Job Monitoring item schema. 44 Fleet Operation Workspace Core Integration Toolkit 20964-000 Rev.

C User's Manual