Focal Point
Call Powershell script from Service Object

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/1381057331/m/7287037226

July 30, 2012, 04:01 PM
NateM
Call 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


WebFOCUS 7.6
Windows, All Outputs
August 02, 2012, 10:35 AM
Kerry
Hi 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


Kerry Zhan
Focal Point Moderator
Information Builders, Inc.
August 02, 2012, 04:18 PM
NateM
Thank 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.


WebFOCUS 7.6
Windows, All Outputs