How do I debug a ProcessFlow?

 2 Replies
 0 Subscribed to this topic
 52 Subscribed to this forum
Sort:
Author
Messages
mikeP
Veteran Member
Posts: 151
Veteran Member
    I am new to ProcessFlow need a little help debugging a flow using the Eclipse designer.  
    
    We are an Infor Managed Services customer, i.e., they host our Lawson servers.  Their policy is that managed servers cannot be joined to the customer's domain, so we must use FTP to transfer files from our systems to the Lawson server.   
    
    To use FTP from within PF, IMS created a Lawson program, MS100.  It's a form with parms that specify the FTP particulars, local server IP, user, password, file to transfer, etc.  MS100 behaves like any other Lawson program; it that can be used in a jobdef, and when run in portal or LID, it creates log and print files.
    
    If a job barfs, e.g., a file to be pulled to the Lawson server does not exist, the print file shows errors: e.g. "an error occurred during transfer, no such file"
    
    To run it in a ProcessFlow, the MS100.gnt file is passed to the Microfocus run.exe in a SYSCMD node, as well as some other parms including the NT ID of the Lawson user running the job, and the jobdef name. When it's complete, the log appears in the PF console.    
    
    However, neither the job's log nor the print file appear for that Lawson user in portal.
    
    OK, actual questions:
    
    My normal process is to develop and test small sections of code, and verify they are working correctly.  In other tools, I would step through the code and display values, sometime in a debugger, or even simply writing variable values to the screen, web page, etc.  How does one step through a flow and examine variable values in order to know that it's working properly?  E.g., there's a SYSCMDnnnn_outputData variable that might help… how do I look at it's value?
    
    
    Second question is how does one trap an error that occurs in the SYSCMD node?  In this case, the log in the PF console shows "System command returned error code 0" even though the job barfed.  I might be able to parse the print file, but it's not created when the MS100 job is run from PF.
    
    Thanks,
    
    Woozy
    Veteran Member
    Posts: 709
    Veteran Member
      Hi mikeP,

      Just for clarification, are you using "classic" processflow (i.e. LSF PFI/PFA) or are you using IPA (Landmark Pflow)? If you are using IPA v10 then you have the ability to set breakpoints and step through the flow. If you are on PFI/PFA, then you have to rely on the pflow workunit log.

      The workunit log should show you any output there is from every node. If you are running the flow in Designer, then the log will be displayed in one of the designer panes. If you are using PFI/PFA and are running it on the server, then you will need to find the workunit log on the server in $LAWDIR/bpm/wflog. If you are using IPA, then the log is stored in the PfiWorkunit business class, and you can view it from the Process Server Administrator menu in the Landmark Rich Client.

      By the way, if you are looking for more details than what is in the log, unfortunately you are probably out-of-luck. What you see is what you get without digging into the other logs.

      Good luck!

      Kelly
      Kelly Meade
      J. R. Simplot Company
      Boise, ID
      mikeP
      Veteran Member
      Posts: 151
      Veteran Member

        Thanks Kelly.  We are using the classic PF with Integrator for now, the Eclipse version.   I found the workunit logs on the server (thanks for that), very similar to what I see in the designer console pane.

        I found I can get debug values by inserting an email activity, and emailing myself variable values and other text as needed.  Also I was reading one of your posts from 2009 asking about writing to the log, and I've been playing around with echoing from a system command node as John suggested, which should help trace the flow execution through branches.

        BTW, by examining console output from running the MS100 program, I found that it's a wrapper for functions in java file_transfer.jar.  When calling java directly from a system command node, it sets the error code so that it can be tested in a branch.