Search…
On
Execute events registered with @on in the same script context as the current principal.
1
const { on } = require('decorators')
2
3
class Handler {
4
5
@on('axon__task.completed', { name: 'axon__task_completed_event' })
6
onCompleted( task, str ) {
7
// str === "another param"
8
}
9
10
}
11
12
const task = completeATask()
13
script.fire('axon__task.completed', task, "another param")
Copied!
Last modified 1mo ago
Copy link