Actions enable the specification of a separable activity executed by a specific plugin within the container. Actions are performed in the order specified in the payload.
Actions provide enormous flexibility in what a plugin does, and represent a declarative capability to include/exclude, order, or modify parameterization of plugin specific code.
Action
type Action struct {
IOManager
Type string `json:"type"`
Description string `json:"desc"`
}
CODE
Example action list below, compute an HMS model using the *.hms input file. Then export excess precip to *
.p01.tmp.hdf, then export excess precip again to *
.dss.
Example Action in JSON
"actions": [{
"name": "compute_simulation",
"desc": "computing a simulation",
"params": {
"project_file": {
"Name": "project_file",
"ID": "6ba7b810-9dad-11d1-80b4-00c04fd430c8",
"Paths": ["/model/{ATTR::model_name}/{ATTR::model_name}.hms"],
"StoreName": "LOCAL",
"DataPaths": []
}
}
}, {
"name": "export_excess_precip",
"desc": "writing out excess precip to an hdf file for ras to import",
"params": {
"destination": {
"Name": "destination",
"ID": "6ba7b810-9dad-11d1-80b4-00c04fd430c8",
"StoreName": "LOCAL",
"Paths": ["/model/{ATTR::model_name}/ExportedPrecip.p01.hdf"]
}
}
}, {
"name": "export_excess_precip",
"desc": "writing out excess precip to a dss file for ras to import",
"params": {
"destination": {
"Name": "destination",
"ID": "6ba7b810-9dad-11d1-80b4-00c04fd430c8",
"StoreName": "LOCAL",
"Paths": ["/model/{ATTR::model_name}/{ATTR::simulationbar}_ExportedPrecip.dss"]
}
}
}, ]
CODE