public interface DeviceExecItem
DeviceExecItem
-s may represent results of (reported-to-user) method calls,
closure executions or just results of groovy script evaluations. DeviceExecItem
objects representing each partial result
for the device execution of this Task:
getResultSource()
method.
Together with the execution status and source origin, this report contains a result value
in case such is provided upon completion of the respective execution.Modifier and Type | Interface and Description |
---|---|
static class |
DeviceExecItem.State
Defines possible execution statuses.
|
Modifier and Type | Method and Description |
---|---|
void |
cancel()
Cancels the execution item.
|
String |
getDeviceId()
Returns id of the device executing the represented execution item.
|
String |
getExecItemId()
Returns unique identifier of this execution item.
|
DeviceExecItem.State |
getExecState()
Returns the execution state of this
DeviceExecItem . |
Date |
getFinishTime()
Returns the time at which the
DeviceExecItem turns from
DeviceExecItem.State.RUNNING_WAIT_CONFIRMATION to some of the FINISHED_xxx states. |
Map<String,Object> |
getProperties()
Returns custom properties assigned to this execution item.
|
Object |
getProperty(String key)
Gets the value of an execution item property by property name.
|
String |
getResultSource()
Provides description about the origin of the
DeviceExecItem such as method name
or closure evaluation or general task action evaluation with respect to the execution source. |
Object |
getResultValue()
Returns result value if any.
|
String |
getRuleId()
Returns the id of the Rule this execution item belongs to.
|
Date |
getStartTime()
Returns the time at which the
DeviceExecItem turns from
DeviceExecItem.State.RUNNING_PENDING_EXECUTION to DeviceExecItem.State.RUNNING_WAIT_CONFIRMATION . |
String |
getStateDescription()
May return a additional description of the Execution Item state if needed.
|
String |
getTaskId()
Returns the id of the Task this execution item belongs to.
|
String |
getTaskName()
Returns the name of the Task this execution item belongs to.
|
void |
setProperties(Map<String,Object> properties,
boolean append)
Sets the execution item properties.
|
void |
setProperty(String key,
Object value)
Sets execution item property.
|
String getExecItemId()
String getResultSource()
DeviceExecItem
such as method name
or closure evaluation or general task action evaluation with respect to the execution source.DeviceExecItem.State getExecState()
DeviceExecItem
.String getStateDescription()
Object getResultValue()
getExecState()
) is DeviceExecItem.State.FINISHED_SUCCESS
. For statuses: DeviceExecItem.State.FINISHED_WARNING
and DeviceExecItem.State.FINISHED_ERROR
this method might return an error message.Date getStartTime()
DeviceExecItem
turns from
DeviceExecItem.State.RUNNING_PENDING_EXECUTION
to DeviceExecItem.State.RUNNING_WAIT_CONFIRMATION
.Date getFinishTime()
DeviceExecItem
turns from
DeviceExecItem.State.RUNNING_WAIT_CONFIRMATION
to some of the FINISHED_xxx states.String getDeviceId()
Map<String,Object> getProperties()
setProperty(String, Object)
and setProperties(Map, boolean)
methods, as well as on the back end - by the Script Service
interpreting the execution.void setProperties(Map<String,Object> properties, boolean append)
properties
- execution item properties.append
- if true
the supplied properties will be appended/added to any properties currently existing for
this execution item, otherwise any existing properties will be fully replaced by the supplied ones.Object getProperty(String key)
key
- property namevoid setProperty(String key, Object value)
key
- property name.value
- property value.void cancel()
String getRuleId()
String getTaskId()
String getTaskName()
Copyright © 2022 Bosch.IO GmbH. All rights reserved.