Monday, December 6, 2010

SOA Suite - logging in BPEL

I was wondering how to log debug information in a BPEL process,
and here I found an excellent article on using a Java embedded action.... great stuff, Brazilian friend, bem feito!

Just code this into a Java Embedded activity:

Object countLines = getVariableData("countLines");   
  
System.out.println("IN LOOP countLines=" + countLines);

/* writes to the audit trail - will then be visible in BPEL console at runtime*/
addAuditTrailEntry("countLines is: " + countLines);




This article seems to be interesting on how to use log4j from a BPEL process

See also here for more on logging XML in BPEL

2 comments:

Fabio Mazanatti said...

Thanks for the reference, really appreciated it!

About using addAuditTrailEntry, just a word of caution: each call to this adds a step to the instance's audit trail (obviously), so registering too many entries on a single instance can seriously mess up visualization from BPEL's console (meaning, browser crash).


Cheers,
Mazanatti

Jan van Zoggel said...

Thanx Pier! What I needed :)