ScriptContext.Submit Method

Submits an Alert, Event, PerfData, or DiscoveryData object to the MOM data stream.

 ScriptContext.Submit(oObject Object)

Parameters

  • oObject
    Specifies the object to submit to the MOM data stream. It should be an Alert, Event, PerfData, or DiscoveryData object.

Return Value

None

Remarks

After creating an Alert, Event, PerfData, or DiscoveryData object with the CreateAlert, CreateEvent, CreatePerfData, or CreateDiscoveryData method, you must call the Submit method for MOM to process the new object.

Examples

The following example shows how to submit an Alert object to the MOM data stream.

Function SubmitObject(objCreatedObject)
    Dim strObjectType

    strObjectType = TypeName(objCreatedObject)

    If ((strObjectType = "IEEMScriptAlert") Or _
        (strObjectType = "IEEMScriptEvent") Or _
        (strObjectType = "IEEMScriptPerfData")) Then
        ScriptContext.Submit(objCreatedObject)
    Else
        strObjectType = "Error, unknown object type: " & strObjectType
    End If

    SubmitObject = strObjectType
End Function

Requirements

Platforms: Requires Windows 2000 or later

Version: Requires MOM 2000  or later

See Also

ScriptContext Object