Every time you execute an operation, a job is created. The job contains information about the executed operation.
|operation_id||String||The ID of a job's operation.|
|user_id||String||The ID of a user who executed the operation and initiated the job.|
|owner_id||String||The ID of an entity that the operation is attached to.|
|owner_type||String||The type of entity that the operation is attached to.
|timestamp||Integer||The timestamp for the operation execution.|
|description||Object||The description of the performed job.|
|description.exitCode||Integer||Job's exit code. Used only by the program/script operations.|
|description.stdout||String||Job's output. Used only by the program/script operations.|
|description.topic||String||MQTT topic. Used only by the MQTT operations.|
|description.message||String||MQTT message. Used only by the MQTT operations.|
|results||Object||A set of job results added with the Add Custom Job Result request.|
|results.payload||String||A set of parameters that describe custom job result.|
|results.by||String||The ID of the user, who added a job result.|
|results.timestamp||Integer||The timestamp for when the result was added.|
|process_meta.triggerStates||Array||The array of states that trigger the job's operation.|
Operation result and custom results
The job model stores the information about the operation that generated the job. This information includes the type-specific result of the operation (
description), timestamp of the operation execution (
timestamp) and the id of the user, who initiated the execution of the operation (
user_id). Users can add additional information to the job record with the Add Custom Job Result request.
Custom job result parameters have equivalents in the operation result, generated with the operation execution — the
results.by is equivalent to the
results.timestamp is equivalent to the
timestamp. The differences are the following:
payloadisn't pre-defined like
descriptionand can store an arbitrary set of parameters.
- Users can add multiple custom results, but a job can have only one operation result.
|Operation result||Custom result||Notes|