[jboss-user] [jBPM] - Simple example of using Log Service task?

olddave do-not-reply at jboss.com
Tue Sep 20 08:13:16 EDT 2011

olddave [http://community.jboss.org/people/olddave] created the discussion

"Simple example of using Log Service task?"

To view the discussion, visit: http://community.jboss.org/message/627464#627464


I have a process that has a few Exec that some moving of files around and running a tool before the real work of the Process starts. But they don't seem to work and I cannot see why not. So what would be useful for general debugging is to log some of the output of the statements

So I have a Exec with Java code like this:

if(System.getProperty("os.name").equals("Linux")) {
           Runtime.getRuntime().exec("cat ./vendor_files/req/hdr ./vendor_files/req/request ./vendor_files/req/footer > ./vendor_files/req/e_desc.req");
} else if(System.getProperty("os.name").indexOf("Windows") = 0) {
           Runtime.getRuntime().exec("copy C:/vendor_files/req/hdr + C:/vendor_files/req/request + C:/vendor_files/req/footer C:/vendor_files/req/e_desc.req");

I'd like to have a log service task that logs the output from System.getProperty("os.name") and 
Runtime.getRuntime().exec("cat ./vendor_files/req/hdr ./vendor_files/req/request ./vendor_files/req/footer > ./vendor_files/req/e_desc.req");

To see if they work as expected. I see I could run these in the On-entry action, but how to assign to a parameter from here? Also where does thisLog service task log things to?



Reply to this message by going to Community

Start a new discussion in jBPM at Community

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20110920/722706ad/attachment.html 

More information about the jboss-user mailing list