Message Box and Request Credentials Using Blue Prism (Attended Automation)

Attended Automation using Blue Prism:

We all are aware that Blue prism is designed to run only for unattended automation. However, for some reason having attended automation using blue prism is required in some cases.

Using the inbuilt features, you can have provide startup parameters during the start of a process only.
However, if you want the bot to wait for you to do something/some config changes/place some file etc, before moving forward with process flow, there is no such way where in bot can inform and wait for you . In other words, BP process can’t play the hand shake games where in it can pass control to you and then you pass the control back to process.

People familiar with UIPath may be familiar with the usefulness of  Message box  and Request Credential  features, which are not available in Blue Prism directly.

To emulate such behavior , you can use the below code to create a message box type of Action which can wait for user to click before proceeding.
It can also be used/enhanced to ask for user input/credentials before proceeding with normal process flow.

Example: Basic Message Box with “OK” Button:


  •  Create a new object and open (double click) the “information” stage on “initialise” page.

  • Once open, go to “Code Options” Tab , Change language to “C#” , Add an external reference to “System.Windows.Forms.dll” and import a namespace “System.Windows.Forms”
  • Click on Global Code tab and insert the below code snippet:

private void popUP(string message, string caption)

System.Windows.Forms.MessageBoxButtons buttons = System.Windows.Forms.MessageBoxButtons.OK;
System.Windows.Forms.DialogResult result;
result = MessageBox.Show(message, caption, buttons);


  • Click on OK.

Now you have got the function ready to be used in any code stage through out the object which will take 2 input parameters (Strings) which will be used to display the message and caption.

How to use it?

  • Create an action and name it OK-PopUP
  • Drag a code stage on the designer and open the code stage.
  • Configure the code stage as shown in the images below


Once Done, when you run the object action, you will get a popup as shown in the below screenshot:



If you use this action in any process, the process will PAUSE until a user clicks on OK button.

Download Link:

See the VIDEO for running demo



Read the next part of this series about how to create an input dialog for attended automation in my next post.

Please follow and like us: