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

Workflow robots and conditionals java code debugging

Highlighted
Granite

Workflow robots and conditionals java code debugging

Hello,

If for example a System.out.println("some text"); line is used within the java code where does the result show up?

5 REPLIES 5
Highlighted

Re: Workflow robots and conditionals java code debugging

Look in your BGMS log file.  All workflow tasks run on the BGMS and will therefore print out to that log file.

Highlighted

Re: Workflow robots and conditionals java code debugging

It's there. Thanks.

system_out_println-test.PNG

Wouldn't know what's BGMS so i marked Randy's reply as correct.

Highlighted

Re: Workflow robots and conditionals java code debugging

James62 wrote:

Hello,

If for example a System.out.println("some text"); line is used within the java code where does the result show up?

In the method server or background method server logs. For a workflow this will show up in the background method server log (if you have a background method server configured).

Highlighted

Re: Workflow robots and conditionals java code debugging

Hi James,

the method server uses log4j. The default configuration file for logging (log4MethodServer.properties)  redirects the standard outputs  to the log file of the method server. See:

log4j.rootLogger=ERROR, stdout, methodServerLogFile, MiscLogEvents

If you are familiar to the use of log4j, you can quite easily configure a new logger for log4J and use it in Java, with different levels (for ex: ERROR, WARNING, INFO, DEBUG)

In your java code, you'll have something like :

org.apache.log4j.Logger LOGGER = Logger.getLogger(YourOwnClass.class);

LOGGER.debug("some text");

LOGGER.warn("some warning");

Configure logger in the log4j property file (log4MethodServer.properties), you then have to define a logger as following, and can change the level without changing your code.

log4j.logger.your.own.package=DEBUG, methodServerLogFile

(replace with your package)

Regards,

Loic

Highlighted

Re: Workflow robots and conditionals java code debugging

Hi,

"YourOwnClass.class"? "replace with your package"?

Sadly, i have no idea what any of that means, but luckily I'm done with this project and i actually succeeded. Let's just hope i won't touch workflows for a while now.

You should know this didn't fall on fertile land, but thanks anyway.

Announcements