Trigger process with Web Service or API

Hi all,

I have two Windows Server VMs and I need to make next logic. On one server machine I have IVR response from the customer and two output values, actually two strings which TTS engine convert from speech to text. Those two parameters I need to forward on the second server machine where I have UiPath studio. I need to find best solution how to transfer those two parameters to second VM from the first one and also how to trigger UiPath process when that two parameters comes to the second VM. I can use whatever I want, API, Web Service or any kind of application.

I don’t know is this possible to do ?
Thanks a lot in advance for help.

Kind Regards,
Marko Kostic

Hi @Markokostic1993,

Simple solution is

  1. Pass those two files via mail to the another server with specific subject
  2. Then check the inbox whether the mail with that subject is available or not
  3. If exists, then trigger the process

If you want to use those two files through services, then you can use a common sharepoint in any of the server and then you can download them using REST API.

Instead of that, the first process will be better to understand

Hi @HareeshMR,

I forgot to put more details about scenario. I can’t use any type of UiPath default triggers, nether Mail trigger because it’s live call and customer need to have answer on his question in 4-5 seconds. For example I want to change my bank account ID, I’ll call contact center and the IVR bot will take a call. I’ll answer to IVR bot and tell my unique number and my address / city. IVR bot from one server will forward those two values to UiPath server machine and I need to get those two values (monitoring when those two values come on the second server) and make let’s say 10 automated steps in some Desktop app where bot will change those two input variables. After that RPA bot need to return “successful” response to IVR bot on the first server, so the IVR bot can confirm to customer that requested process is done and that his bank account has changed.

Thanks a lot for your help.

Kind Regards.
Marko Kostic

Hi @Markokostic1993

It is possible to start a job in Orchestrator via the API. You can even include input parameters.

This means that you could have your process done like so:

  1. Your bot sends an API request to Orchestrator to start the process. The payload includes the input arguments
    This is the call:
  2. Orchestrator triggers the process.
  3. The process itself does the API call back to the robot when it is done. There is an HTTP Request activity under UiPath.Web.Activities package that can easily do it.

Would that work for you?

1 Like

I think you have between the 2 VMs a shared folder.
You can try passing the info from first robot to the second through a shared document.
The second robot has to wait for the document to appear on the shared path, and do the tasks after. In the end the second robot will put on shared path a document with the response.

Otherwise you should use the Orchestrator, which is safer and best approach.

Hi @loginerror,

This is exactly what I need. I’ll try to implement this API in next 2 - 3 days and also I’ll left the ticket open here, if I have some questions.

Thanks a lot for your help.

Kind Regards,
Marko Kostic

Hi ,
I am able to start the job by passing the input parameters, Can you please let me know how to capture the output arguments of bots result
what api to use to get these output argumnets?

Hi @Bhargavi92,

Did you call first 3 APIs before Start Job API ?

I’m asking this because I have issue which I can’t resolve.
I’m calling from SOAP UI application first API “POST Authentication” and it’s working, I get result ID number which I pass to second API “GET Releases”. This second API is working too and I call third API “GET Robots” which also working without any problem. But after that when I try to call fourth API “POST Jobs” it’s not working.

The body of that API is:

image

And Header is the same as it’s for previous three APIs, Authorization: Bearer xxxxxxxx

The process didn’t start when I run this API and the response is in XML format:

Endpoint URI is also correct.

Can you or someone else help me with this issue ?

Thanks a lot in advance.

Kind Regards,
Marko Kostic

Hi @Markokostic1993,
Can you try adding Content-Type":“application/json” as well to the header.

and in the body, change the input arguments to
“InputArguments”:"{“sInInput1”:“ola”,“sInput2”:“yeah”}"
Please give a try and let me know if that works.

Hi @Markokostic1993,
Yes I used all first three API before I use Post -Startjobs .

Hi @Bhargavi92,

Is it okay to put Content-Type in Media Type field or it’s better to put in header below Authorization row ?

Thanks in advance.

Kind Regards,
Marko Kostic

Hi @Bhargavi92,

I tried on both ways but still the same issue. Here is the Raw response maybe it can mean something to you:

HTTP/1.1 200 OK
Cache-Control: no-cache, no-store, must-revalidate
Pragma: no-cache
Content-Type: text/html; charset=utf-8
Expires: -1
X-Robots-Tag: noindex, nofollow
X-Download-Options: noopen
X-XSS-Protection: 1; mode=block
Content-Security-Policy: default-src ‘self’;script-src ‘self’ cdn.mxpnl.com;style-src ‘self’ ‘unsafe-inline’;img-src ‘self’ data:;connect-src ‘self’ ws: wss: api.mixpanel.com https: sentry.io
Set-Cookie: __RequestVerificationToken=P2BVnqmphAPIA8NlDjVsN8K4QNNgd2NmmYsX3tyC-ADdAbiICl6rfw7DvbSnoIJialZngRvyVpoCG2EOLUbkTjaAKnk1; path=/; secure; HttpOnly; SameSite=lax
Set-Cookie: XSRF-TOKEN=OypLhJ9haIS4TbYZG-_-BIOrGtVgtxBBYXSi9DNC6INVkuLpGNkSsUQTuMQKB5E63GqcS_uqFf9TKcsISoGwc50pCKzv6X_VaGCQv_jT-_20rlwOtvCQhP1Rm95G_Tm9f5yThw2; expires=Thu, 11-Jul-2019 13:17:15 GMT; path=/; secure; SameSite=lax
X-Content-Type-Options: nosniff
X-Frame-Options: DENY
Strict-Transport-Security: max-age=31536000; includeSubDomains
Server:
Date: Thu, 11 Jul 2019 12:47:15 GMT
Content-Length: 2179

<base href="/"/>

<title>UiPath Orchestrator </title>
<link rel="shortcut icon" href="favicon.ico" />

Thanks a lot for helping and your time.

Kind Regards,
Marko Kostic

Hi @Bhargavi92,

I also tried to remove Input Arguments, just to start the process to see is it working or not, and the response is same. So the issue is with process starting with fourth API. I don’t know what can I change to fix this issue.

Kind Regards,
Marko Kostic

@Markokostic1993
Can you share the screenshot of the Parameters tab from the Processes of the orchestrator that your are trying to invoke.

Screen shot of parameters tab for both the processes from orchestrator

  1. with input arguments
  2. with no input arguments.

Hi @Markokostic1993

Is it Cloud API (platform.uipath.com) or your own instance?

I tested it for myself for the Cloud API on Community Orchestrator and this worked:

{
  "startInfo": {
    "ReleaseKey": "86c35aee-ef1d-4fa8-a30c-984b91bc6cb1",
    "Strategy": "Specific",
    "RobotIds": [
      168906
    ],
    "Source": "Manual",
    "InputArguments": '{"in_inputBox": "some value"}'
  }
}

Please try passing this as a header on top of the setting you use in the app:
image

Also, please beware of the syntax for the input argument.

Hi @loginerror,

It’s my own instance, not cloud. I have UiPath Orchestrator on Windows Server 2016.

I pass the header as you told me:

And here is body:

image

But still the same issue. There is not JSON response, only XML:

I also created this argument in studio and pass to some type into activity just for testing:

Also when I publish this version of process in Orchestrator app I have updated the version and the input Parameters appears automatically:

image

Kind Regards,
Marko Kostic

Strange. Especially that other API calls work for you.

Could you share the URL of the API endpoint?

Hi @loginerror,

I’ll send you in private message.
Thanks a lot.

Kind Regards,
Marko Kostic

Thank you. I just needed to be sure that the API endpoint is correct.

It might be bothersome, but could you try another tool to try this particular request?
I really can’t think of anything that is wrong here.

Hi @loginerror
Can you suggest how secure is it to expose the orchestrator credentials while making a POST request to /api/account/authenticate from a webapplication ?