JBoss Community

Re: Need jbpm 5 examples

created by Esteban Aliverti in jBPM - View the full discussion

In the @Before method of each test, where I create the ksession, I'm attaching 2 loggers to it:

 

//Console log. Try to analyze it first

KnowledgeRuntimeLoggerFactory.newConsoleLogger(ksession);

 

This is the responsible of the System.out you saw

 

I'm also also attaching a File Logger. This logger creates an xml representation of the execution that can be viewed using drools/jbpm eclipse plugin under Audit View (you have to open the generated file)

       

//File logger: try to open its output using Audit View in eclipse

File logFile = File.createTempFile("process-output", "");

System.out.println("Log file= "+logFile.getAbsolutePath()+".log");

fileLogger = KnowledgeRuntimeLoggerFactory.newFileLogger(ksession,logFile.getAbsolutePath());

 

If you get stuck please start new dicussion threads :)

 

Best Regards,

Reply to this message by going to Community

Start a new discussion in jBPM at Community