Trigger
class Triggered {
@trigger('create.before', 'create.after', {
name: 'c_object_with_prop',
active: true,
principal: 'c_ok',
environment: 'production',
weight: 0.7
})
check({ memo, context, old, new, dryRun, inline, event, runtime }) {
console.log('checking')
}
static bakeMeACake() {
return true
}
}
Arguments
events
{ String[] } Event listoptions
{ Object } Options objectname
{ String }type
{ String }principal
{ String }environment
{ String = "*" }weight
{ Number = 0 }object
{ String }event
{ String }inline
{ Boolean }paths
{ String[] }
methodOptions
{ Object } Options passed to the methodmemo
{ Object }context
{ Object }old
{ Object }new
{ Object }modified
{ String[] }dryRun
{ Boolean }inline
{ Boolean }event
{ String }runtime
{ Object }name
{ String }type
{ String }principal
{ String }environment
{ String = "*" }weight
{ Number = 0 }configuration
{ Object }object
{ String }event
{ String }inline
{ Boolean }paths
{ String[] }
metadata
{ Object }resource
{ String }className
{ String }methodName
{ String }static
{ Boolean }loc
{ Object }line
{ String }column
{ String }
const { object, trigger, log } = require('decorators')
@object('c_ctxapi_340_trigger_object')
class TriggerObject extends CortexObject {