July 30, 2012, 04:01 PM
NateMCall Powershell script from Service Object
I am working a flow that will call Powershell scripts, but have had little luck. Initially I tried calling the .ps1 script directly (cmd /c C:\script1.ps1), but this failed. Instead of cmd /c C:\script1.ps1 I have created a .bat that calls the .ps1 script. This seems to work, but the flow always times out. I have tried exits within the ps1 and bat scripts to make sure they are exiting correctly, but that doesn't work. I have increased the timeouts, but that does not work either. This is a simple script that creates network maps and then creates a directory listing. It is a very simple flow to test with:
Start -> Service Object (cmd /c c:\Call_script1.bat) -> End
When I run the scripts directly on the iWay server they both work flawless and finish under 15 seconds.
I searched around FocalPoint and Google, but I am unable to find any info on iWay Service Objects calling a Powershell scripts. Any help would be greatly appreciated!
Nate
August 02, 2012, 10:35 AM
KerryHi Nate,
From our iWay folks: In the service object, you would use XDRunCmdAgent. The documentation is below. I think the answer is cmd /C lou.bat.
If this does not work, please open a case with Customer Support Services for assistance. I assume the power shell script should be the same.
Here is the information from documentation.
Cheers,
Kerry
August 02, 2012, 04:18 PM
NateMThank you for your response on this. To answer your question and Lou's phone call, the flow works fine with a generic bat file. It seems like an issue with PowerShell and the script not letting iWay know that it has finished and to move onto the next step in the flow.