Raw Action
You can write a raw definition of an action not defined inside Cherri, in Cherri.
Defining an action
Provide a string of the action WFWorkflowActionIdentifier
. Then, optionally provide a dictionary for the WFWorkflowActionParameters
.
rawAction("is.workflow.actions.alert", {
"WFAlertActionMessage": "Hello, world!",
"WFAlertActionCancelButtonShown": false
})
This defines an alert action with the message Hello World!
. This action is already defined in Cherri using the alert()
action. Still, this example demonstrates a simple way actions not implemented in Cherri can be used.
However, there is an alternative called action definitons in a future release, which creates reusable action definitions.
Variable Values
Future Release
To use a variable value for a parameter that only accepts a variable value, prepend an inline variable reference’s brackets in a string value with the character $
.
action saveFile(variable file) {
rawAction("is.workflow.actions.documentpicker.save", {
"WFInput": "${file}"
})
}
Again, just like with the alert()
action, there is already a saveFile()
action; this is only an example.
Only a single variable is allowed; if this is not detected, the compiler treats the value as a string with inline variable references.