Blue Prism Developer study materials
Blue Prism Developer study resources

Invoice Processing with Multiple Application Windows

Blue Prism Developer · Put your knowledge to work in context.

All case studies

Invoice Processing with Multiple Application Windows

A Blue Prism process automates invoice entry into an ERP system (SAP) and a legacy AS/400 system. The process uses Object Studio to interact with both. The SAP GUI is accessed via a terminal emulator, and the AS/400 via a green-screen emulator. The process runs on a single runtime resource. Recently, the process intermittently fails with 'Element not found' errors when trying to read the invoice number from SAP after saving. Logs show that sometimes the SAP screen takes up to 10 seconds to refresh, but the wait stage is set to 5 seconds. Additionally, the AS/400 session sometimes gets disconnected due to inactivity, causing the process to hang. The business requires 99% success rate and processing of 200 invoices per hour.

1. What are the likely causes of the intermittent 'Element not found' errors, and how would you make the process more robust?

Read the worked answer

The errors are likely due to insufficient wait time for SAP screen refresh. The fixed 5-second wait is inadequate when refresh takes up to 10 seconds. To make it robust, replace fixed waits with dynamic waits: use 'Wait for Screen' or 'Check Exists' with a timeout of 15 seconds, and loop until the element is found or timeout. Additionally, implement a retry mechanism: if the element is not found after 15 seconds, retry the entire save operation up to 3 times with a short delay. Also, ensure that the SAP session is stable by adding a check for session status before each interaction. Use Blue Prism's 'Wait for' stage with a condition on the element's existence, and set the timeout to 15 seconds. This accommodates variability.

2. How would you address the AS/400 session disconnection issue and ensure the process can recover without manual intervention?

Read the worked answer

The AS/400 session disconnects due to inactivity. To prevent this, send a keep-alive signal every 2 minutes when the session is idle. In Blue Prism, implement a background loop that checks the session status and sends a dummy command (e.g., pressing Enter) if idle. If disconnection occurs, the process should detect it by checking for a specific error screen or timeout when interacting. Upon detection, automatically log in again using stored credentials and resume from the last step. Use the 'Recover' and 'Resume' capabilities: catch the exception, reset the application, and retry the current transaction. Ensure that the login credentials are securely stored in Blue Prism's credential manager. This reduces manual intervention and maintains throughput.