cancel
Showing results for 
Search instead for 
Did you mean: 

Exposed Object as Web Service

PrabirSooraj
Level 2
Hi,

I have exposed an object as a web service but would like to know to specify which action will run and how to pass data to the object. I have created a single published page on the object with input data expected but when making a request with data the parameter is not recognized.

My second question is that I have noticed discussions around manual vs auto-initialization, I am curious as to how this is set?

Thanks in advance.
1 BEST ANSWER

Helpful Answers

ewilson
Staff
Staff
@PrabirSooraj what client are you using the invoke the web service (ex SoapUI, Postman, Chrome extension, ....)? Typically you would ingest the WSDL of the exposed VBO and that would either generate a skeleton client for you, if you're using say Visual Studio to create a C# application, or you would be given an input form that maps to the various inputs of the VBO.

For the most part, auto initialization is recommended unless you have a specific requirement/desire to manage the session IDs yourself. When you ingest the VBOs WSDL you'll see an input parameter called bpInstance. If you want auto initialization, you set the value of that parameter to "auto", and invoke what ever action on the VBO directly. If you want to use manual initialization, you have to call the exposed Initialise action before you call any other action on the VBO. That will return a session ID. Then when you call any of the other actions you pass that session ID in as the value of bpInstance.

NOTE:
If you're going to use manual initialization you must also call the CleanUp action when you're done and pass in that session ID. Otherwise you're basically creating a memory leak.

Cheers,

------------------------------
Eric Wilson
Director, Partner Integrations for Digital Exchange
Blue Prism
------------------------------

View answer in original post

7 REPLIES 7

Denis__Dennehy
Level 15
Could you elaborate on what you mean by "how to pass data to the object" - because on face value you are asking about input parameters which is covered in the Foundation Training (step 1 of using Blue Prism) - so I think I've missunderstood the question.

When exposing a Blue Prism process or object as a webservice the best practice design would be for the service to be asyncronous.  By that I mean you call a Blue Prism webservice only to pass a work request into a Blue Prism work queue,  not to do all the end to end work.   The reason for this is scalability - having direct calls starting end to end robots does not cater for potential peaks of work that may be greater than the robots you have availalbe.   An asyncoronous webservcie solution simple takes the request,  adds it to a work queue and then returns a webservice response flagging that the request has been accepted.   It is then the job of the controller team manage the work, ensuring enough robots are scheduled to fullfill all the requests being received.


------------------------------
Denis Dennehy
Head of Customer Success, EMEA
Blue Prism Ltd
Europe/London
------------------------------

Thanks for your reply. The usage very much aligns with what you mentioned on your second paragraph.

With regard to the pass data to the object, I think a better question would be how do you expose a specific action on the object? Since when the object is exposed I am not sure which page it runs on the object, my assumption is that it runs the initialize page which does not accept input data on the Start stage.

ewilson
Staff
Staff
@PrabirSooraj what client are you using the invoke the web service (ex SoapUI, Postman, Chrome extension, ....)? Typically you would ingest the WSDL of the exposed VBO and that would either generate a skeleton client for you, if you're using say Visual Studio to create a C# application, or you would be given an input form that maps to the various inputs of the VBO.

For the most part, auto initialization is recommended unless you have a specific requirement/desire to manage the session IDs yourself. When you ingest the VBOs WSDL you'll see an input parameter called bpInstance. If you want auto initialization, you set the value of that parameter to "auto", and invoke what ever action on the VBO directly. If you want to use manual initialization, you have to call the exposed Initialise action before you call any other action on the VBO. That will return a session ID. Then when you call any of the other actions you pass that session ID in as the value of bpInstance.

NOTE:
If you're going to use manual initialization you must also call the CleanUp action when you're done and pass in that session ID. Otherwise you're basically creating a memory leak.

Cheers,

------------------------------
Eric Wilson
Director, Partner Integrations for Digital Exchange
Blue Prism
------------------------------

It's been a while, but I thought each action an exposed object was effectively a seperate funciton in the webservice.  So if you look at the WSDL of the webservice you will see all your object actions there and they can all be called seperatly.
It has been a few years since I needed to do this so my memory could be wrong - but I'm sure I did a health sector solution with 3 different web service calls where I exposed one object?

------------------------------
Denis Dennehy
Head of Customer Success, EMEA
Blue Prism Ltd
Europe/London
------------------------------

With a VBO, only actions that have the "Publish this page as an Action" box checked will be published as public actions on the web service.

Cheers,

------------------------------
Eric Wilson
Director, Partner Integrations for Digital Exchange
Blue Prism
------------------------------

Thank you Denis and Eric, your answers cleared this up for me. I have not worked with SOAP for a while and did not think to ingest the WSDL. The new issue I am having is that the Runtime Resource remains in the running state when using auto initialization. How can I get it back into a idle state, since the job does not show up on the Session Management tab?

Yeah, objects typically won't show up in Control Room, but processes will. So you could create a process to wrap the interaction with the VBO if you need to see it via Control Room.

As for the RR, it will eventually return to Idle state after there have been no further calls to the VBO in question. It can take some time though. If you want more granular control then you'll either need to wrap the VBO in a process or go with manual initialization of the VBO. That way you can call the Cleanup action.

Cheers,

------------------------------
Eric Wilson
Director, Partner Integrations for Digital Exchange
Blue Prism
------------------------------