This is the third and final blog of the series, in which we would like to explain the testing part in detail.
We have kept testing separate in this blog to provide a comprehensive explanation of all scenarios and steps from a technical perspective.
We have prepared the content for this series in three blogs, where we will be diving deep into Design, Development, and Testing.
In the previous blog, @Adwait_Fadnavis walked you through the complete development process. Now, I would like to start with the testing part.
Detailed Example of the Testing Process
To illustrate the testing process in more detail, let’s walk through an example:
Let's Deep dive above steps in Detail:
Step 1: Automation Scheduled as Background Job
In a real-time scenario, this automation can be scheduled as a background job at intervals of 15 minutes, 30 minutes, or any custom-defined time interval.
The frequency can be adjusted based on the volume of approval tasks. This scheduling ensures that the system checks for new approval requests regularly and processes them in a timely manner.
As mentioned in the first blog, it is mandatory to have the desktop agent running in unattended mode. This setup is crucial for ensuring that the automation runs smoothly without manual intervention.
For real-time business scenarios, we recommend installing the desktop agent on virtual machines to ensure continuous operation and to handle high volumes of approval tasks efficiently.
Job scheduling : SAP Build Process Automation
Step 2: (Optional) Triggering the Workflow - Prepare the Dummy Workflow for Quick Testing
To facilitate quick testing, we prepared a small workflow using SAP Build Process Automation with a few fields. This dummy workflow simulates the real-time process and helps in validating the automation setup. Although in real-time, the workflow will be triggered via a valid application, here is a snapshot of our dummy workflow for demonstration purposes:
This setup allows us to test the end-to-end process in a controlled environment before deploying it in a live scenarioriggering the Workflow - Prepare the Dummy Workflow for Quick Testing (Optional)
Test for Sending Email for Task Creation
Sample Email Body
Triggering Workflow : Testing Demonstrations:
Process Triggered and Sent for Approval
Step 3: Handling Email Responses
Upon receiving the email, the approver will have three options: a) Approve b) Reject c) Not a valid response
Let’s say the approver starts with “ok” and responds with this in the email.
Upon receiving the response, our automation running as a background job will check if the response is coming from a valid approver and if the subject line is correct (the subject line should not be modified).
This validation step is crucial to ensure that only authorized responses are processed.
Validating Correct ApproverValidating Correct Approvers Response will be send if the Approver is not valid.
Response will be send if the Approver is not valid.
Validating Correct response: Validating Correct response
Step 4: Workflow Update on Approval
If the work item is approved, the workflow will move forward and update the task accordingly. This involves:
Workflow Update on Approval
Notifying Stakeholders
Workflow Update on Rejection
Similarly, if the response is “no” or “Rejected,” the work item will be updated, and the workflow will proceed with the rejected branch. This involves:
Updating the Workflow Rejection Status
Step 5: Sending Notification Emails
An email notification will be sent to all involved parties to inform them of the status of the workflow request. This step ensures transparency and keeps everyone informed about the progress of the approval process.
rejection via email
We hope you enjoyed reading our blog series by me and @Adwait_Fadnavis on Architecting Email Approval for SAP Build Process Automation Workflows. We trust that this approach provides valuable insights into managing workflow approvals efficiently without relying on manual My Inbox / Task Center approvals.
Thank you for following along with us.
Regards,
Mohit Bansal l, SAP BTP & S/4HANA Architect , Linkedin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 27 | |
| 24 | |
| 13 | |
| 12 | |
| 11 | |
| 11 | |
| 10 | |
| 10 | |
| 9 | |
| 9 |