Get Latest Updates directly delivered in your Email

PeopleSoft Enable Trace on Employee & Manager Self Service AWE Transaction

This blog post i will discuss about trace options on AWE for hcm Employee Self Service & Manager Self Service approval workflow engine transaction.

Almost all transaction in mss are based on approval workflow engine, it is some time you might require to view trace specially when you have multiple states, path & criteria has been set on approval process setup.since all manager self service transaction are basted on HCM AWE wrapper class which is  HMAF_AWE so you need to do some small workaround to set trace functionality. This very simple tweak and no delivered functionality has been hampered for that.

So lets discuss about the tweak and then show trace configuration.

Step 1

Open App Designer Search for HMAF_AWE as Application Package.

2014-11-10_00001

 Step 2

Under WRAPPERS package Open LaunchManager Class

2014-11-10_00002

Step 3

Search For

 property EOAW_CORE:DEFN:AppDef appDef

you can see the below screen shoots , i have comment out the delivered line , then copy it and paste into new line with below modifications. Please use your comments why you modified the the delivered code, it is good practice.

property EOAW_CORE:DEFN:AppDef appDef get set

 

2014-11-10_00003

Step 4

As you have declare get set property, now you need to declare body so add this at the end.

/** Added By Nayan For AWE Trace **/
/** Doc ID 1630877.1 **/
get appDef
   /+ Returns EOAW_CORE:DEFN:AppDef +/
   /+ Extends/implements HMAF_AWE:INTERFACES:ILaunchManager.appDef +/
   Return &LaunchMngr.appDef;
end-get;

set appDef
   /+ &NewValue as EOAW_CORE:DEFN:AppDef +/
   /+ Extends/implements HMAF_AWE:INTERFACES:ILaunchManager.appDef +/
   &LaunchMngr.appDef = &NewValue;
end-set;

/** Doc ID 1630877.1 **/
/** End By Nayan **/

2014-11-10_00004

Now you are done with workaround. Now lets move to awe trace.

Now Open any manager self service manager transaction request page ( end with _MGR). for this instance i will demonstrate “PromoteEmployee”  transaction.

Please Note All this Code Need to put on Originator Submit/Request Component SavePostChange Event.
This Means Where the Source of AWE Transaction
All This Code Works Only Component SavePostChange events.

2014-11-10_00009

Add this line before DoSubmit Call.

/** Start Set AWE Trace True, For AWE Trace By Nayan Doc ID 1630877.1 **/
&LaunchMgr.appDef.trace_flag = True;
/** End Set AWE Trace True, For AWE Trace By Nayan Doc ID 1630877.1 **/

Another Example

 /* Launch the AWE Transation */
         If &LaunchMgr.hasAppDef And
               &LaunchMgr.submitEnabled Then

/** Start Set AWE Trace True, For AWE Trace By Nayan Doc ID 1630877.1 **/
&LaunchMgr.appDef.trace_flag = True;
/** End Set AWE Trace True, For AWE Trace By Nayan Doc ID 1630877.1 **/

/** --- Before Dosubmit method Call --- **/
&LaunchMgr.DoSubmit();

Now you need to write File to view the trace.

 /** ----- Put this Code at before Any Page Transfer 
 * TransferPage(Page.FE_ADDRESS_STS);
 * RunWFSavePostChange("HR_PROMOTE_CONFIRM");
**/
 
/** Start Writing Files For AWE Trace By Nayan Doc ID 1630877.1  **/
If &LaunchMgr.appDef.trace_flag = True Then
   Local File &trace = GetFile("/psoft/HRDEV/appserv/HRUAT/LOGS/BNP_AWE_Trace_*.log", "N", "A", %FilePath_Absolute);
   &trace.WriteLine(&LaunchMgr.appDef.trace);
   &trace.Close();
End-If;
/** End Writing Files For AWE Trace By Nayan Doc ID 1630877.1  **/

2014-11-10_00010It is also good idea to write trace files only on Test or UAT environment , so that when you migrate this into production unnecessary trace file will not generate or put trace_flag as false whatever your choice.

/** Start Writing Files For AWE Trace By Nayan Doc ID 1630877.1  **/
If &LaunchMgr.appDef.trace_flag = True And
      %DbName = "HRUAT" Then 
   Local File &trace = GetFile("C:\temp\Promotion_AWE_Trace_*.log", "N", "A", %FilePath_Absolute);
   &trace.WriteLine(&LaunchMgr.appDef.trace);
   &trace.Close();
End-If;
/** End Writing Files For AWE Trace By Nayan Doc ID 1630877.1  **/

Now you are done with trace settings raise promote employee transaction from Main Menu –  Manager Self Service – Job and Personal Information – Promote Employee

Upon transaction submission it will generate trace file with the specified location. Now lets view some of the sample trace files that i have generated.

2014-11-10_00007

Trace For Multiple Path with Criteria.

Trace For Multiple Path with Criteria.

Trace For Self Approved

Trace For Self Approved

What happened, you are not using HMAF_AW wrapper Class

If you are not using HMAF_AWE  wrapper class in your custom approval application and you are using directly EOAW_CORE class then almost everything is same except launch manager class, please follow the steps.

You custom Application Request Component SavePostChange Code should be like that

 /** Import Approval Framework Base Classes */
import EOAW_CORE:LaunchManager;
import EOAW_CORE:ApprovalManager;
import EOAW_MONITOR:CLASS_DEFAULTS:*;
import DBT_ASSET_AWE_UI_HNDLR:controlUIFaceDisplay;

Component EOAW_CORE:LaunchManager &c_aweLaunchManager;
Component EOAW_CORE:ApprovalManager &c_aweApprovalManager;
Component EOAW_MONITOR:CLASS_DEFAULTS:saveButtonLogicDefault &c_aweAdhocSaveButton;

Where you declare &c_aweLaunchManager as component level variable. So just set it  Before DoSubmit

 /**Set Trace Flag True , So that we can trace when Required/On Demand **/
&c_aweLaunchManager.appDef.trace_flag = True;

Write Files in previous way

 /*** If Trace Flag Is Enabled then Writign Files We can Trace **/
If &c_aweLaunchManager.appDef.trace_flag = True Then
   Local File &AWETraceFile = GetFile("c:\temp\" | Upper(%UserId) | "_AWE_TRACE_" | %Datetime | ".log", "N", "A", %FilePath_Absolute);
   &AWETraceFile.WriteLine(&c_aweLaunchManager.appDef.trace);
   &AWETraceFile.Close();
End-If;
/*** AWE Trace End ***/

Please let me know your view.

Hope this helps 🙂

Related Article you might like:
Previous:
PeopleSoft MCF Email Class
Next:
Generate Excel Report From PeopleSoft SQR

2 comments on “PeopleSoft Enable Trace on Employee & Manager Self Service AWE Transaction

Leave a Reply

Your email address will not be published. Required fields are marked *

Write your code inside of code or pre tag

<code> your code resides here </code>