Adding a log to the BPEL Audit Trail

Throughout the recipes in this chapter we saw quite a few lines of auditing (addAuditTrailEntry). We did not explore them in any of the recipes, as this recipe is dedicated to exploring the possibilities of auditing in the Java Embedding activity.

How to do it…

Open the BPEL_and_Java_1_1 process and insert the Java Embedding activity (Auditing).

We insert the code into a snippet as follows:

  1. Initially, we read the content of the input data. Note that we added the auditing method that outputs the input variable content:
    Object input_obj= getVariableData("Input_Txt_Var");    
    addAuditTrailEntry("Input data", input_obj);
    
  2. In the try/catch block, we convert the content of the input variable to a double number. If the type ...

Get BPEL and Java Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.