A new Flexera Community experience is coming on November 25th, click here for more information.
#Beginning of Powershell Script # Working example of how to use PowerShell (version >= 2) to access a web service. # Create an object to use and access the web methods available in WFM web service Integration.asmx # Replace WFM_Server in the following line, with your WFM Server IP or DNS name $WFMwebsvc = New-WebServiceProxy ?Uri ?http://<WFM_Server>/WebServicesRoot/Integration.asmx? # Create a cookie container object to enable stateful communication $WFMwebsvc.CookieContainer = New-Object System.Net.CookieContainer # Authenticate against WFM using a database user $WFMwebsvc.AuthenticateDBUser("admin@wfm.com","admin") # Create a Workflow request, using the existing Project Name and the desired new Workflow Name $strCreateWFReturn = $WFMwebsvc.CreateWorkflowRequest("Project Automation", "TestSample") # Provide the initial data entry group values in the form of a xml string - ="<XML><DataGroup Name=""><Element Name="" Value=""/><Element Name="" Value=""/></DataGroup></XML>" # You will have to use ` character to escape the double quotes inside the XML string $WFMwebsvc.SetMultipleDataElements("<XML><DataGroup Name=`"Group1`"><Element Name=`"Enter Name`" Value=`"ABC`"/><Element Name=`"Enter Role`" Value=`"IT`"/></DataGroup></XML>") # Submit the workflow request $WFMwebsvc.SubmitWorkflowRequest("True") #End of Powershell Script
Jan 28, 2019 06:59 PM