Can a Launch rule 'self-inspect' ? | Community
Skip to main content
Stewart_Schilling
Community Advisor
Community Advisor
November 29, 2017
Solved

Can a Launch rule 'self-inspect' ?

  • November 29, 2017
  • 1 reply
  • 2338 views

Is there a way to self-inspect from within a rule condition?

For instance,

     1) Can I access the rule name and log it to the console?  

     2) Within a custom event rule can I get at the event type on which the condition will be met?

    

in other words ,

if (_satellite._container.rules[0].events[0].modulePath === "core/src/lib/events/customEvent.js")  {

     console.log ( _satellite._container.rules[0].events[0].settings.type );

}

Yes, I know these are internals.  I'm wondering if the information is accessible in a supported manner.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by aahardy

#1 No, not currently.
#2 Yes. The custom code condition and custom code action both have access to an event object that contains potentially useful data about the event that triggered the rule. Try this: console.log(event.type);

1 reply

aahardyAdobe EmployeeAccepted solution
Adobe Employee
December 6, 2017

#1 No, not currently.
#2 Yes. The custom code condition and custom code action both have access to an event object that contains potentially useful data about the event that triggered the rule. Try this: console.log(event.type);