In this article, we will continue with the HRSSA workflow, and see how it integrates with the AME. You will also see the best practices steps to customize this workflow in an upgrade safe manner. In all the HRSSA processes, there is a Workflow activity named "Review Page..." as shown below. If you double click to open the properties of this WF Activity, you will find that Node Attributes tab contains a two Attributes i.e. HR_DYNAMIC_APPROVAL_LEVEL and HR_APPROVAL_FLAG. In the context of our example, the Special Information Type WF process has AME Approvals switched off, because HR_APPROVAL_FLAG is set to NO. However as per our requirements we need to enable AME for our Holiday Rejection Complaint screen. Effectively, we are trying to achieve a result whereby our custom workflow process is kicked off from the screen we created, and this custom workflow process will ensure that AME is invoked. In order to enable AME approval for our custom screen, you must not modify the standard HRSSA workflow process. Instead you should adhere to some best practices as detailed in this article.
Note:- You must read the previous article linked here
to understand the business use case of this article
Why am I not allowed to change the HR_APPROVAL_FLAG in WF Builder?
There are two reasons for this
1. If you change the AME Flag in WF Process HR_SIT_JSP_PRC, then subsequent patches from Oracle will override your change, and all of a sudden your Approval process will stop working
2. Oracle have developed these items at Access Level 20, whereas your Workflow access level as an implementer is 100+.
Therefore you will not be allowed to change the WF Attribute, unless you decide to set the access level to 20 for your development as well. Reducing the access level below 100 is not recommended, because such changes are not upgrade safe.
How do I change the AME Flag, without modifying the standard workflow process?
In order to do so, you must implement the following steps. We will latter see these steps in detail
1. In WF Builder, set your Workflow Access Level to 100
2. Make a custom copy of the WF process HR_SIT_JSP_PRC and name it as XXFT_HR_SIT_JSP_PRC
3. Within Workflow process XXFT_HR_SIT_JSP_PRC, open Review activity, and in Node Attribute tab set the HR_APPROVAL_REQ_FLAG to "Yes-Dynamic Approval"
4. Save this workflow file as XXFT_SSHRA.wft
5. Upload this workflow in UPGRADE Mode using the WFLOAD command.
6. Change the AOL Function that you created in Part 1/2 of this article.
In the parameter field of AOL Function, ensure that the value of pProcessName is changed as below
Old Value pProcessName=HR_SIT_JSP_PRC
New Value pProcessName=XXFT_HR_SIT_JSP_PRC
By implementing the above steps, you will notice that our custom screen will now be calling the custom workflow process named XXFT_HR_SIT_JSP_PRC. This workflow process name can be used in AME Set to build the desired approval logic.
Now, the steps in detail....
Open the HRSSA workflow in workflow builder, and set your access level to 100 or above.
Right click on the Workflow Process that you wish to customize and click "Copy" as shown below
Give this newly copied WF process a name, as shown below.
Display Name=XXFT SIT Holiday Complaint
For the "Review Page 4.0" activity, set the HR Approval required property to "Yes - Dynamic Approval"
Upload the workflow in UPGRADE mode
Next, save the workflow on your desktop as XXFT_HRSSA.wft and FTP the Workflow file to server
Run the WFLOAD command as shown below
[avisr12@apps2fusion patches]$ WFLOAD apps/apps 0 Y UPGRADE XXFT_HRSSA.wft
Uploaded 0 ITEM_TYPE record(s) to database.
Uploaded 0 LOOKUP_TYPE record(s) to database.
Uploaded 0 MESSAGE record(s) to database.
Uploaded 15 ACTIVITY record(s) to database.
Uploaded 0 ROLE record(s) to database.
Attach the custom Workflow Process XXFT_HR_SIT_JSP_PRC to the AOL function XXFOCUSTHREAD_SIT_COMPL_FUNC
Now, navigate to the Complaint screen that we created in Part1, and update the existing record or create a new record- as shown below.
After updating and completing the record, navigate to the "Workflow Administrator Web Applications" responsibility and click "Status Monitor".
You will find the custom workflow process being instantiated, as shown below