Can we check what data is entering into local /input variable for a server action

Hi,

I am using a server action which is having  local variables and a output variable.This server actions runs based on timer.This output variable is using structure data type. So, is there any possibility to check what data is entering into the output variable.Can we check from service studio or any other.

Best Regards,

Pavani.

Hello Pavani,

Set up some logging, using LogMessage (SystemAction).

This way you can see what happens inside any action and extract it from General logs in Service Center.


Best regards

Hi Cristiano,

Thank you for the prompt reply.

Can you guide me how to setup logging.I dont have idea on this or can you share me sample oml.

Thanks,

Pavani. 

Hi Pavani,

You can set up some logging with the LogMessage action, or you can debug your action. Set a breakpoint on action called by the Timer, make sure no Entry espace is defined, and then run it in ServiceCenter.

Hi Afonso,

By using this LogMessage action, can we see  what data is coming into output variable

Just for clarity why entry espace should not be defined.I have other espaces also to carry debug flow.Is there any problem If I include entry espace.

Thanks,

Pavani.

Solution

You can use LogMessage to write messages to your General tab in the Monitoring section of your ServiceCenter, like this:

Since it's a String, you can send anything you need, like your Structure values. What you write with the LogMessage action will appear here:

When I say that you shouldn't use an Entry espace when debugging Timers, it's because I usually start my debugging in the Timer espace itself, and only then I enter other espaces if I'm using references.

Solution

Hi Afonso,

This is helpful

Thank you for clarifying the doubt :)

Hi Alfonso, 

How can I get that LogMessage icon in the ServiceStudio? it does not appear on my left-hand side set of icons. 

Thanks,

Ulises

Hi Ulises

In order to make it available in your module, you need to click on the top left button Manage Dependencies (ctrl + Q) then in System module go to Server Actions and tick LogMessage. Then it will become available under the Logic Tab (top right) -> Server Actions -> System.



Best regards

Anna

Hey Ulises,

Anna is correct, check your Dependencies tab and you should be able to reference it in your espace. 

In the future, feel free to open up a new topic with a question - it helps other users with the same problem by making it easier to find.

Thanks Anna! got it.