peoplesoftpeoplecodepeoplesoft-app-engine

How to know the value of record and field in an app package when running app engine?


So I have this Application Engine that calls on this Application Package, this application package has a CreateSql(Select...) statement, and some of the records and fields are dynamic.

My question is -- how can i possibly know what value does these dynamic records and fields holds?

I tried doing a MessageBox on the application package but it does not show in the message logs in the Application Engine.

Any idea how to do this?


Solution

  • If you use MessageBox in an Application Engine, the message should appear in the stdout file. This file is formatted as follows:

    AE_(appEngine name)_(process instance).stdout
    

    This file should be visible via Process Monitor > Details > View Log/Trace. The messages in this file also get sent to Process Monitor > Details > Message Log. The only reason it doesn't appear there, is if you explicitly change the Output destination via ProcessRequest/SCHED_INFO/ReportDefn class. If not, your configuration is messed up.

    If you can't get this to work, an option would be to setup your own logging:

    Local string &sFileLoc = "C:\TEMP"; /* File location */
    Local File &fileLog = GetFile(&sFileLoc , "A", %Exec_Synchronous + %FilePath_Absolute);
    Local SQL &oSQL = CreateSQL("Select ...");
    
    &fileLog.WriteLine("LOG FOR SQL STRING: " | &oSQL.Value);
    While &oSQL.Fetch(&oOut)
    /* Handle row returned by &oSQL */ 
        &fileLog.WriteLine("...");
    End-While;
    &fileLog.WriteLine();
    &fileLog.Close();