Skip to main content

JOD Worker Executor File

When an JOD Action must be executed, this executor write Action Execution Formatted Content to path file.

Before write to the file, the format string is updated and all his placeholder are replaced with current Pillar, State and Action properties.
After that write Action Execution Formatted Content to the file.


Firmware Configs

path

File path where write Action Execution Formatted Content. It's mandatory.

The Action Execution Formatted Content is the result of replacing State's and Action's Placeholder to the format Firmware Config.

This property is updated with Pillar's Placeholder on worker initialization.

format

String format used to generate the content for the file. Default value '%VAL%'.

This string can contains Pillar's, State's and Action's Placeholder that will be replaced before writing the Action Execution Formatted Content to the path file.

This property is updated with Pillar's Placeholder on worker initialization and with State Placeholder and Action Placeholder on executing action.


Examples

struct.jod: BoolenAction/File
"State On/Off" : {
"type": "BooleanState",
"listener" : "file://path=status/stateOnOff.txt",
"executor" : "file://path=status/stateOnOff.txt"
}
struct.jod: RangeAction/File @ JOD Struct default file
"Action 0-50" : {
"type": "RangeAction",
"listener" : "file://path=status/%C_NAME%_State.txt",
"executor" : "file://path=status/%C_NAME%_State.txt",
"min": "0",
"max": "50",
"step": "5"
}