How to pass the arguments from php to uipath

Hi i want to pass the arguments from php to uipath so that when i enter something in the html page. From backend php should connect to uipath and pass the variable as an argument to it.
Can anyone help me out of this? Any helpful answers will be appreciated

Thanks

1 Like

Hi @mahendragr
You can use Orchestrator API to do this!

About OData and References

Hi @kuppu_samy

Thanks for your reply… I just want to see any example with it… so that it can be easily understand by me…

Hi @mahendragr,

I couldn’t show you an example. But I am sharing you the instructions.

But you need authentication token and process id to execute it. Please refer to the documentation.

Thank you @kuppu_samy

@kuppu_samy Actually i tried in command prompt with this command
“C:\Program Files (x86)\UiPath\Studio\UiRobot.exe” /file:“C:\Users\VIS\Documents\UiPath\WebsiteToMail\Sequence.xaml” /input:"{‘arg1’:‘hello’}"
and it is working fine but i want to do same thing from php… Is there any other way to execute without using orchestator?

Hi @mahendragr,
If you really want to do it from PHP, then you need Orcherstrator API. But the Orchestrator is the best way. We can keep track on jobs and logs.

1 Like

I found this on https://www.php.net/manual/de/function.exec.php:
This will execute $cmd in the background (no cmd window) without PHP waiting for it to finish, on both Windows and Unix.

<?php function execInBackground($cmd) { if (substr(php_uname(), 0, 7) == "Windows"){ pclose(popen("start /B ". $cmd, "r")); } else { exec($cmd . " > /dev/null &"); } } ?>

You can use this function to run UIRobot.exe

1 Like