Skip to content

Cast Workflow Elements

Progress (cast/progress)

Sends or updates a progress notification to the notification center and over Web push, if available.

cast/progress

Options

Below are the available options for creating progress notifications:

  • recipients: Specifies the recipient of the notification, which can be a user, a list of users, a role slug, or a list of role slugs. If this field is omitted, the notification will be sent to the current user. If set to null in recipe mode, the notification will not be sent to anyone.

  • process: Name of the process, used for identifying the current progress notification to update if there are multiple separate progresses in one workflow. Defaults to the workflow title.

  • progress: The current progress of the notification (integer). If empty, this value is incremented each time a cast/progress element with the same process is called.

  • total: The number of progress steps achievable (integer). Required.

  • title: Specify the title of the notification.

  • message: The message of the notification.

  • status_message: The status message, displayed below the progress bar.

  • entity: Append an entity, such as a File entity, to the notification using this field.

  • async: Whether to queue this notification. If selected, the workflow runs faster and is not affected much by the sending of notifications, however notifications can severely lag behind. Defaults to false.

Setting values in SPA (cast/set)

Tells the client via a websocket event to set some internal values. Usually, the object being set on the client side are fields in a resource create or edit view. Useful for dynamically filling fields based on other fields or based on data that is only available in backend.

Inputs

PortTypeDescription
defaultResource|Resource[]The resource to use for base variables.

Outputs

PortTypeDescription
defaultForwardSame output as input. Data is not changed.

Options

NameTypeDescription
valuesDict<Recipe, Recipe>Mapping from a JSONPath-selector to a recipe. Variables available in the recipe are context and input resource.
propertiesDict<Recipe, Recipe>Selector of the (multi)select fields whose available options should change. The default port is used for the new options. Example: positions[*].warehouse to indicate all warehouse select fields in the positions list.