Commit 2dfb3ec1 authored by Suman Kalia's avatar Suman Kalia
Browse files

add files

parent 6373b1b4
# dba-blueprism
DBA integration sample and supporting files for integration with Blue Prism
## Prerequisites
- Windows server, preferably 2012R2 or 2016
- SQL Server database. Download and install SQL server express database: https://www.microsoft.com/en-us/sql-server/sql-server-editions-express
- Install SQL server management studio (optional). Although this is not mandatory, it is good tool to install to configure and manage databases using a UI. https://docs.microsoft.com/en-us/sql/ssms/download-sql-server-management-studio-ssms?view=sql-server-ver15
Installation and configuration of Blue Prism on Windows Server
--------------------------------------------------------------
- Download and install Blue Prism: https://www.blueprism.com/free-trial/
- During the installation of Blue Prism, specify `blueprism` as the database name and choose the `authenticate using SQL server database instead of Windows authentication` option. This is because the sample contains constructs that use SQL server-based authentication with the specified database name. By default, Blue Prism is installed in: `C:\Program Files\Blue Prism Limited\Blue Prism Automate`
- Create a desktop shortcut to start another instance of Blue Prism that listens on port 8182. Use the `wslocationprefix` option to specify the full name of the server and the port number. Services exposed from Blue Prism will have the server name and port you specified in the `wsdl:service segment`. By default, only the server name i.e. without the qualified domain is exposed in the `wsdl:service segment`.
```
"C:\Program Files\Blue Prism Limited\Blue Prism Automate\Automate.exe" /public /resourcepc /port 8182 /wslocationprefix "http://SKKBluePrism1.fyre.ibm.com:8182"
```
- Write a simple HelloWorld Process to verify the Blue Prism installation.
> TODO: Provide HelloWorld for verification
Install Blue-Prism and ibm-dba-sample business objects and processes utilities
------------------------------------------------------------------------------
- Extract the `blueprism-supplied` and `ibmdba-sample` folders to your local disk.
- Using File->Import, import all processes and business objects from these folders into Blue Prism.
- After import, your Blue Prism Studio will look as shown below:
![Blue Prism Studio](/images/BluePrismStudio.png)
- *Configure Credential store*
- Select the `System` tab, and then Security->Credentials and create following credentials:
- `IBM BAW Credential` ( user ID and password of the BAW cell admin)
- `BluePrismProcess` ( user ID and password of the Blue Prism login)
- `BluePrismDB` ( user ID and password of the Blue Prism database)
- >Note: On the Access Rights tab, select *`Security Roles: Any, Resources : All Resources, Prcesses: All processes`*
![Credential Store](/images/CredentialStore.png)
- *Template Process Callback: Execute Callback* : This has been customized for working with IBM BAW following the pattern suggested for returning output parameters from a bot.
- Update the initial value of **BAW URL** to point to the URL of your IBM BAW installation. *https://host:port*.
- The following example shows the current setting of https://deceit1.fyre.ibm.com:9443
- ![Update_local_variables_Execute_callback](/images/Update_local_variables_Execute_callback.png)
- *Dispatched Process Monitor: Get Process Results* :
- Update the initial values of the following variables for your Blue Prism installation. The example shows the current settings:
- **DB Server** to *localhost\SQLEXPRESS*
- **DB Name** to *BluePrism*
- **DB Credential Name** to *BluePrismDB*
- ![Update_local_variables_Dispatched_Process_Monitor_GetResults](/images/Update_local_variables_Dispatched_Process_Monitor_GetResults.png)
- Expose processes and objects as web services from the `System` tab:
- Select Objects->Exposure and expose the following objects as web services:
- Default: `Utility Process Dispatcher`
- Process Dispatch Framework: `Utility BluePrism Process Info` (optional)
- Select Processes->Exposure and expose following process as a web service:
- Claim Processes: `ClaimFulFillment` (optional)
![Exposing Process or object as Web Service](/images/Expose_Process-Object_as_WebService.png)
- Allocate resources to the dispatched processes pool from the `Control` tab.
-![BluePrism Sessions Resources](/images/BluePrism-Sessions-Resources.png)
- Verify services exposed from Blue Prism http://skkblueprism1.fyre.ibm.com:8182/ws/
-![Exposed Web services from BluePrism](/images/Exposed_Process_Business_Object_as_Services.png)
- Start the Blue Prism Server from the command window `"C:\Program Files\Blue Prism Limited\Blue Prism Automate\BPServer"`
>Note: This is needed for running Blue Prism processes according to a schedule.
![Blue Prism Server](/images/BluePrism-Server.png)
Invoking a bot from IBM BAW and process interactions in Blue Prism
================
![BAW: Invoking BOT in bluePrism](/images/BAW_Invoke_BOT_in_BluePrism.png)
Reference: Web services exposed from Blue Prism
===============================================
**Utility Process Dispatcher Service - Instantiate Bot in Blue Prism**
![ProcessDispatcherService](/images/UtilityProcessDispatcherService.png)
**ClaimFulFillment Service - ClaimFulFillment Bot specification**
![ClaimFulFillmentService](/images/ClaimFulFillmentService.png)
**Utility BluePrism ProcessInfo Service**
![Utility BluePrism ProcessInfo](/images/UtilityBluePrismProcessInfo.png)
![Utility BluePrism ProcessInfo_arguments](/images/UtilityBluePrismProcessInfo_arguments.png)
Reference: Example Instance documents
=====================================
Here is an instance of the SOAP request sent to Blue Prism and the reponse from the SOAP request
**Soap request for starting Bot**
```xml
<soapenv:Envelope xmlns:soapenv=“http://schemas.xmlsoap.org/soap/envelope/”
xmlns:urn=“urn:blueprism:webservice:utilityprocessdispatcher”>
<soapenv:Header/>
<soapenv:Body>
<urn:RunProcess>
<urn:bpInstance>auto</urn:bpInstance>
<urn:UseSSO>False</urn:UseSSO>
<urn:BPCredentialName>BluePrismProcess</urn:BPCredentialName>
<urn:ProcessName>ClaimFulFillment</urn:ProcessName>
<urn:ProcessParameters>
&lt;inputs&gt;&lt;input name=‘policyNumber’ type=‘Text’ value=‘9912345’/&gt;
&lt;input name=‘incidenttype’ type=‘Text’ value=‘Minor’/&gt;
&lt;input name=‘yearsNoClaims’ type=‘Number’ value=‘0’/&gt;&lt;/inputs&gt;
</urn:ProcessParameters>
<urn:CallbackInfo>
{“task_id”:“556"}
</urn:CallbackInfo>
</urn:RunProcess>
</soapenv:Body>
</soapenv:Envelope>
```
**Soap response for the request**
```xml
<soap:Envelope xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance”
xmlns:xs=“http://www.w3.org/2001/XMLSchema”
xmlns:soapenc=“http://schemas.xmlsoap.org/soap/encoding/”
xmlns:soap=“http://schemas.xmlsoap.org/soap/envelope/“>
<soap:Body>
<RunProcessResponse xmlns=“urn:blueprism:webservice:utilityprocessdispatcher”>
<Success>true</Success>
<SessionID>11f3fa2c-2673-4ab2-86af-6aa6fb02a976</SessionID>
<Output>
Started process:ClaimFulFillment
Resource:DispatchedProcessPool
Actual resource:SKKBLUEPRISM1
Session:11f3fa2c-2673-4ab2-86af-6aa6fb02a976
</Output>
</RunProcessResponse>
</soap:Body>
</soap:Envelope>
```
**BOT successful response to IBM BAW**
```json
{
"output":[
{
"name":"botOutput",
"data":{
"botStatus":"success",
"botData":"{\"claimStatus\": \"Approved\", \"awardAmount\" : 5000}"
}
}
]
}
```
**BOT error response to IBM BAW**
```json
{
"code":"CustomErrorCode",
"data":"{\"errorString\":\"String for custom error code\"}"
}
```
This diff is collapsed.
This diff is collapsed.
<process name="Utility - General" version="6.5.1.14401" bpversion="6.5.1.14401" narrative="General utility functions which don't fit into specific categories" byrefcollection="true" type="object" runmode="Background" preferredid="bf926e5b-5a53-4629-bf02-31a58a120117">
<appdef>
<element name="Application Root">
<id>1f3e584e-cb89-48ad-bd40-602968bdf4b9</id>
<type>Application</type>
<basetype>Application</basetype>
<datatype>unknown</datatype>
<diagnose>False</diagnose>
</element>
</appdef>
<view>
<camerax>0</camerax>
<cameray>0</cameray>
<zoom version="2">1.25</zoom>
</view>
<preconditions />
<endpoint narrative="" />
<subsheet subsheetid="177b593b-1118-4903-802c-d939d96ab07d" type="CleanUp" published="True">
<name>Clean Up</name>
<view>
<camerax>0</camerax>
<cameray>0</cameray>
<zoom version="2">1.25</zoom>
</view>
</subsheet>
<subsheet subsheetid="1cfff60e-8c0b-4cec-af1e-645eaa20d5cd" type="Normal" published="True">
<name>Sleep</name>
<view>
<camerax>0</camerax>
<cameray>0</cameray>
<zoom version="2">1.25</zoom>
</view>
</subsheet>
<subsheet subsheetid="d0540501-519a-45f1-b6f3-3af4af12e619" type="Normal" published="True">
<name>Process Exists</name>
<view>
<camerax>0</camerax>
<cameray>0</cameray>
<zoom version="2">1.25</zoom>
</view>
</subsheet>
<subsheet subsheetid="d500b9f6-798c-40d6-a9b8-e0eb9b16d9cd" type="Normal" published="True">
<name>Window Exists</name>
<view>
<camerax>66</camerax>
<cameray>0</cameray>
<zoom version="2">1.25</zoom>
</view>
</subsheet>
<stage stageid="644da7bd-f4b1-44af-af67-fcf711356e70" name="Start" type="Start">
<loginhibit />
<narrative>
</narrative>
<displayx>15</displayx>
<displayy>-105</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Tahoma" size="10" style="Regular" color="000000" />
<onsuccess>9c3f9d10-70e5-4ac1-b987-48f7bd33f56d</onsuccess>
</stage>
<stage stageid="9c3f9d10-70e5-4ac1-b987-48f7bd33f56d" name="End" type="End">
<loginhibit />
<narrative>
</narrative>
<displayx>15</displayx>
<displayy>90</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Tahoma" size="10" style="Regular" color="000000" />
</stage>
<stage stageid="3395d1a0-fcba-4944-9f09-7c218000fc1f" name="Stage1" type="ProcessInfo">
<narrative>
</narrative>
<displayx>-195</displayx>
<displayy>-105</displayy>
<displaywidth>150</displaywidth>
<displayheight>90</displayheight>
<font family="Tahoma" size="10" style="Regular" color="000000" />
<references>
<reference>System.Data.dll</reference>
<reference>System.Xml.dll</reference>
<reference>System.Drawing.dll</reference>
</references>
<imports>
<import>System</import>
<import>System.Drawing</import>
</imports>
<language>visualbasic</language>
<globalcode><![CDATA[]]></globalcode>
<code><![CDATA[]]></code>
</stage>
<stage stageid="baccb181-ead3-4cec-abfa-94bb52412e67" name="Clean Up" type="SubSheetInfo">
<subsheetid>177b593b-1118-4903-802c-d939d96ab07d</subsheetid>
<narrative>
</narrative>
<displayx>-195</displayx>
<displayy>-105</displayy>
<displaywidth>150</displaywidth>
<displayheight>90</displayheight>
<font family="Tahoma" size="10" style="Regular" color="000000" />
</stage>
<stage stageid="7ab68dda-e80a-4e91-b3ca-b9bbeecb0ca0" name="Start" type="Start">
<subsheetid>177b593b-1118-4903-802c-d939d96ab07d</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>15</displayx>
<displayy>-105</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Tahoma" size="10" style="Regular" color="000000" />
<onsuccess>3475f7ae-9063-4cbe-85b1-f8f5b0dc90dd</onsuccess>
</stage>
<stage stageid="3475f7ae-9063-4cbe-85b1-f8f5b0dc90dd" name="End" type="End">
<subsheetid>177b593b-1118-4903-802c-d939d96ab07d</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>15</displayx>
<displayy>90</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Tahoma" size="10" style="Regular" color="000000" />
</stage>
<stage stageid="27709e12-6519-4529-8d76-45eb27236042" name="Process Exists" type="SubSheetInfo">
<subsheetid>d0540501-519a-45f1-b6f3-3af4af12e619</subsheetid>
<narrative>Checks to see if a process with the given name exists.</narrative>
<displayx>-195</displayx>
<displayy>-105</displayy>
<displaywidth>150</displaywidth>
<displayheight>90</displayheight>
<font family="Tahoma" size="10" style="Regular" color="000000" />
</stage>
<stage stageid="541b75f3-1868-4536-9ed1-f0340805cf52" name="End" type="End">
<subsheetid>d0540501-519a-45f1-b6f3-3af4af12e619</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>15</displayx>
<displayy>90</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Tahoma" size="10" style="Regular" color="000000" />
<outputs>
<output type="flag" name="Exists" narrative="True if the process exists" stage="Exists" />
</outputs>
</stage>
<stage stageid="9e9ff0c4-2102-4dde-851b-568ecca9dd5c" name="Start" type="Start">
<subsheetid>d0540501-519a-45f1-b6f3-3af4af12e619</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>15</displayx>
<displayy>-105</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Tahoma" size="10" style="Regular" color="000000" />
<inputs>
<input type="text" name="Process Name" narrative="The name of the process" stage="Process Name" />
</inputs>
<onsuccess>a65e5d31-3b82-44bd-85e8-42d30bf96cec</onsuccess>
</stage>
<stage stageid="2987b0b2-bcfe-44df-8d60-3cf441c023bf" name="Process Name" type="Data">
<subsheetid>d0540501-519a-45f1-b6f3-3af4af12e619</subsheetid>
<narrative>
</narrative>
<displayx>-195</displayx>
<displayy>-15</displayy>
<displaywidth>150</displaywidth>
<displayheight>30</displayheight>
<font family="Tahoma" size="10" style="Regular" color="000000" />
<datatype>text</datatype>
<initialvalue />
<private />
<alwaysinit />
</stage>
<stage stageid="a65e5d31-3b82-44bd-85e8-42d30bf96cec" name="Process Exists" type="Code">
<subsheetid>d0540501-519a-45f1-b6f3-3af4af12e619</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>15</displayx>
<displayy>-15</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Tahoma" size="10" style="Regular" color="000000" />
<inputs>
<input type="text" name="Process Name" expr="[Process Name]" />
</inputs>
<outputs>
<output type="flag" name="Exists" stage="Exists" />
</outputs>
<onsuccess>541b75f3-1868-4536-9ed1-f0340805cf52</onsuccess>
<code><![CDATA[
try
for each p as system.diagnostics.process in system.diagnostics.process.getprocessesbyname(Process_Name)
exists = true
exit sub
next
catch e as exception
end try
exists = false]]></code>
</stage>
<stage stageid="d97aef89-802a-4cf4-b301-aaa31126177f" name="Exists" type="Data">
<subsheetid>d0540501-519a-45f1-b6f3-3af4af12e619</subsheetid>
<narrative>
</narrative>
<displayx>-195</displayx>
<displayy>15</displayy>
<displaywidth>150</displaywidth>
<displayheight>30</displayheight>
<font family="Tahoma" size="10" style="Regular" color="000000" />
<datatype>flag</datatype>
<initialvalue>False</initialvalue>
<private />
<alwaysinit />
</stage>
<stage stageid="4adb19bc-3b13-48e7-9f69-079649e29bdc" name="Window Exists" type="SubSheetInfo">
<subsheetid>d500b9f6-798c-40d6-a9b8-e0eb9b16d9cd</subsheetid>
<narrative>Checks to see if a window with the given title exists.</narrative>
<displayx>-195</displayx>
<displayy>-105</displayy>
<displaywidth>150</displaywidth>
<displayheight>90</displayheight>
<font family="Tahoma" size="10" style="Regular" color="000000" />
</stage>
<stage stageid="071bf0aa-e2d9-416a-813b-a48a15296bf7" name="Start" type="Start">
<subsheetid>d500b9f6-798c-40d6-a9b8-e0eb9b16d9cd</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>15</displayx>
<displayy>-105</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Tahoma" size="10" style="Regular" color="000000" />
<inputs>
<input type="text" name="Window Title" narrative="The title of the window to check" stage="Title" />
<input type="flag" name="Use Wildcard Match" narrative="Set true to allow wildcards in the window title match" stage="Wildcard" />
</inputs>
<onsuccess>f04edf78-80f6-4e20-90ad-cea14b6a29ff</onsuccess>
</stage>
<stage stageid="94672b8d-1060-4a0a-91f9-0c96cd778618" name="End" type="End">
<subsheetid>d500b9f6-798c-40d6-a9b8-e0eb9b16d9cd</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>15</displayx>
<displayy>90</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Tahoma" size="10" style="Regular" color="000000" />
<outputs>
<output type="flag" name="Exists" narrative="True if the window exists" stage="Exists" />
</outputs>
</stage>
<stage stageid="a7f48e3c-d61a-43dc-8546-646ae6b6c63b" name="End" type="End">
<subsheetid>d500b9f6-798c-40d6-a9b8-e0eb9b16d9cd</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>15</displayx>
<displayy>90</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Tahoma" size="10" style="Regular" color="000000" />
<outputs>
<output type="flag" name="Exists" narrative="True if the window exists" stage="Exists" />
</outputs>
</stage>
<stage stageid="f04edf78-80f6-4e20-90ad-cea14b6a29ff" name="Window Exists" type="Code">
<subsheetid>d500b9f6-798c-40d6-a9b8-e0eb9b16d9cd</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>15</displayx>
<displayy>-15</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Tahoma" size="10" style="Regular" color="000000" />
<inputs>
<input type="text" name="Title" expr="[Title]" />
<input type="flag" name="Wildcard" expr="[Wildcard]" />
</inputs>
<outputs>
<output type="flag" name="Exists" stage="Exists" />
</outputs>
<onsuccess>a7f48e3c-d61a-43dc-8546-646ae6b6c63b</onsuccess>
<code><![CDATA[try
if wildcard then
title = title.replace("*", ".*")
title = title.replace("?", "\w")
end if
exists = false
for each p as system.diagnostics.process in system.diagnostics.process.getprocesses()
if wildcard then
if system.text.regularexpressions.regex.ismatch(p.mainwindowtitle, title) then
exists = true
exit sub
end if
else
if p.mainwindowtitle.tolower = title.tolower then
exists = true
exit sub
end if
end if
next
catch e as exception
end try
]]></code>
</stage>
<stage stageid="911b7620-4b36-4299-a8fe-8be896ab0176" name="Exists" type="Data">
<subsheetid>d500b9f6-798c-40d6-a9b8-e0eb9b16d9cd</subsheetid>
<narrative>
</narrative>
<displayx>-195</displayx>
<displayy>90</displayy>
<displaywidth>150</displaywidth>
<displayheight>30</displayheight>
<font family="Tahoma" size="10" style="Regular" color="000000" />
<datatype>flag</datatype>
<initialvalue>False</initialvalue>
<private />
<alwaysinit />
</stage>
<stage stageid="588fd5df-2393-49f6-8dec-e6205287dedf" name="Title" type="Data">
<subsheetid>d500b9f6-798c-40d6-a9b8-e0eb9b16d9cd</subsheetid>
<narrative>
</narrative>
<displayx>-195</displayx>
<displayy>-15</displayy>
<displaywidth>150</displaywidth>
<displayheight>30</displayheight>
<font family="Tahoma" size="10" style="Regular" color="000000" />
<datatype>text</datatype>
<initialvalue />
<private />
<alwaysinit />
</stage>
<stage stageid="9df24660-8a75-41df-bf4c-69e3e18a14fa" name="Wildcard" type="Data">
<subsheetid>d500b9f6-798c-40d6-a9b8-e0eb9b16d9cd</subsheetid>
<narrative>
</narrative>
<displayx>-195</displayx>
<displayy>15</displayy>
<displaywidth>150</displaywidth>
<displayheight>30</displayheight>
<font family="Tahoma" size="10" style="Regular" color="000000" />
<datatype>flag</datatype>
<initialvalue>False</initialvalue>
<private />
<alwaysinit />
</stage>
<stage stageid="cd594031-696a-419e-a6c2-36688addfb0f" name="Titles CSV" type="Data">
<subsheetid>d500b9f6-798c-40d6-a9b8-e0eb9b16d9cd</subsheetid>
<narrative>
</narrative>
<displayx>-195</displayx>
<displayy>135</displayy>
<displaywidth>150</displaywidth>
<displayheight>30</displayheight>
<font family="Tahoma" size="10" style="Regular" color="000000" />
<datatype>text</datatype>
<initialvalue />
<private />
<alwaysinit />
</stage>
<stage stageid="3d281508-283c-4d63-81dd-ec07cb0c7697" name="Test" type="Calculation">
<subsheetid>d0540501-519a-45f1-b6f3-3af4af12e619</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>135</displayx>
<displayy>-105</displayy>
<displaywidth>60</displaywidth>
<displayheight>30</displayheight>
<font family="Tahoma" size="10" style="Regular" color="000000" />
<onsuccess>a65e5d31-3b82-44bd-85e8-42d30bf96cec</onsuccess>
<calculation expression="&quot;iexplore&quot;" stage="Process Name" />
</stage>
<stage stageid="149317ed-25d5-4998-b8d2-9e8793a9cebe" name="Test" type="MultipleCalculation">
<subsheetid>d500b9f6-798c-40d6-a9b8-e0eb9b16d9cd</subsheetid>
<loginhibit />
<narrative>
</narrative>
<displayx>165</displayx>
<displayy>-105</displayy>