Skip to content
← Back to Index

OnAssetCommands

This hook runs after commands have been applied to an Asset Actor from the create or applyCommands message. Commands returned from rules does not trigger the hook again.

Type

filtrera
{
  hook: 'OnAssetCommands'
  before: Asset // The asset before the commands were applied
  asset: Asset // The asset after the commands were applied
}

Effects

`effects.common.sendMessage` Sends a message to another actor after the asset has been saved. Responses from the target actor is ignored.
`effects.common.scheduleJob` Schedules a job
`effects.common.sendEmail` Queues an email for delivery through the Sendings system
`effects.common.validationError` Aborts the creation/update of the asset and returns the error to the caller.
`effects.customer.command.*` Applies a command to the actor. Replace `*` with the type of [command](/resources/actors/custom/asset/commands/) you want to apply.

© 2024 Hantera AB. All rights reserved.