Skip to main content

Automation status for Pega Platform

Cases that invoke automations receive several feedback types that let the end users know whether the automation completes tasks and the outcome of the task. Learning what to do with that feedback allows you to understand what occurred in your case flow and provides a way for a user to work through issues. There are two types of automation feedback returned to Pega Platform™: completion statuses and environmental errors.

Completion statuses

Completion status is part of a response that an automation returns. The status includes a return code and a message that reflects the automation's success or failure. Without this status, the end user does not know what occurred and where within a completed automation. It is a best practice to enter a custom error code and message with each status to provide more information to end users.

blank robot activity set completion status design block

The error codes and messages that accompany completion statuses do not affect the workflow processing. The messages only provide information back to the case users when you add an Assign to robot queue step to the case. The Pega Platform application accepts one of the following return statuses from the automation:

  • Completed
  • Completed with Errors
  • Did not complete

Completion Status

Description

Completed

The automation runs to completion without encountering any errors.

For unattended automations, if data passes business validation, the completion status is set to Complete, and the processing flow continues.

CompletedWithErrors

The automation runs to completion but detects a business error or a validation error that prevents the automation tasks from processing successfully. Communication of these errors is displayed on a Windows dialog box or an overlay to the end user before the automation completes.

For example, if an automation cannot look up a specific customer's account due to an incorrect account ID, the CompletedWithError status is displayed.

For unattended automations, if the automation completes processing but data fails business validation, the completion status is CompletedWithErrors. The assignment routes to pyRepairAutomation as a conflicting assignment.

DidNotComplete

As the default completion status, if this error is displayed, the automation caught an exception, and processing could not finish. Further customizing of these messages allows users to know how to proceed with case processing.

For unattended automations, if the automation does not complete, the completion status sets to DidNotComplete. The assignment routes to pyRepairAutomation as a failure.

Note: pyRepairAutomation is a subflow that Pega developers can use to customize the case workflow based on their needs depending on the returned status. Depending on the status, the assignments reflect as either Failures or Conflicts and return to the work queue, where a robot polls the queue for the task so that processing can try again.

SetCompletionStatus method

Automations in Pega Robot Studio require the Robot Activity component to link to your Pega Platform case. This component uses the SetCompletionStatus method to return the completion status, a customized return code, and a customized message about automation. When integrating with Pega Platform, it is a best practice to pass both the error code and message fields and prompt the user for action. It is up to the client to introduce and use these to extend the behavior. The automation developer can customize the code and messages to make them more user-friendly and provide better error handling information to the case user. The system architect uses the returned data to adjust or customize the pyRepairAutomation extension flow.

Set Completion Status design block with Completed and Completed with errors examples

Check your knowledge with the following interaction.

Errors in attended automations

When invoking an attended automation in a case, Pega Platform communicates with Pega Robot Runtime™. If this communication fails for any reason, the error passes back to Pega Platform as an environmental error. Other errors may also occur due to incorrect configuration or user input during operation. These error conditions can affect your case processing flow, and when they occur, your Pega Platform application automatically handles them. The errors that are exclusive to attended automations include the following:

  • The Pega Robotics Runtime is unavailable. 
  • The Pega Robotics Runtime is available, but no package is loaded.
  • The Pega Robotics Runtime is available, but the specified automation cannot be found.  
  • The automation was invoked but timed out (the time-out is currently set to 60 seconds). 
  • The automation was invoked but was canceled.

If the Pega Platform detects any of these errors, a page message describing the issue automatically displays two options for the user:

  • Quit (cancel)
  • Ignore the message and continue the workflow
Environmental error

If the automation is invoked during postprocessing and an error occurs, the Submit button label changes to Ignore and continue. The user decides whether to quit or continue their case workflow. If the automation invokes during preprocessing, the button label does not change.

Pega developers can add more error handling logic in attended automations by specializing the pyProcessAutomationFailure extension point activity. For example, you want to send an email to your case administrator or technical support team whenever an automation request fails.

Check your knowledge with the following interaction:


This Topic is available in the following Modules:

If you are having problems with your training, please review the Pega Academy Support FAQs.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega Academy has detected you are using a browser which may prevent you from experiencing the site as intended. To improve your experience, please update your browser.

Close Deprecation Notice