Integratec API Platform
|
The Master module also manages a database for persisting records of jobs and requests. This management and the associated services are generally referred to as Persist.
The initially serialized data, stored and managed via Integratec Persist services, consists of two primary components: tasks and jobs.
Tasks
A Persist Task is a self-contained serialized service request, containing both the Service identifier and the structured RequestData. See the JSON-serialized Persist Task example below:
Jobs
A Persist Job is simply an array of Persist Task objects. See the JSON-serialized Persist Job example below:
Persist provides four services:
persistAddJob
This service accepts an array of Tasks, parses it, and creates database records to represent the Job. Once a Job is created, it is identified by a JobID
, and may be run whenever needed using persistRunJob, without having to specify anything other than the JobID
.
Note: Adding a Persist Job to the database does not start it.
persistRunJob
This service tells Persist to run the Job specified by JobID
, which creates a JobRun
and a TaskRun
in the database for each Task in the Job. These "run" records are unique and allow you to retain an easy-to-reference work history.
For example: api.sendRecvDelete("persistRunJob", "{ "JobID": 42 }")
persistGet
This service retrieves information from the database. The information retrieved is denoted by the getType
property, which is required by the persistGet-req
schema for all persistGet
requests. Depending on getType
, additional properties may be available and/or required. See the persistGet-req
schema for more information.
The following getType
values are supported:
For example: api.sendRecvDelete("persistGet", "{ "getType": "Job", "JobID": 42 }")
persistDelete
This service permanently removes information from the database. The information to be removed is denoted by the deleteType
property, which is required by the persistDelete-req
schema for all persistDelete
requests. Depending on deleteType
, additional properties may be available and/or required. See the persistDelete-req
schema for more information.
The following deleteType
values are supported:
For example: api.sendRecvDelete("persistDelete", "{ "deleteType": "JobRunsByJobID", "JobID": 42 }")
The Jobs.sdb
database is stored in the directory specified by the RemotePath
configuration setting.
It contains four tables: