The simple way is to create a Java Embedding in BPEL with code like the following. Suppose you want to log the BPEL variable “RetryCount”:
<extensionActivity>
<bpelx:exec name="Java_Embedding1">
<![CDATA[
Object obj = getVariableData("RetryCount");
java.util.logging.Logger logger = java.util.logging.Logger.getLogger("oracle.soa.Logger");
oracle.fabric.logging.LogFormatter.configFormatter(logger);
logger.info("RetryCount is "+ obj);
]]>
</bpelx:exec>
</extensionActivity>
You will find the message “RetryCount is 1” in the diagnostic.log