Tuesday, October 30, 2018

Exposing Blue Prism Process as API - SOAP Architecture in BluePrism

Objective: Let's perform calculation (sum of two numbers) by calling API exposed from Blue Prism Sever.

We should bifurcate this work in smaller tasks so that implementation could be visible possible. Here are smaller tasks:


  • Create an object performing Summation of two numbers
    • Object must be accepting two numbers as two inputs in start
    • Object must return result as summation
  • Create a Process calling above created object 
    • Process must be accepting two numbers as two inputs in start
    • Process must return result as summation
    • Publish this process
  • Expose Process as an API
Bingo! looks this must fulfill the process.


Task 1:

This is an object accepting two numbers and stage "Calc1" is performing summation of those two numbers and returning this in END stage.



Task 2:

Let's create a process which accepts two numbers as input so that any one calls it can pass two numbers to calculate.

Addition Stage is calling object we created above by passing both numbers we would get from THE API call.

Note: Ignore Email stage as I wrote to check if summation has happened when ever API is called.



We must pass result as an output so that whoever is calling this API must get an expected result of summation. Don't forget to publish this process!


Task 3:

Go to System Manager and go to Exposure underneath Processes. You must expose process as I have exposed WSCal process which will perform summation as explained in Task 2.




Finally we need to check if exposed API works or not. You can check XML by clicking https://localhost:8181/ws this will list all Objects and Processes exposed from BP server. Make sure you have port entry in hosts file. 
Now target is to very our API.
I have installed  SoapUI application to test API exposed. I am skipping this whole process of installing and configuring API however let's jump on to result. I have passed two values 56, 34 as displayed in following image and gives result at right hand side as 90. 

Note: You must pass Blue Prism credentials to access API. 




Feel free to ask questions.

Monday, September 3, 2018

Executing CMD command using Blue Prism | Extracting Password protected ZIP using Blue Prism

There are multiple ways of extracting ZIP file using Blue Prism for example write scripting using VB, C#, J# or using 3rd party tools or running a batch file. Let's try one of the simple methods extracting file.

We are going to run a command in command prompt (CMD) and check the extracted file. Now again there are two ways comes in my mind:


  1. I can open command prompt and send key strokes to run a command.
  2. Execute command by Blue Prism only
In any case if any one sends a key stoke then it is like introducing complexity to you bot like window has to be active and command prompt must at front. To make complexity minimum let do it by second method.

I have taken three variables to store following information and all variables are TEXT type:


  1. ZIP File - "c:\Vaibhav\sample.zip"
  2. Destination Path - "-oc:\Vaibhav"
  3. Zip Command - ""c:\Program Files\7-Zip\7z.exe""


Add an Action Stage in Object Studio and Select "Utility - Environment" Business Object and select Action "Start Process". It requires to arguments to be passed as command which we need to execute and arguments which should be passed with command.



Points to be taken care in above placed information:


  1. Check out the Data Type specified above Zip Command. It contains all text in double quotes while are used two times. This is intentional as when this string must be typed in prompt it must be in quotes as path as spaces in it. 
  2. Make sure while consolidating arguments you must provide spaces between each argument.
  3. Supply Password as an argument (Ideally it must be used as Password datatype but this is for illustration)


Wednesday, August 29, 2018

Configure and call Third Party Web Service (Web API) in Blue Prism

Blue Prism has endless capabilities when it comes to automate business processes securely keeping scaling in the context all the time. If some caught with a scenario where a service or process needs to be call using Web API without accessing GUI which normally exists. For example medical companies has to validate any information they label on medicine and get approval from medicine department. Likewise insurance may have API exposed to, possibly, create policy or claim.


Let's explore how we can configure a Web Service within Blue Prism and call appropriate method to automate business process. I am taking an example of performing calculator basic functions using Web WSDL API. Following are the steps:



  1. Go to System Tab -> Web Services (Inside Objects in navigation) -> Click on "Add Service" link. It will open a popup to configure API
  2. Blue Prism asks to supply Web Service URL (Make sure API is WSDL only, Blue Prism doesn't support REST APIs) then click on next button to supply credentials

Friday, August 17, 2018

Surface Automation Example with Region Mode in Blue Prism

Surface Automation is used with Thin Clients. As a new term introduced, we should know about it.

Thin client are the one which are not directly installed on local machine and it's elements are not accessible to be spied. This happens when most of the business applications are installed on server and business unit access applications using client machine with CITRIX application. While Thick Client Applications are installed on local machine and their elements are accessible to be spied and automated. For example EXCEL, CALC or Blue Prism for that matter.


Coming back to Surface automation, as we understood elements of Think Clients are not accessible to be spied and automated in those case we use technique called Surface Automation. Where we identify elements by mapping application's surface with rectangle boxes or called each box as region.

Let's consider a Thick client application and automate it using Thin client concept for now as I am limited to use CITRIX application for this blog.


Step 1: Configure Application modeler and SPY elements

Here we are going to interact with application and not creating any business flow. Let's go to Application modeler and configure Calc application as we do normally. and launch application using application modeler. For spying elements of the application we should click on Identify button, application will open in WIN32 mode as displayed in screenshot.


 However we would consider this automation to be Surface the we need to switch spy mode which we can do by pressing ALT key. View would change to Accessibility Mode (AA) which would certainly don't need. (I should talk about different SPY modes, I must create separate page for the same shortly.) How ever AA mode looks like following:


Let's try one more time to press ALT key and following mode would be displayed as needed:

As we can see Calculator is highlighted RED as I have pressed CTRL and hover over the application. BP selected application as a region to be spied and it will fetch all propertied related to this region in the same way it does for JAVA for web application. Attributes of this region would certainly be different for this.


Step 2: Spy elements using region mode

As mentioned earlier, we need to create map of regions to identify our elements. Click on region and create rectangular boxes at the element you need to interact with. I have created a box at button "1". In the same way create boxes around elements.



Step 3: Create Object flow and RUN

I believe I must not explain much about here, screenshots might explain everything them self.

Following is a flow with more steps to press calc key in different stages. I have added hard coded wait for 2 seconds as it requires improvement. The other screenshot show how to click on elements which are spied earlier.


 


Following is an example of performing calculation in single stage followed by a screenshot of calling those actions.




This is quick blog to understand how it work however I have not yet covered even basics of surface automation. We can compare screenshots and spy fonts. Okay following is screenshot how it automatically find out fonts:


We can manually change setting to make this search more quicker.

Feel free to ask queries if any!


Thursday, July 19, 2018

Sending Email using Blue Prism

Here is a quick snippet of configurations for sending a test email using Yahoo configurations. Same configuration will work for GMAIL (Possibly, port for SMTP might change)


  1.  Import Email - POP3/SMTP VBO
  2. Drag an Action and Select Business Object as Email - POP3/SMTP (As displayed in following screenshot)
  3. Select Action Configure and fill values as displayed:
  4. Drag another action in flow and select Business Object as Email - POP3/SMTP (As displayed in following screenshot)
  5. Select Action Send Message and fill values as displayed

Friday, July 6, 2018

RPA Certification questions - Automation Anywhere

Few questions may be standard to ask in an interview or may not be. Those questions are thought and drafted with minimal explanation to face an interview. You might find few questions from AA certification as well. 


What is a Default mode of Credential Manager?

Ans. Default mode of credential manager is express mode. There are two modes Express and Manual. Both modes are for Credential Vault.



What is Credential Vault? 

Ans. Credential vault stores credentials which are encrypted using a master key.
Express mode: saves the master key and it automatically connects to the credential vault every time web CR restarts.
Manual mode: asks to enter keys every time CR restarts so that you gets connected to credential vault.
AA does NOT recommend express mode instead it says to use manual mode. It recommends you to copy the AA generated master key on Windows clipboard and save it in a secure location.
Credential vault is recommended to be used in production environment


Can we connect to We Control Room (CR) using same credentials from two separate machines on same time?

Ans. You can log on web CR using same credentials from two different machines or from two different browser on same machines but as soon  as second login takes some action first session logs off automatically.


When does session expires on Web CR?

Ans. A web CR allots a 20 minutes session window to a client and it keeps on getting refreshed for same period. It auto logs in and service runs in the background to do it. Session will expire in between if same credentials is used to login from different machine or browser.


Can I install Control Room on Windows 7?

Ans. Web CR does not operate on windows 10/7. I works on Windows server 2016 or Windows server 2012 r2. Any client has to be authenticated by Control Room.


How many recorders AA has?
Ans. There are 3 recorders in AA. Object recorder is recommended for Windows based applications. Web recorder is used for web based applications. And smart recorder can capture both windows and web applications


What are supperted browsers in AA?

Ans. Supported Browser versions
IE 10 AND 11
CHROME 49 and above
FIREFOX 45,46,47
chrome is not supported in meta bot designer.


Which SVN is used in AA for repository?

Ans. AA supports Apache subversion (SVN) . Neither visual nor tortoise.


How many users can connect to one AA Client License?
Ans. When we create client user on CR, it asks the role of the user so you can assign three role as Developer, Run-time or None.
Developer is to create bots.
Run-time is normally used by support/operations team to measure performance etc. It's read only mode.
None is nothing. When selected to any machine it would be unusable however could be in use by changing in dropdown.

Thursday, September 23, 2010

How to get text from FlexElement using RiaTest

Find below the solution to get text from any element from Flex window:

Suppose you have an element to get text from. First find it’s parent element and locate your targeted element by any element property (id, class, location ).
e.g.

var confirmationText = FlexCanvas("Home Page")->new Locator({id:"messages"})=>text;

to check value returned:
trace(confirmationText)


Cheers!