Get Latest Updates directly delivered in your Email

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.

Related Article you might like:
Previous:
Migrate AWE Transaction Using Data Mover Script
Next:
Create A Simple AWE PeopleSoft Part – 3

36 comments on “Create A Simple AWE PeopleSoft Part – 4

  1. Unable to DoSubmit on the ApprovalManager.
    Error – %1: bind number %2 greater than number of input parameters. (0,0) ,

    please tell me what is the cause of the problem

  2. my two cents

    &c_aweLaunchManager.definition = “ZZ_AWE_SAMPLE”; /*post build code*/
    check this line if you have problem launching approval process .you might have defined definition as different than what we are setting here ,you can comment the statement out it will find a valid definition by it self

  3. comments are not displaying on status monitor ..i can see comments in EOAW_COMMENTS table but not displaying on status monitor,anyone help me on this please

  4. Hi,

    Im using a AWE wherein there are 6 approval levels. If any two level approvers are same then my AWE skips the level and states next level as error. How to overcome this? I need the approval to be in place irrespective of same approvers at multiple levels. That is if same approver is tagged at level 2 and level 6 then he should approve level 2 as well as level 6.

  5. Hi Nayan,

    I have done AWE setup as above and everything is working fine from PIA.
    I have enebaled HTML approval as well and configured the template.
    It is sending mail to approval with Actions as Approve & Deny.
    But when I click on the same only chrome window is getting opened, nothing else.

    can u please guide?

  6. The ApprovalManager needs to be initialized in the PostBuild to create the StatusMonitor.
    But do you need to initialize the LaunchManager in PostBuild, or can you just do it in SavePostChange?

    For example, if I am creating the approval chain based on some Requestor field in the header record instead of myself (%UserID), can I initialize the LaunchManager in Postbuild with the header requestor field value as the requestor parameter?

    • Edited:
      The ApprovalManager needs to be initialized in the PostBuild to create the StatusMonitor.
      But do you need to initialize the LaunchManager in PostBuild, or can you just do it in SavePostChange?

      For example, if I am creating the approval chain based on some Requestor field in the header record instead of myself (%UserID), can I initialize the LaunchManager in SavePostChange with the header requestor field value as the requestor parameter?

  7. Hi, I am getting the below error at the post build code,
    Unexpected data type code: None. (180,605) EOAW_CORE.DEFN.AWTxn.OnExecute Name:GetRunningAppInst PCPC:3471 Statement:52
    Called from:EOAW_CORE.ApprovalManager.OnExecute Name:ApprovalManager Statement:19
    Called from:E_EMPLOYE_PHOT_CMP.GBL.PostBuild Statement:5

    The evaluator encountered an unexpected data type code.

    The line of code which is throwing the error is,
    &c_aweApprovalManager = create EOAW_CORE:ApprovalManager(&c_AWEProcessDefnID, &headerRec, %UserId);

    Please guide me.

    Cheers,
    Karam Amit

  8. Hi Nayan,
    I’m getting this error when executing the part of the code below. Kindly assist when you get a chance. Thanks!

    &c_rHeaderRec = GetRecord(RECORD.NI_AP_PYMT_HDR);
    &c_aweLaunchManager.SetHeader(&c_rHeaderRec);
    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;

    *** Error: ***
    GetRecord: Record ‘NI_AP_PYMT_HDR’ not found in scroll level 0.

  9. I have comments on the page and I am using derived_hr.comments field on the page. How to view the comments and history comments on the approval monitor subpage.

    Where should I use that code in the custome app package or on the save post change event.

    • Hi Cherry,
      I am on my way to publish article related to AWE Header & Line level approval here i will clearly demonstrate how to use comments functionality.

      Please bear with me in the mean time.

      Nayan

      • Hi Nayan,

        If you already posted the comments functionality can you please let me know the link?

        Thaks
        Ravi

  10. class InstAppr_EventHandler 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;

    Getting the below error when I am saving the ZZ_AWE_EVENT_HANDLR peoplecode
    inappropriate use of %Super

    • Hi,

      make sure you use the same name of class name as well as constructor name.
      You class name is – InstAppr_EventHandler but constructor name still – ApprEventHandler

      it should be InstAppr_EventHandler

      Thanks.

      • Hi Nayan,

        Thanks for the replay.

        I have one quick question. In the save post change people code we have this do submit ,do approve and do deny methods. Let say when click on deny or approve. how that is going to invoke the ZZ_AWE_EVENT_HANDLR package where they update the status to A or D. I have this wf_status field with approve and deny values. And the do submit how this is going to invoke OnProcessLaunch method and even in the savepost change we are not calling the app package right “ZZ_AWE_EVENT_HANDLR “. Where is the connectivity. I am bit lost

  11. 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;

    Getting error inappropriate use of %super. I see the constructor method and the class name are same.

    • Also make sure when you create App package, app class has to be same name otherwise /*Constructor*/ will not recognize hence will get the error you reported

  12. Not able to view the comments in the approval monitor . Do we need to configure or need to implement a logic to build comments.

    I need to store the comments so the next approver acts based on the pervious approver comments.

  13. On the Final Approve/Deny, I’m still been populated with the errors
    “Unable to DoDeny on the ApprovalManager.
    Error – SQL error in Exec. (0,0)”.
    Please let me know is it fixed… Thanks for your time in advance.

  14. Need steps to add comments before approve and deny and those Comments to be listed to 2nd level approver, employee when viewing his submitted requests

  15. Dear jaanvi,
    I am waiting for your Reply I am also getting the same error.

    Unable to DoSubmit on Approval Manager
    Error – First Operand of . is NULL, so cannot access member %1 (0,0)

  16. Hi,

    When we submitting the transaction in AWE, we are getting the below error
    Unable to DoSubmit on Approval Manager
    Error – First Operand of . is NULL, so cannot access member %1 (0,0)

  17. Hi Wasim,

    You probably get error on AWE SavePostChange peoplecode ?

    This section

    catch Exception &Ex1
          &sActionMsgString = "Unable to DoSubmit on the ApprovalManager." | Char(10) | " Error - " | &Ex1.DefaultText;
          &IsActionTaken = False;
       end-try;
    

    The error that you face its common even i also faced several time in AWE, hence you can remove the try catch block at the moment so that get exact error along with line & statement number.

    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);
    
          If &c_aweLaunchManager.hasAppDef Then
             If &c_aweLaunchManager.submitEnabled Then
                &c_aweLaunchManager.DoSubmit();
             End-If;
          End-If;
          
          &sActionMsgString = "Unable to DoSubmit on the ApprovalManager." | Char(10) | " Error - " ;
          &IsActionTaken = False;
       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;
    

    Do that way and let me know if works or not.
    Hope that helps
    Nayan 🙂

    • Hello Nayan,

      Every thing is working fine but when I submit for approval ,it does not show at Approval end in there work list so what I should do.

      • Please check and make sure that user worklist active or not.
        Main Menu – PeopleTools – Security – User Profiles – User Profiles then ( Workflow Tab)
        Routing Preferences – Worklist User should be checked.
        For AWE Transaction Work in Register Transaction Page please choose Enable Notifications: dropdown – Worklist ( also can choose email if you have setup)

        Please let know if it works.

    • Hello Nayan,

      The Error i get is the same but can u tell me how to fix the main error-

      SQL error in Exec. (2,280) EOAW_CORE.NotificationManager.OnExecute Name:LoadTemplateData PCPC:2527 Statement:60
      Called from:EOAW_CORE.NotificationManager.OnExecute Name:Notify Statement:116
      Called from:EOAW_CORE.NOTIFICATION.InlineStrategy.OnExecute Name:ProcessNotifications Statement:81
      Called from:EOAW_CORE.NotificationEventHandler.OnExecute Name:ProcessNotifications Statement:1288
      Called from:EOAW_CORE.ENGINE.AppInst.OnExecute Name:Launch Statement:21
      Called from:EOAW_CORE.LaunchManager.O

      During the execution of SQL, an error occurred in the Exec subroutine. The preceding message should have described the SQL being executed.

      Thanks,
      Prat

      • I have encountered same error and here is the approach.
        Set Trace flags on, check for SQL Error in the trace file and fix the issue, in most cases issue is missing a field in the header record.

      • I have come across the same error
        Have Trace set and check for the SQL Error in the trace file.
        In most cases issue is field missing in the header table.

  18. Hello,
    I have set up all the procees and these are working also. But I am facing problem in my page when click on (SUBMIT FOR APPROVAL) button there is a error (Unable to DoSubmit on the ApprovalManager.
    Error – First operand of . is NULL, so cannot access member %1 (0,0) ) so please kindly give me a solution .

    Wasim Akhtar

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>