13 Replies Latest reply on Feb 3, 2014 4:48 AM by Ajay Sharma

    Please explain Leave Request Process flow

    Ajay Sharma

      Hi,

       

      I would like to know the complete flow of Leave request i.e. when a employee request a leave from ESS and click on Submit button what happens in background

       

      1. which workflow is getting executed
      2. which API is getting called
      3. Where the values are getting stored.

       

      Can anyone give me details on this or any link.

       

      Thanks & Regards,

      Ajay Sharma

        • 1. Re: Please explain Leave Request Process flow
          user10615050

          Hi Ajay,

           

          Please go through the Oracle document (Doc ID 789081.1). Hope you'll find many answers related to your query.

           

          Thanks

          AshokP

          1 person found this helpful
          • 2. Re: Please explain Leave Request Process flow
            Ajay Sharma

            Thanks Ashok.

             

            I am unable to perform the steps mentioned in the document as when I tried to add responsibility to a user I didn't found any responsibility with "Approvals Management Business Analyst"

             

            Even though I understood many thing from that document. Can you please tell me about the HR_LOA_JSP_PRC.

             

            Is this getting executed when an employee click on "Submit" button from AbsenceReviewPG. I don't know regarding the WorkFlows.

             

            My requirement is that I want to facilitate employee to enter a Leave Request from their Mobile.

             

            Thanks & Regards,

            Ajay Sharma

            • 3. Re: Please explain Leave Request Process flow
              user10615050

              Hi Ajay,

               

              First of all i would like to let you know that the Leave of Absence in Oracle SSHR is standard approval process upto 1 level supervisor and you can achieve that without any customization.

               

              Refer to above query;

              1. The responsibility "Approvals Management Business Analyst" is require to configure approval rules(AME) on top of workflow process. This resp. can be assigned to user through 'User Management' as it is role based.

              2. HR_LOA_JSP_PRC is a standard workflow process, which has been used for approval process after clicking on Submit button.

               

              After execution of transaction, then you can check this through "Workflow Administrator" for details of approval process.

               

              Refer to your requirement;

               

              I'm not sure about the mobile application, but if it is oracle application and applying through mobile, then it would be same process.

               

              Thanks

              AshokP

              1 person found this helpful
              • 4. Re: Please explain Leave Request Process flow
                Ajay Sharma

                Hi Ashok,

                 

                Thank You very much for your guidance.

                 

                The mobile application is custom application. So can you please give me details that after requesting leave and before supervisor/ manager approves in which table the record gets stored as I went through Google and found that it data gets stored in temp table before Approval but I didn't found any details of that table.

                 

                 

                Thanks & Regards,

                Ajay Sharma

                • 5. Re: Please explain Leave Request Process flow
                  Ajay Sharma

                  Hi Ashok,

                   

                  After requesting for Leave the data is getting inserted in two Tables HR_API_TRANSACTIONS and HR_API_TRANSACTION_STEPS

                   

                  But not all the values getting stored in columns. There is one column "TRANSACTION_DOCUMENT" and in this column one XML data is inserted which has all the records which I passed to OAF pages.

                   

                  Can You please give me more details about these two tables and the TRANSACTION_DOCUMENT column

                   

                   

                  Thanks & Regards,

                  Ajay Sharma

                  • 6. Re: Please explain Leave Request Process flow
                    Vigneswar Battu

                    Hi Ajay,

                     

                     

                    Check these notes -

                     

                    How SSHR Changes Are Stored While They Await Approval (Doc ID 167419.1)

                     

                    How To Locate Pending Approval Absences Information In HR Tables ? (Doc ID 838402.1)

                     

                     

                    All the pending transaction data is stored in -

                     

                    1) HR_API_TRANSACTIONS

                    2) HR_API_TRANSACTIONS_STEPS

                    3) HR_API_TRANSACTIONS_VALUES

                     

                     

                    Once the transaction is actioned(approved/rejected), the data is deleted from these tables.

                     

                     

                    Cheers,

                     

                    Vignesh

                    • 7. Re: Please explain Leave Request Process flow
                      Ajay Sharma

                      Hi Vignesh,

                       

                       

                       

                      I verified the record in the tables mentioned by you. But no record is getting inserted into HR_API_TRANSACTIONS_VALUES table for Leave request.

                       

                       

                       

                      Each and every time I am making any changes for leave from OAF page before submitting it HR_API_TRANSACTIONS and HR_API_TRANSACTIONS_STEPS table values are getting updates.

                       

                       

                       

                      I am able to request a leave using PL/SQL code but my concern is now that how to generate the XML which is getting stored in TRANSACTION_DOCUMENT column in HR_API_TRANSACTIONS table. Currently I am manually creating this XML but I want to automate it.

                       

                      I searched around it and found that in this column the entire state of the Application Module is captured.


                      How this is happening ? How to achieve it via PL/SQL or Java?

                       

                      Is there any seeded API which is getting called and which I can use from PL/SQL code.

                       

                       

                       

                      Thanks & Regards,

                      Ajay Sharma

                      • 8. Re: Please explain Leave Request Process flow
                        Ajay Sharma

                        Hello All,

                         

                        Please help me for the mentioned requirement.

                         

                         

                        Thanks & Regards,

                        Ajay Sharma

                        • 9. Re: Please explain Leave Request Process flow
                          Ajay Sharma

                          Hi,

                           

                          In XML file EO name was given:

                           

                          <EO Name="oracle.apps.per.schema.server.TransactionsEO">

                          I look into the code of TransactionsEOImpl and I found following code there :

                           

                          ClobDomain localClobDomain = getTransactionDocument();
                                try
                                {
                                  OracleConnection localOracleConnection = (OracleConnection)localOADBTransactionImpl.getJdbcConnection();
                                  CLOB localCLOB = getTempCLOB(localClobDomain, localOracleConnection);
                                  localOracleCallableStatement.setCLOB(23, localCLOB);
                                }
                                catch (Exception localException3)
                                {
                                  if (localOADBTransactionImpl.isLoggingEnabled(5))
                                    localOADBTransactionImpl.writeDiagnostics(this, "Assert: Critical System Error: ", 5);
                                  throw OAException.wrapperException(localException3);
                                }
                          
                          

                           

                          The method getTransactionDocument has below code:

                           

                          public ClobDomain getTransactionDocument()
                            {
                              return (ClobDomain)getAttributeInternal(33);
                            }
                          
                          

                           

                          and the method getTempCLOB has below code:

                          CLOB getTempCLOB(ClobDomain paramClobDomain, OracleConnection paramOracleConnection) throws Exception
                            {
                              CLOB localCLOB = CLOB.createTemporary(paramOracleConnection, true, 10);
                          
                          
                              localCLOB.open(1);
                          
                          
                              int i = 0;
                          
                          
                              Reader localReader = paramClobDomain.getCharacterStream();
                              Writer localWriter = localCLOB.getCharacterOutputStream();
                          
                          
                              char[] arrayOfChar = new char[paramClobDomain.getBufferSize()];
                          
                          
                              while ((i = localReader.read(arrayOfChar)) != -1) {
                                localWriter.write(arrayOfChar, 0, i);
                              }
                              localWriter.flush();
                              localWriter.close();
                              localReader.close();
                          
                          
                              return localCLOB;
                            }
                          
                          

                           

                           

                           

                          Please explain me this code.

                           

                          Thanks and Regards,

                          Ajay Sharma

                          • 10. Re: Please explain Leave Request Process flow
                            Vigneswar Battu

                            Hi Ajay,

                             

                            What is it that you intend to do.

                            #1. Do you just want to insert data in the absences tables ? If so, you can use the absence API - HR_PERSON_ABSENCE_API , but this will not invoke any work-flow for approvals. So going this way would mean you are only entering absences after all approvals are done.

                             

                            #2. If you want to integrate the workflows as well, it is not straight forward.

                            You need to analyse the submit button and see what all data it is using internally.

                            If they provided a webservice, it would have been easier, but I don't see a provision in R12.

                             

                            Cheers,

                            Vignesh

                            • 11. Re: Please explain Leave Request Process flow
                              Ajay Sharma

                              Hi Vignesh,

                               

                              My intention is to Provide Leave creation from Mobile application instead of OAF page.

                               

                              We have created Web Service and we are able to create Leave request but now the concern is creating CLOB which is getting stored in TRANSACTION_DOCUMENT column in HR_API_TRANSACTIONS table. We want to automate this creation.

                               

                              When I searched on it I found that this CLOB value is nothing but the Application Module object state. But in case of our requirement there will be no Application Module.

                               

                              So how we can automate this ?

                               

                              User is going to insert only those value which he selects from OAF page. We have created a simple UI for user.

                               

                              I hope now the requirement is clear.

                               

                              Thanks & Regards,

                              Ajay Sharma

                              • 12. Re: Please explain Leave Request Process flow
                                Vigneswar Battu

                                How are you planning to do the approvals ?

                                If you still want to use the seeded workflow then you need to debug the form and analyse it.

                                The OAF pages use extensive use of Oracle EOs, VOs and AM.

                                Not sure how you would replace those with your own webservices.

                                 

                                If you want to insert the data directly into the absence tables, then use the Pl/Sql API.

                                • 13. Re: Please explain Leave Request Process flow
                                  Ajay Sharma

                                  Hi Vignesh,

                                   

                                  We are able to request leave and also able to take actions like Approve, Reject.

                                   

                                  We are using Web Service and PL/SQL API to achieve this and there is no problem in that except the XML CLOB generation.

                                   

                                   

                                  Thanks & Regards,

                                  Ajay Sharma