Operation utils
Operation
The operation object is the main object for executing operations.
operation.execute(operationConfig)
Execute selected operation to received identifier.
Returns: void
This function takes as parameter an object with the following fields:
| Property | Type | Default | Mandatory | Description |
|---|---|---|---|---|
| subEntityIdentifier | String | No | You can execute operation on device, subscription or subscriber identifier. With subEntityIdentifier you define selected identifier. Default: If is undefined it will open on provision.administration.identifier identifier. | |
| operationType | String | Yes | Operation Identifier. You can get this values getting operation catalog. Mandatory field. The rule will be created, but the operation will not. | |
| operationTimeout | Number | 60000 | No | Operation timeout in milliseconds. |
| jobUser | String | Yes | User apiKey that launch this operation. Mandatory field. The rule will be created, but the operation will not. | |
| retries | Number | 0 | No | Operation retries number. |
| ackTimeout | Number | null | No | ACK timeout in milliseconds. |
| retriesDelay | Number | 0 | No | Delay in seconds between retries. |
| stopValue | String | operationTimeout + 5000 | No | Stop value, this value depends of stop mode selected. |
| stopMode | String | delayed | No | Stop mode. Possible values are: date: If this mode is selected, stop value is a date in YYYY-MM-DDThh:mm:ssTZD format. delayed: If this mode is selected, stop value is a time defined in milliseconds. |
| parameters | Object | {} | No | This value is a json with accepted value in selected operation. You can see parameters getting operation catalog. |
| callback | String | null | No | URI where the result of the operation execution is received. |
NOTE: The Job of the operation will be created with an active status by default.
Example of use:
The example execute ADMINISTRATIVE_STATUS_CHANGE operation to received device.
Another example with stopMode = date