cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Did you get called away in the middle of writing a post? Don't worry you can find your unfinished post later in the Drafts section of your profile page. X

Fire an event from a service

rmórocz
1-Visitor

Fire an event from a service

Hi!

How can i fire the event from inside the service code?

As an example: if validation fails inside the service i would like to fire an ValidationFails event.

Is this possible?

Thanks

ACCEPTED SOLUTION

Accepted Solutions

About the Log, if you want to record debug type logs, you should activate Debug Log level:

Composer > Monitoring > Script

On the Log View Mashup

Logs > Settings  ( tab )

Inside settings tab:

Script Log --> New Settings = Debug

View solution in original post

4 REPLIES 4

me.name_of_the_event(params);

Hi Carles!

I have this in my code

(Test is an event)

Code of my test service:

var params = {

  Message: "Hello" /* STRING */,

};

me.Test(params);

And i have a subscription to this event (enabled). In the subscription i have this:

logger.debug(eventData.Message);

But "Hello" is still not showing in the script log.

What is missing?

About the Log, if you want to record debug type logs, you should activate Debug Log level:

Composer > Monitoring > Script

On the Log View Mashup

Logs > Settings  ( tab )

Inside settings tab:

Script Log --> New Settings = Debug

That was the missing tile in the puzzle.

Thanks

Announcements


Top Tags