We hope you'll join us for our 4/23 webinar on using data tables to apply reference ranges and AE codes in OC4. For more information and to register, visit https://register.gotowebinar.com/register/2882170018956684555

script to run a rule

Dear all,
If you want to schedule the execution of a Rule, or of all the Rules of a CRF, you can use the following script, change it to match your situation and save it as a *.vbs.
If you want to read more about the why's and how's, go to 
Kind regards,
Gerben Rienk
Option explicit
Dim objIEDebugWindow
Dim objHTTP
Dim strURLStart
Dim strURL 
Dim strReq 

If WScript.Arguments.Count <> 3 then
WScript.Echo "Missing parameters. This script needs: "_
& VbNewLine & "username, password and CRFID or RuleSetID"_
& VbNewLine & "to run correctly."
Set objHTTP = CreateObject("MSXML2.XMLHTTP")
strURL = strURLStart & "j_spring_security_check?j_username=" & WScript.Arguments(0) 
strURL = strURL & "&j_password=" & WScript.Arguments(1)
objHTTP.Open "POST", strURL, False

'choose one of the following: 
'this first line will run all Rules for a CRF, 
'strURL = strURLStart & "RunRule?crfId=" & WScript.Arguments(2) & "&action=true"
'this second line will run one RuleSet
strURL = strURLStart & "RunRuleSet?ruleSetId=" & WScript.Arguments(2) & "&dryRun=no"

objHTTP.Open "GET", strURL, False
End if


This discussion has been closed.