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.
Blog 1 – This blog will focus on the Business process, context, problem statement, end to end development flow, and required prerequisites.Blog 2 This blog will focus on development and will provide a detailed walkthrough of the development process.Blog 3(This blog) : This blog will focus on complete end-to-end testing, helping to understand the overall objective.
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:
Automation Scheduling: The automation is scheduled to run every 15 minutes. The desktop agent is set up on a virtual machine to ensure it runs in unattended mode.Dummy Workflow Setup: A dummy workflow is created with fields such as “Request ID,” “Requester Name,” and “Approval Status.” Upon submission, an email is sent to the approver.Email Response Handling: The approver receives the email and responds with “Approve.” The automation script checks the email subject line and sender’s email address to validate the response.Invalid Response / Invalid Approver Handling: If the response is not valid or from an unauthorized approver, the system logs the incident and notifies the relevant parties for further investigation.Approver Handling: If the response is valid or from an authorized approver, Workflow task will be approved.Rejection Scenario: If the approver responds with “Reject,” the workflow status is updated to “Rejected,” and an email notification is sent to the requester and other stakeholders.Workflow Update: The workflow status is updated to “Approved,” and an email notification is sent to the requester and other stakeholders.Sending Notification Emails: Email Notification to all stake holders involved.
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.
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:
Workflow Trigger: Upon clicking the submit button, the workflow is triggered.Email Notification: An email is sent to the approver for approval. This step involves configuring an SMTP outbound email, as mentioned in the previous blog post.
This setup allows us to test the end-to-end process in a controlled environment before deploying it in a live scenario
Triggering Workflow : Testing Demonstrations:
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 Approver Response will be send if the Approver is not valid.
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:
Updating the Workflow Status: The status of the workflow is updated to “Approved” in the system
Notifying Stakeholders: All relevant stakeholders are notified about the approval via email.
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 Status: The status of the workflow is updated to “Rejected” in the system.
Notifying Stakeholders: All relevant stakeholders are notified about the rejection via email.
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.
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, SAP BTP & S/4HANA Architect
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.Blog 1 – This blog will focus on the Business process, context, problem statement, end to end development flow, and required prerequisites.Blog 2 This blog will focus on development and will provide a detailed walkthrough of the development process.Blog 3(This blog) : This blog will focus on complete end-to-end testing, helping to understand the overall objective.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 ProcessTo illustrate the testing process in more detail, let’s walk through an example:Automation Scheduling: The automation is scheduled to run every 15 minutes. The desktop agent is set up on a virtual machine to ensure it runs in unattended mode.Dummy Workflow Setup: A dummy workflow is created with fields such as “Request ID,” “Requester Name,” and “Approval Status.” Upon submission, an email is sent to the approver.Email Response Handling: The approver receives the email and responds with “Approve.” The automation script checks the email subject line and sender’s email address to validate the response.Invalid Response / Invalid Approver Handling: If the response is not valid or from an unauthorized approver, the system logs the incident and notifies the relevant parties for further investigation.Approver Handling: If the response is valid or from an authorized approver, Workflow task will be approved.Rejection Scenario: If the approver responds with “Reject,” the workflow status is updated to “Rejected,” and an email notification is sent to the requester and other stakeholders.Workflow Update: The workflow status is updated to “Approved,” and an email notification is sent to the requester and other stakeholders.Sending Notification Emails: Email Notification to all stake holders involved.Let’s Deep dive above steps in Detail:Step 1: Automation Scheduled as Background JobIn 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 AutomationStep 2: (Optional) Triggering the Workflow – Prepare the Dummy Workflow for Quick TestingTo 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:Workflow Trigger: Upon clicking the submit button, the workflow is triggered.Email Notification: An email is sent to the approver for approval. This step involves configuring an SMTP outbound email, as mentioned in the previous blog post.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 CreationSample Email BodyTriggering Workflow : Testing Demonstrations:Process Triggered and Sent for Approval Step 3: Handling Email ResponsesUpon receiving the email, the approver will have three options: a) Approve b) Reject c) Not a valid responseLet’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 responseStep 4: Workflow Update on ApprovalIf the work item is approved, the workflow will move forward and update the task accordingly. This involves:Updating the Workflow Status: The status of the workflow is updated to “Approved” in the systemWorkflow Update on ApprovalNotifying Stakeholders: All relevant stakeholders are notified about the approval via email.Notifying StakeholdersWorkflow Update on RejectionSimilarly, 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 Status: The status of the workflow is updated to “Rejected” in the system.Updating the Workflow Rejection StatusNotifying Stakeholders: All relevant stakeholders are notified about the rejection via email.Step 5: Sending Notification EmailsAn 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 emailWe 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, SAP BTP & S/4HANA Architect Read More Technology Blogs by Members articles
#SAP
#SAPTechnologyblog