Error Codes for Queue Actions

You can encounter validation, execution, or internal type of errors when your plug-in performs an action.

Validation Errors

If the error message contains only validation type of errors, it means that no actions are applied and no entity collections are updated. So, the close message can be sent again with the same actions, corrected to eliminate the errors. This table describes the validation errors:

Type Occurs When Available Message Fields
TYPE_ACTION_ERROR Actions have an invalid format or are inapplicable
  • actionId
  • entity
  • entityId
TYPE_ACTION_PARAM Action param has an invalid value or mandatory param is missing
  • actionId
  • entity
  • entityId
  • paramName
TYPE_ACTION_PROPERTY Value of a property submitted by the plug-in to be updated in the "properties" param, has an invalid value
  • actionId
  • entity
  • entityId
  • propertyLabel

Execution Errors

Execution errors are errors that are generated when the actions are applied. As actions are applied one after the other, some may fail and some may be applied successfully. The error message contains the execution errors for failed actions. This means that the entity collections may be updated after some actions are applied, and it doesn’t produce any execution errors (or there are no errors that contain their index). So, the actions that don't fail must not be sent again. This table describes the execution errors:

Type Occurs When Available Message Fields
TYPE_ACTION_FAILED Action is rejected due to incorrect value of action params, which can't be checked at the validation stage
  • actionId
  • entity
  • entityId

Internal Errors

If the validation passes successfully, but the entity collection update or some actions fail, then you get internal errors. This means that the entity collection update may not be applied for the actions that didn't cause errors. In this case, the entities are in a state that is unknown to the plug-in, so the close message containing any updates must not be sent. This table describes the internal errors:

Type Occurs When Available Message Fields
TYPE_INTERNAL

Oracle Field Service is unable to process the message due to an unexpected change of the system state.

Doesn't contain information about the action, which caused it.

Both actions and entity collection updates may lead to such errors.

NA

This table lists the error codes that are available for queue-related actions such as activate queue and deactivate queue.

Code Caused by Action Cause
TYPE_ACTION_ERROR
CODE_ACTION_ON_PAST_DATE_NOT_ALLOWED
  • activate_queue

  • deactivate_queue
A plug-in attempts to activate or deactivate a queue that is in the past (archived).
CODE_ACTION_ON_FUTURE_DATE_NOT_ALLOWED
  • activate_queue

  • deactivate_queue
A plug-in attempts to activate or deactivate a queue that is in future.
CODE_ACTION_STARTED_ACTIVITY_EXISTS
  • deactivate_queue
A plug-in attempts to deactivate a queue that has a started activity.
CODE_ACTION_ENROUTE_ACTIVITY_EXISTS
  • deactivate_queue
A plug-in attempts to deactivate a queue that has an en route activity.
CODE_ACTION_PENDING_ACTIVITY_EXISTS
  • deactivate_queue
A plug-in attempts to deactivate a queue that has one or more scheduled pending activities.
CODE_ACTION_UNKNOWN "action" param is not equal to any of the supported queue actions.
CODE_ACTION_ENTITY_UNKNOWN "entity" param is not equal to "queue".
TYPE_ACTION_PARAM
CODE_ACTION_PARAM_VALUE_INVALID
  • activate_queue

  • deactivate_queue
"action_time" has incorrect format.
TYPE_INTERNAL
CODE_UNKNOWN
  • activate_queue

  • deactivate_queue
Oracle Field Service is unable to process the message due to an unexpected change of the system state.

Example

"resource": {
    "currentTime": "2021-02-03 04:05:06",
    "deviceUTCDiffSeconds": 42,
    "timeZoneDiffSeconds": -18000
}