public interface DeviceExecStatus
DeviceExecStatus
are never directly instantiated, but rather its extensions - DeviceTaskStatus
and DeviceRuleStatus are returned by the system to represent device execution statuses
summarized respectively for Tasks and Rules.
DeviceExecStatus-s related to Tasks could be obtained via methods
Task#listInvolvedDevices(State), Task.getInvolvedDeviceState(String, String)
and RuleEngine#listTasksForDevice(String, String, State).
Respectively, DeviceExecStatus-s related to Rules could be obtained via
Rule#listInvolvedDevices(State), Rule.getInvolvedDeviceState(String, String)
and RuleEngine#listRulesForDevice(String, String, State).
When a DeviceExecStatus is related to Task:
its #getTaskId() method indicates the id of the relevant Task, and
its #getRuleId() returns null.
Respectively, when a DeviceExecStatus is related to Rule:
its #getTaskId() returns null, and
its #getRuleId() method indicates the id of the relevant Rule.
The execution status is formed as a summary of all execution items (see #getExecItems())
reported for this device. Partial executions - represented by each DeviceExecItem from the
contained list - are produced by different sub-executions from the Task-action groovy script:
method executions to Script Services may produce result report, each of which would be represented as DeviceExecItem.
closures executions produce separated DeviceExecItem items in the list.
one DeviceExecItem is always present for the execution/evaluation of the groovy script itself.| Modifier and Type | Interface and Description |
|---|---|
static class |
DeviceExecStatus.State
Defines possible statuses for device executions.
|
| Modifier and Type | Method and Description |
|---|---|
void |
cancel()
Cancels the device execution in the scope of the Task or Rule.
|
java.lang.String |
getDeviceId()
Returns the id of the device this execution status is about.
|
java.lang.String |
getDeviceType()
Returns the type of the device this execution status is about.
|
java.lang.String |
getExecAction()
Returns the groovy script of the Task or Rule.
|
java.lang.String |
getExecName()
Returns the display name of the Task or Rule.
|
DeviceExecStatus.State |
getExecState()
Returns the execution status of this record.
|
java.lang.String |
getStateDescription()
May return a additional description of the
DeviceExecStatus state if needed. |
DeviceExecStatus.State getExecState()
DeviceExecStatus.State.RUNNING
DeviceExecStatus.State.FINISHED_CANCELED
DeviceExecStatus.State.FINISHED_SUCCESS
DeviceExecStatus.State.FINISHED_WARNING
DeviceExecStatus.State.FINISHED_ERRORjava.lang.String getExecName()
java.lang.String getExecAction()
java.lang.String getStateDescription()
DeviceExecStatus state if needed.DeviceExecStatus state.ManagementException - if system error occurs.java.lang.String getDeviceType()
java.lang.String getDeviceId()
void cancel()
throws ManagementException
ManagementException - if system error occurs.Copyright © 2019 Bosch Software Innovations GmbH. All Rights Reserved.