Select your user interface:
Generate WSF Action
A script is a file you create that describes the steps required to complete a task. A Windows Scripting File (.wsf) is an executable script file format for Windows that can incorporate VBScript (.vbs) routines and include XML elements. After you create the script, you can "run" that script, and it will perform all of the steps for you, saving you a great deal of time. You can use Microsoft Windows Task Scheduler to schedule tasks to run the Windows Scripting File through the other application at a time that is most convenient to your organization. You need only create the script once, and then you can reuse it any time you need to perform that task.1 It incorporates several features that offer you increased scripting flexibility. Because Windows Script Files are not engine-specific, they can contain script from any Windows Script compatible scripting engine.2
Figure: Generate a Windows Scripting File
You click the Generate WSF action to create a Windows Scripting File that you can run once or schedule using Windows Task Scheduler. In short, the generated script file consists of sending an HTTP request to the Infinity web server that houses the BusinessProcessInvoke.ashx web service handler. An .ashx is an ASP.NET HTTP handler is the process (frequently referred to as the "endpoint") that runs in response to a request made to an ASP.NET Web application.3 The BusinessProcessInvoke.ashx endpoint is used to start a business process using a pre-defined parameter set. This endpoint is designed to be accessed from any tool that can issue HTTP requests. It is used by the VBScript and jscript files that the platform generates for business processes.
<?xml version="1.0" encoding="utf-8"?> <job id="main"> <script language="VBScript"> <![CDATA[ Const SECURITY_FLAG_IGNORE_CERT_CN_INVALID = &h00001000 Const SECURITY_FLAG_IGNORE_CERT_DATE_INVALID = &H2000 Const SECURITY_FLAG_IGNORE_UNKNOWN_CA = &H100 Const WINHTTPREQUESTOPTION_SSLERRORIGNOREFLAGS = 4 Dim url Dim xml Dim responseText url = "http://localhost/bbinfinity/BusinessProcessInvoke.ashx?DatabaseName=BBInfinity&BusinessProcessID=a28d4f17-53fe-48d9-85bc-37e12884dc00&ParameterSetID=aab44bb5-0277-47de-a6b4-3235bcecb5e7" Set xml = CreateObject("WinHttp.WinHttpRequest.5.1") Dim options options = SECURITY_FLAG_IGNORE_CERT_CN_INVALID or SECURITY_FLAG_IGNORE_CERT_DATE_INVALID or SECURITY_FLAG_IGNORE_UNKNOWN_CA xml.Option(WINHTTPREQUESTOPTION_SSLERRORIGNOREFLAGS) = options xml.SetTimeouts 0, 60000, 30000, 604800000 xml.SetAutoLogonPolicy(0) xml.Open "GET", url, False xml.Send xml.WaitForResponse responseText = xml.ResponseText If xml.Status <> 200 Then Err.Raise -2147221504 + 100, "Business process invoke step failed", responseText Set xml = Nothing ]]> </script> </job>