Execute events registered with @on in the same script context as the current principal.
const { on } = require('decorators') class Handler { @on('axon__task.completed', { name: 'axon__task_completed_event' }) onCompleted( task, str ) { // str === "another param" } } const task = completeATask() script.fire('axon__task.completed', task, "another param")
Last updated 3 years ago