README.md 7.92 KB
Newer Older
Suman Kalia's avatar
Suman Kalia committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# 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/

Suman Kalia's avatar
Suman Kalia committed
18
- 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`
Suman Kalia's avatar
Suman Kalia committed
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214

- 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\"}"
}
```