Categories
PeopleCode XML Publisher

Create a Report Using XML Publisher – PeopleSoft

To create a PS Query Based XML Publisher Report we have to do the below steps:

Create a PS Query:

Navigation : Reporting Tool > Query > Query Manager.

PS-Query1

 

 

 

 

 

 

 

 

 

PS-Query2

 

 

 

 

 

Create Data Source:

Navigation: Reporting Tools > XML Publisher > Data Source.

Choose Data Source type as PS-Query and choose Data Source ID from the prompt.

datasource_1

 

 

 

 

 

 

datasource_2

 

 

 

 

 

 

 

 

 

 

Generate XML and XSD files, and save the page.

Create RTF Template:

  • Download the XML file from the newly created data source.
  • Open Microsoft Word, go to Add-Ins > Data > Load XML Data.

word1

 

 

 

 

Go to Add-Ins > Insert > Table Wizard . Perform the below steps.

word2

 

 

 

 

 

 

word3

 

 

 

 

 

 

 

 

 

 

 

 

 

 

word4

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Click Finish. Below is the template snap.

rtf_temp

 

 

 

 

Create Report Definition:

Navigation: Reporting Tools > XML Publisher > Report Definition. Perform the following steps.

rpt_defn1

 

 

 

 

 

 

 

 

rpt_defn2

 

 

 

 

 

 

rpt_defn3

 

 

 

 

 

 

 

Create Component, Page, Menu:

Create Page, Component, Menu and Register it from Online.

page1

 

 

 

 

 

 

comp1

 

 

 

menu

 

 

 

 

 

Write PeopleCode to Component Record field Field Change event.

pc

 

 

 

 

 

/*===================================
Description:
———————————————————-
Sample XML Publisher Report Where DataSource is a PS-Query.
=====================================*/

import PSXP_RPTDEFNMANAGER:*;

Local string &reportDefnId;
Local string &languageCode, &outputFormat, &templateName, &reportName;
Local date &AsOfDate;

&reportDefnId = “UD_XMLP_DMO1”;
&languageCode = “ENG”;
&outputFormat = “PDF”;
&reportName = “UD_XMLP_DMO1”;
&templateName = “UD_XMLP_DMO1_1”;
&AsOfDate = %Date;

/* Initializing Report Def class Object */
Local PSXP_RPTDEFNMANAGER:ReportDefn &rptDefn = create PSXP_RPTDEFNMANAGER:ReportDefn(&reportDefnId);
&rptDefn.Get();
&rptDefn.ProcessReport(&templateName, &languageCode, &AsOfDate, &outputFormat);
CommitWork();
&rptDefn.DisplayOutput();

Run The Report:

r1

 

 

 

 

 

 

R2

 

 

 

 

 

 

R3

 

 

 

 

 

 

 

 

 

Thanks

Milan Bhattacharjee

Categories
Approval Workflow Engine

Create A Simple AWE PeopleSoft

PeopleSoft AWE ( Approval Workflow Engine ) aka Approval Framework is part of PeopleTools Enterprise Component.
In this article will discuss detailed guideline of creating sample AWE workflow.

Sample AWE Process Flow

awe

This Sample AWE Workflow contains 4 Parts.

  1.  Part 1 – Contains Record , Component , Pages & Menu Creation ( This Part )
  2.  Part 2 – Contains AWE Transaction Registration , Configuration , Approval Process & Generic Template Setup in thru PeopleSoft Portal  ( Create A Simple AWE PeopleSoft Part – 2 )
  3.  Part 3 – Contains Testing & Demonstration AWE Workflow in PeopleSoft with different User ( Create A Simple AWE PeopleSoft Part – 3 )
  4. Part 4 – Contains Necessary Record , Component Record , Application Packages PeopleCode that need to write for AWE Workflow ( Create A Simple AWE PeopleSoft Part – 4 )

So Lets Start. Project can be share upon request , you need to like our Facebook page DBTutorBlog  then share your email address i will mail you.

Version that is used in this sample awe project PeopleTools 8.51.25 , Application Release HRMS 9.1 , Database – Oracle.
This Articles will not describe why to Use PeopleSoft Approval Framework instead of legacy workflow system.you are requested to follow PeopleBook Documentation. Here is the link – Approval Framework

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Please Follow AWE Workflow Other 4 Parts.

  1. Part 2 – Contains AWE Transaction Registration , Configuration , Approval Process & Generic Template Setup in thru PeopleSoft Portal ( Create A Simple AWE PeopleSoft Part – 2 )
  2. Part 3 – Contains Testing & Demonstration AWE Workflow in PeopleSoft with different User ( Create A Simple AWE PeopleSoft Part – 3 )
  3. Part 4 – Contains Necessary Record , Component Record , Application Packages PeopleCode that need to write for AWE Workflow ( Create A Simple AWE PeopleSoft Part – 4 )

Hope this helps 🙂

Categories
Approval Workflow Engine PeopleCode

Create A Simple AWE PeopleSoft Part – 2

This Section will Contains AWE Transaction Registration , Configuration , Approval Process & Generic Template Setup in thru PeopleSoft Portal.

Please Follow AWE Workflow Other 4 Parts.

  1. Part 1 – Contains Record , Component , Pages & Menu Creation ( Create A Simple AWE PeopleSoft )
  2. Part 3 – Contains Testing & Demonstration AWE Workflow in PeopleSoft with different User ( Create A Simple AWE PeopleSoft Part – 3 )
  3. Part 4 – Contains Necessary Record , Component Record , Application Packages PeopleCode that need to write for AWE Workflow ( Create A Simple AWE PeopleSoft Part – 4 )

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Please Note that: in Generic Template we have email bind variables like %2 and %3 etc..

%1 – always Replaced by AWE system itself by putting URL.

%2 or %3 is Email Template Bind Variable. So for filling this bind variables we need to create a Standalone SQL Defination from App Designer.
Basically it a select statement based on column name your are passing on generic template bind variables with  Transaction Keys as Input

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

As of Now we have successfully completed setup from PIA. Now its time to check Counter table to insert Your AWE Transaction Cross Reference Record ( XREF Record.)

So, using  above this Select SQL please check if your XREF Record Already there in IDS table.If already there then not required insert statement. but if you not found that your XREF Record was not entired then using this Insert Stament insert data in IDS Table.

 

Please Follow AWE Workflow Other 4 Parts.

  1. Part 1 – Contains Record , Component , Pages & Menu Creation ( Create A Simple AWE PeopleSoft )
  2. Part 3 – Contains Testing & Demonstration AWE Workflow in PeopleSoft with different User ( Create A Simple AWE PeopleSoft Part – 3 )
  3. Part 4 – Contains Necessary Record , Component Record , Application Packages PeopleCode that need to write for AWE Workflow ( Create A Simple AWE PeopleSoft Part – 4 )

Hope this helps 🙂

Categories
Approval Workflow Engine PeopleCode

Create A Simple AWE PeopleSoft Part – 3

This Section will discuss Working & testing AWE Workflow in PeopleSoft Portal.

Please Follow AWE Workflow Other 4 Parts.

  1. Part 1 – Contains Record , Component , Pages & Menu Creation ( Create A Simple AWE PeopleSoft )
  2. Part 2 – Contains AWE Transaction Registration , Configuration , Approval Process & Generic Template Setup in thru PeopleSoft Portal ( Create A Simple AWE PeopleSoft Part – 2 )
  3. Part 4 – Contains Necessary Record , Component Record , Application Packages PeopleCode that need to write for AWE Workflow ( Create A Simple AWE PeopleSoft Part – 4 )

We will now check our AWE Transaction.

  • Request Will Raise by KU0007 – Betty Locherty . KU0007 Is the requester or originator of this transaction
  • After Successful Request Launch it goes his/her supervisor. it this cased it will goes To:
    Senior Vice President-Finance KU0003 Madam Jean Parsons because KU0007 Reports to KU0003 based on Job Information Page.
  • After KU0003 approve it will goes to Admin Level Approval which is Final Level approval
  • When Admin Level Approver (in our cases “HCADMIN” is the Admin as we provide admin role to him) Approve it then close the transaction.
  • So Lets follow the steps,

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

    Please Follow AWE Workflow Other 4 Parts.

    1. Part 1 – Contains Record , Component , Pages & Menu Creation ( Create A Simple AWE PeopleSoft )
    2. Part 2 – Contains AWE Transaction Registration , Configuration , Approval Process & Generic Template Setup in thru PeopleSoft Portal ( Create A Simple AWE PeopleSoft Part – 2 )
    3. Part 4 – Contains Necessary Record , Component Record , Application Packages PeopleCode that need to write for AWE Workflow ( Create A Simple AWE PeopleSoft Part – 4 )

    hope this helps 🙂

    Categories
    Approval Workflow Engine PeopleCode

    Create A Simple AWE PeopleSoft Part – 4

    This Section will discuss about various PeopleCode that need to write In order to AWE Work properly.

    Please Follow AWE Workflow Other 4 Parts.

    1. Part 1 – Contains Record , Component , Pages & Menu Creation ( Create A Simple AWE PeopleSoft )
    2. Part 2 – Contains AWE Transaction Registration , Configuration , Approval Process & Generic Template Setup in thru PeopleSoft Portal ( Create A Simple AWE PeopleSoft Part – 2 )
    3. Part 3 – Contains Testing & Demonstration AWE Workflow in PeopleSoft with different User ( Create A Simple AWE PeopleSoft Part – 3 )

     

    PeopleCode

    People Code TypeZZ_AWE_HDR Component Record Field Level
    Event NameFieldChange
    Object NameZZ_AWE_ACTN_WRK.EOAW_SUBMIT
    /** Submit Button **/
    
    Component string &c_sAppr_Action;
    Component string &c_sSubmitBtn;
    
    &c_sAppr_Action = "S";
    
    If ( Not GetRow().IsChanged) Then
       /** force save processing **/
       SetComponentChanged();
    End-If;
    
    DoSave();
    &c_sSubmitBtn = "Y";
    
    
    People Code TypeZZ_AWE_HDR Component Record Field Level
    Event NameFieldChange
    Object NameZZ_AWE_ACTN_WRK.EOAW_SAVE
    /** Data Save As Draft **/
    
    Component string &c_sAppr_Action;
    Component string &c_sSaveDraftBtn;
    
    &c_sAppr_Action = "V";
    
    If ( Not GetRow().IsChanged) Then
       /** force save processing **/
       SetComponentChanged();
    End-If;
    
    DoSave();
    &c_sSaveDraftBtn = "Y";

     

    People Code TypeZZ_AWE_HDR Component Record Field Level
    Event NameFieldChange
    Object NameZZ_AWE_ACTN_WRK.EOAW_DENY
    /** Deny Button */
    
    Component string &c_sAppr_Action;
    
    &c_sAppr_Action = "D";
    If ( Not GetRow().IsChanged) Then
       /** force save processing **/
       SetComponentChanged();
    End-If;
    DoSave();
    People Code TypeZZ_AWE_HDR Component Record Field Level
    Event NameFieldChange
    Object NameZZ_AWE_ACTN_WRK.EOAW_APPROVE
    /** Approve Button **/
    
    Component string &c_sAppr_Action;
    
    &c_sAppr_Action = "A";
    If ( Not GetRow().IsChanged) Then
       /** force save processing **/
       SetComponentChanged();
    End-If;
    DoSave();
    People Code TypeZZ_AWE_HDR Component Record
    Event NameRowInit
    Object NameZZ_AWE_HDR
    If %Mode = %Action_Add Then
       ZZ_AWE_HDR.EMPLID.Value = %EmployeeId;
    End-If;
    People Code TypeZZ_AWE_HDR Component
    Event NamePostBuild
    Object NameZZ_AWE_HDR
    /***
     * AWE Post Build Code
     * Application developers should instantiate ApprovalManager & LaunchManager class as a component-scoped variable.
     * The best place to initialize ApprovalManager & LaunchManager class is in the component post-build event.
     ***/
    
    /** Import Approval Framework Base Classes **/
    import EOAW_CORE:LaunchManager;
    import EOAW_CORE:ApprovalManager;
    
    /** Declare functions*/
    Declare Function createStatusMonitor PeopleCode EOAW_MON_WRK.EOAW_FC_HANDLER FieldFormula;
    
    /** Declare Variables **/
    Component EOAW_CORE:LaunchManager &c_aweLaunchManager;
    Component EOAW_CORE:ApprovalManager &c_aweApprovalManager;
    Component string &c_sAppr_Action;
    Component string &c_AWEProcessDefnID;
    Component Record &headerRec; /** We have set it Component Level, So Get Acess to Others Component **/
    Local boolean &isApprover = False; /** Checl if User is Approver for this transaction **/
    
    
    /** Set Header Record, **/
    &headerRec = GetRecord(Record.ZZ_AWE_HDR);
    
    /** Get Assigned Approval Process Id for selected transaction From Workflow Transaction Page **/
    &c_AWEProcessDefnID = "ZZ_AWE_SAMPLE"; /** Get EO Process Defn ID **/
    
    /** Initialize the launch and approval managers. ApprovalManager will need reinitialization on submit */
    &c_aweLaunchManager = create EOAW_CORE:LaunchManager(&c_AWEProcessDefnID, &headerRec, %UserId);
    &c_aweApprovalManager = create EOAW_CORE:ApprovalManager(&c_AWEProcessDefnID, &headerRec, %UserId);
    
    /** Set Up Approval Process Defination **/
    &c_aweLaunchManager.definition = "ZZ_AWE_SAMPLE";
    
    
    /** Show Transaction Status Monitor & Save & Submit Button **/
    If &c_aweApprovalManager.hasAppInst Then
       
       createStatusMonitor(&c_aweApprovalManager.the_inst, "D", Null, False);
       ZZ_AWE_ACTN_WRK.EOAW_SUBMIT.Visible = False;
       ZZ_AWE_ACTN_WRK.EOAW_SAVE.Visible = False;
       
       /* Toggle all fields with the exception of the status monitor as display only.  We cannot
    change the page property as the status monitor fields would be disabled */
       Local Rowset &Rs = GetLevel0();
       For &i = 1 To &Rs(1).RecordCount
          &Rec = &Rs(1).GetRecord(&i);
          For &j = 1 To &Rec.fieldcount
             &Rs(1).GetRecord(&i).GetField(&j).DisplayOnly = True;
          End-For;
       End-For;
       
    Else
       ZZ_AWE_ACTN_WRK.EOAW_SUBMIT.Visible = True;
       ZZ_AWE_ACTN_WRK.EOAW_SAVE.Visible = True;
    End-If;
    
    
    /*** Show Approve & Deny Button Based on Condition ***/
    If &c_aweApprovalManager.hasPending And
          &c_aweApprovalManager.GetParticipant(%UserId) = "AA" Then
       ZZ_AWE_ACTN_WRK.EOAW_APPROVE.Visible = True;
       ZZ_AWE_ACTN_WRK.EOAW_APPROVE.DisplayOnly = False;
       ZZ_AWE_ACTN_WRK.EOAW_DENY.DisplayOnly = False;
       ZZ_AWE_ACTN_WRK.EOAW_DENY.Visible = True;
       ZZ_AWE_ACTN_WRK.EOAW_SUBMIT.Visible = False;
       ZZ_AWE_ACTN_WRK.EOAW_SAVE.Visible = False;
    Else
       ZZ_AWE_ACTN_WRK.EOAW_APPROVE.Visible = False;
       ZZ_AWE_ACTN_WRK.EOAW_DENY.Visible = False;
    End-If;
    /*** Show Approve & Deny & Save & Submit Button Based on Condition End ***/
    People Code TypeZZ_AWE_HDR Component
    Event NameSavePreChange
    Object NameZZ_AWE_HDR
    /** Declare Component Variables **/
    Component string &c_sSaveDraftBtn;
    Component string &c_sSubmitBtn;
    Component string &c_sAppr_Action;
    
    
    If %Mode = %Action_Add Or
          %Mode = %Action_UpdateDisplay Or
          %Mode = %Action_UpdateDisplayAll Then
       
       /** Perform Button Action **/
       /** When Submit **/
       If &c_sSubmitBtn = "Y" Then
          ZZ_AWE_HDR.EMPLID.Value = %EmployeeId;
          ZZ_AWE_HDR.SUBMIT_DTTM.Value = %Datetime;
          &c_sSubmitBtn = "";
       End-If;
       
       /** When SaveAsDraft **/
       If &c_sSaveDraftBtn = "Y" Then
          ZZ_AWE_HDR.EMPLID.Value = %EmployeeId;
          ZZ_AWE_HDR.WF_STATUS.Value = "V"; /** Set Data Saved As Draft **/
          ZZ_AWE_HDR.SUBMIT_DTTM.Value = %Datetime;
          &c_sSaveDraftBtn = "";
       End-If;
       
    End-If;


    People Code TypeZZ_AWE_HDR Component
    Event NameSavePostChange
    Object NameZZ_AWE_HDR
     /***
     * AWE SavePostChange Code
     * This Save Post Change Code Will Handled When Submit, Approve & Deny Action Performed
     **/
    
    /** Import Approval Framework Base Classes */
    import EOAW_CORE:LaunchManager;
    import EOAW_CORE:ApprovalManager;
    
    /** Declare functions*/
    Declare Function createStatusMonitor PeopleCode EOAW_MON_WRK.EOAW_FC_HANDLER FieldFormula;
    
    Component EOAW_CORE:LaunchManager &c_aweLaunchManager;
    Component EOAW_CORE:ApprovalManager &c_aweApprovalManager;
    
    Component string &c_sAppr_Action;
    Component string &c_AWEProcessDefnID;
    Component Record &headerRec; /** We have set it Component Level, So Get Acess to Others Component **/
    
    
    Local boolean &IsActionTaken = True;
    Local string &sActionMsgString = "";
    
    Evaluate &c_sAppr_Action
    When "V"
       /* When Data Saved As Draft */
       Break;
    When "S"
       /* Call DoSubmit, passing in current header info.  ;*/
       /** It is always safe to call this method (as long as the header record being passed in is valid!), */
       &c_aweLaunchManager.SetHeader(&headerRec);
       try
          
          If &c_aweLaunchManager.hasAppDef Then
             If &c_aweLaunchManager.submitEnabled Then
                &c_aweLaunchManager.DoSubmit();
             End-If;
          End-If;
          
       catch Exception &Ex1
          &sActionMsgString = "Unable to DoSubmit on the ApprovalManager." | Char(10) | " Error - " | &Ex1.DefaultText;
          &IsActionTaken = False;
       end-try;
       If (&c_aweLaunchManager.hasAppInst) Then
          /** Initialize Approval Manager if transaction was submitted */
          &c_aweApprovalManager = create EOAW_CORE:ApprovalManager(&c_aweLaunchManager.txn.awprcs_id, &headerRec, %UserId);
       End-If;
       Break;
    When "A"
       /* Call DoApprove, passing in current header info. */
       try
          &c_aweApprovalManager.DoApprove(&headerRec);
       catch Exception &Ex2
          &sActionMsgString = "Unable to DoApprove on the ApprovalManager." | Char(10) | " Error - " | &Ex2.DefaultText;
          &IsActionTaken = False;
       end-try;
       Break;
    When "D"
       /* Call DoDeny, passing in current header info. */
       try
          &c_aweApprovalManager.DoDeny(&headerRec);
       catch Exception &Ex3
          &sActionMsgString = "Unable to DoDeny on the ApprovalManager." | Char(10) | " Error - " | &Ex3.DefaultText;
          &IsActionTaken = False;
       end-try;
       Break;
    When-Other
       &sActionMsgString = "Error - Invalid Action.";
       &IsActionTaken = False;
    End-Evaluate;
    
    
    /** Show Specified Action Message Box **/
    If &sActionMsgString <> " " And
          &IsActionTaken = False Then
       MessageBox(0, "", 0, 0, &sActionMsgString);
       /* Exit message processing. */
       Exit (0);
    End-If;
    
    
    /** Show Transaction Status Monitor & Save & Submit Button **/
    If &c_aweApprovalManager.hasAppInst Then
       
       createStatusMonitor(&c_aweApprovalManager.the_inst, "D", Null, False);
       
       ZZ_AWE_ACTN_WRK.EOAW_SUBMIT.Visible = False;
       ZZ_AWE_ACTN_WRK.EOAW_SAVE.Visible = False;
       ZZ_AWE_ACTN_WRK.EOAW_APPROVE.Visible = False;
       ZZ_AWE_ACTN_WRK.EOAW_DENY.Visible = False;
       
       /* Toggle all fields with the exception of the status monitor as display only.  We cannot
    change the page property as the status monitor fields would be disabled */
       Local Rowset &Rs = GetLevel0();
       For &i = 1 To &Rs(1).RecordCount
          &Rec = &Rs(1).GetRecord(&i);
          For &j = 1 To &Rec.fieldcount
             &Rs(1).GetRecord(&i).GetField(&j).DisplayOnly = True;
          End-For;
       End-For;
       
    End-If;
    
    /* Reset &Action to Null */
    &c_sAppr_Action = " ";

    People Code TypeApplication Package PeopleCode
    Event NameOnExecute
    Object NameZZ_AWE_EVENT_HANDLR
     /***
     * Approval Event Handler Class
     * This Handle All the AWE Events
     *Event values include:
     */
    
    import EOAW_CORE:ApprovalEventHandler;
    import EOAW_CORE:ENGINE:AppInst;
    import EOAW_CORE:ENGINE:UserStepInst;
    import EOAW_CORE:ENGINE:StepInst;
    import EOAW_CORE:ENGINE:Thread;
    
    class ApprEventHandler extends EOAW_CORE:ApprovalEventHandler
       method ApprEventHandler();
       
       method OnProcessLaunch(&appinst As EOAW_CORE:ENGINE:AppInst);
       method OnStepComplete(&stepinst As EOAW_CORE:ENGINE:StepInst);
       method OnHeaderApprove(&appinst As EOAW_CORE:ENGINE:AppInst);
       method OnHeaderDeny(&userinst As EOAW_CORE:ENGINE:UserStepInst);
       
    private
       instance Record &HeaderRecord; /** Declare Record Instance **/
    end-class;
    
    
    /** Constructor */
    method ApprEventHandler
       %Super = create EOAW_CORE:ApprovalEventHandler();
       &HeaderRecord = CreateRecord(Record.ZZ_AWE_HDR); /** Set the Header Record **/
    end-method;
    
    
    method OnProcessLaunch
       /+ &appinst as EOAW_CORE:ENGINE:AppInst +/
       /+ Extends/implements EOAW_CORE:ApprovalEventHandler.OnProcessLaunch +/; /** Set Approval Prcoess **/
       
       Local string &HdrRecTopKeyValue;
       
       &appinst.thread.SetAppKeys(&HeaderRecord);
       &HeaderRecord.SelectByKey();
       
       /** Retrieve Header field values **/
       &HdrRecTopKeyValue = &HeaderRecord.GetField(Field.REQUEST_ID).Value;
       
       /** Update the Workflow Status **/
       Local Record &recHdrRecord = CreateRecord(Record.ZZ_AWE_HDR);
       &recHdrRecord.GetField(Field.REQUEST_ID).Value = &HdrRecTopKeyValue;
       If &recHdrRecord.SelectByKey() = True Then
          &recHdrRecord.GetField(Field.WF_STATUS).Value = "I"; /** Set InApproval Process **/
          &recHdrRecord.Update();
          GetLevel0().Refresh();
       End-If;
       
    end-method;
    
    
    method OnStepComplete
       /+ &stepinst as EOAW_CORE:ENGINE:StepInst +/
       /+ Extends/implements EOAW_CORE:ApprovalEventHandler.OnStepComplete +/
       
       Local string &HdrRecTopKeyValue;
       
       &stepinst.path.thread.SetAppKeys(&HeaderRecord);
       &HeaderRecord.SelectByKey();
       
       /** Retrieve Header Key field values **/
       &HdrRecTopKeyValue = &HeaderRecord.GetField(Field.REQUEST_ID).Value;
       
       /** Update the Workflow Status **/
       Local Record &recHdrRecord = CreateRecord(Record.ZZ_AWE_HDR);
       &recHdrRecord.GetField(Field.REQUEST_ID).Value = &HdrRecTopKeyValue;
       If &recHdrRecord.SelectByKey() = True Then
          &recHdrRecord.GetField(Field.WF_STATUS).Value = "I";
          &recHdrRecord.Update();
          GetLevel0().Refresh();
       End-If;
       
    end-method;
    
    
    method OnHeaderApprove
       /+ &appinst as EOAW_CORE:ENGINE:AppInst +/
       /+ Extends/implements EOAW_CORE:ApprovalEventHandler.OnHeaderApprove +/
       
       Local string &HdrRecTopKeyValue;
       
       &appinst.thread.SetAppKeys(&HeaderRecord);
       &HeaderRecord.SelectByKey();
       
       /** Retrieve Header field values **/
       &HdrRecTopKeyValue = &HeaderRecord.GetField(Field.REQUEST_ID).Value;
       
       /** Update the Workflow Status **/
       Local Record &recHdrRecord = CreateRecord(Record.ZZ_AWE_HDR);
       &recHdrRecord.GetField(Field.REQUEST_ID).Value = &HdrRecTopKeyValue;
       If &recHdrRecord.SelectByKey() = True Then
          &recHdrRecord.GetField(Field.WF_STATUS).Value = "A";
          &recHdrRecord.Update();
          GetLevel0().Refresh();
       End-If;
       
    end-method;
    
    
    method OnHeaderDeny
       /+ &userinst as EOAW_CORE:ENGINE:UserStepInst +/
       /+ Extends/implements EOAW_CORE:ApprovalEventHandler.OnHeaderDeny +/
       
       Local string &HdrRecTopKeyValue;
       
       &userinst.thread.SetAppKeys(&HeaderRecord);
       &HeaderRecord.SelectByKey();
       
       /** Retrieve Header field values **/
       &HdrRecTopKeyValue = &HeaderRecord.GetField(Field.REQUEST_ID).Value;
       /** Update the Workflow Status **/
       Local Record &recHdrRecord = CreateRecord(Record.ZZ_AWE_HDR);
       &recHdrRecord.GetField(Field.REQUEST_ID).Value = &HdrRecTopKeyValue;
       If &recHdrRecord.SelectByKey() = True Then
          &recHdrRecord.GetField(Field.WF_STATUS).Value = "D";
          &recHdrRecord.Update();
          GetLevel0().Refresh();
       End-If;
       
    end-method;

    Please Follow AWE Workflow Other 4 Parts.

    1. Part 1 – Contains Record , Component , Pages & Menu Creation ( Create A Simple AWE PeopleSoft )
    2. Part 2 – Contains AWE Transaction Registration , Configuration , Approval Process & Generic Template Setup in thru PeopleSoft Portal ( Create A Simple AWE PeopleSoft Part – 2 )
    3. Part 3 – Contains Testing & Demonstration AWE Workflow in PeopleSoft with different User ( Create A Simple AWE PeopleSoft Part – 3 )

    Please share your comments & let me know if you stuck on this Sample AWE Workflow.I will also share some advanced topics on approval framework , so stay tune.