CasewareDocs

CanExecute

Returns execution-ready status of audit test.

Compatibility

Available as of IDEA version 12.0

Syntax

CanExecute As Integer

Return Value

Audit Test’s execution-ready status (integer).

Execution-ready status has the following values:

Execution Status
Status Value
ReadyForExecution = 0
NotFullyTagged = 1
ParametersRequired = 2
NotAssociated = 3

Remarks

Execution-ready status indicates whether Audit Test can be executed and if not, why:

Status Audit Test
Status Explanation
ReadyForExecution Audit test can be executed.
NotFullyTagged The tags defined by audit test are not fully resolved.
ParametersRequired Not all execution parameters are set.
NotAssociated Audit test is not associated to all necessary databases (execution record is missing).

Example

Sub Main()
Dim ac As Object
Dim atExecutor As Object
Set ac = CreateObject("SmartAnalyzer.AutomationClient")
atId = "f4d65220-77f1-5969-8943-59c7bd448460"
tblName = "Sample-Weblog"
Set atExecutor = SA.GetAtExecutor(atId, tblName)
canExecute = atExecutor.CanExecute
IF canExecute <> 0 THEN
MsgBox"Test is not ready for execution; reason: " & canExecute & ", quit"
Exit Sub
END IF
MsgBox"Test is ready for execution"
atExecutor.Execute
End Sub
CanExecute | Caseware Docs