Package io.iworkflow.core.persistence
Interface StateExecutionLocals
-
- All Known Subinterfaces:
Persistence
- All Known Implementing Classes:
PersistenceImpl
,StateExecutionLocalsImpl
public interface StateExecutionLocals
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <T> T
getStateExecutionLocal(java.lang.String key, java.lang.Class<T> type)
Retrieve a local state attribute User code must make sure using the same type for both get and setvoid
recordEvent(java.lang.String key, java.lang.Object... eventData)
Record an arbitrary event in State Start/Decide API for debugging/tracking purposevoid
setStateExecutionLocal(java.lang.String key, java.lang.Object value)
set a local attribute.
-
-
-
Method Detail
-
setStateExecutionLocal
void setStateExecutionLocal(java.lang.String key, java.lang.Object value)
set a local attribute. The scope of the attribute is only within the execution of this state. Usually it's for passing from State Start API to State Decide API User code must make sure using the same type for both get and set- Parameters:
key
- the key of the stateExecutionLocal(scope of the state execution)value
- the value
-
getStateExecutionLocal
<T> T getStateExecutionLocal(java.lang.String key, java.lang.Class<T> type)
Retrieve a local state attribute User code must make sure using the same type for both get and set- Type Parameters:
T
- the value type- Parameters:
key
- the key of the stateExecutionLocal(scope of the state execution)type
- the value type- Returns:
- the value
-
recordEvent
void recordEvent(java.lang.String key, java.lang.Object... eventData)
Record an arbitrary event in State Start/Decide API for debugging/tracking purpose- Parameters:
key
- the key of the event. Within a Start/Decide API, the same key cannot be used for more than once.eventData
- the data of the event.
-
-