ICIEventRule Interface

Use the ICIEventRule interface to make changes to the Event Rule settings.

interface ICIEventRule : IDispatch

Examples (VBScript):

'Add "If File name matches "*.txt" or "*.exe"" condition:
cond = Rule.AddIfStatement(0, FileName, Match, Array("*.txt", "*.exe"))
Set Params = Rule.GetParams
'rename rule
Set Params = Rule.GetParams
Params.Name = Params.Name & "_renamed"
Rule.SetParams Params
NOTE: "Function" and "Sub" indicate that the member is a method.

See alsoICIEventRules Interface, ICIEventAction Interface, ICIEventActions Interface, ICIEventInfo Interface, ICIEventRuleParams Interface.

  • Function AddActionStatement(lIndex As Long, pdispParams As Object) As Object

  • For an example using this method, refer to the EventRuleCreation script in Script Examples.

    Adds an Action statement at a specified position.

    HRESULT AddActionStatement([in] long lIndex,
    [in] IDispatch* pdispParams,
    [out, retval] IDispatch** ppdispActionStatement);

    Example (C#):

    rule.AddActionStatement(rule.StatementsCount(), eventLogActionParams);

    EFT v5.2 and later

  • Function AddIfStatement(lIndex As Long, property As EventProperty, op As ConditionOperator, varConditionValue, bNot As Boolean) As Object

  • Adds an If-statement at a specified position.

    HRESULT AddIfStatement([in] long lIndex,
    [in] EventProperty property,
    [in] ConditionOperator op,
    [in] VARIANT varConditionValue,
    [in] VARIANT_BOOL bNot,
    [out, retval] IDispatch** ppdispIfStatement);

    EFT v5.2 and later

  • Function AddLoopDatasetStatement(lIndex As Long, pdispParams As Object) As Object

  • Used to define a Loop through Dataset action in an Event Rule.

    HRESULT AddLoopDatasetStatement(
    [in] long lIndex, 
    [in] IDispatch* pdispParams, 
    [out, retval] IDispatch** ppdispLoopDatasetStatement);

    EFT v8.0.4 and later

  • Property ChangeDescription As String

  • HRESULT ChangeDescription([in] BSTR newVal);

    EFT v7.2

  • Sub DeleteStatement(lIndex As Long)

  • Delete Event Rule’s statement by index.

    HRESULT DeleteStatement([in] long lIndex);

    EFT v5.2 and later

  • Sub Export(bstrDstFile As String)

  • HRESULT Export([in] BSTR bstrDstFile);

    EFT v7.2

  • Function GetACL() As Object and Sub SetACL(pVal As Object)

  • HRESULT GetACL([out, retval] IDispatch** ppVal);
    HRESULT SetACL([in] IDispatch* pVal);

    EFT v7.2 and later

  • Function GetHASchedulingParams() As Object and Sub SetHASchedulingParams(newVal As Object)

  • Returns/specifies an object of type ICIRoundRobinEventRuleSchedulingParams that can be used to manage the nodes listed in the “Run on One of” list for a load-balanced event rule.

    HRESULT GetHASchedulingParams([out, retval] IDispatch** ppdisp);
    HRESULT SetHASchedulingParams([in] IDispatch* newVal);

    EFT v7.0 and later

  • Function GetParams() As Object and Sub SetParams(newVal As Object)

  • Retrieves/specifies Event Rule’s parameters. The actual object depends on the Event Rule’s type. (Refer to ICIEventRuleParams, ICITimerEventRuleParams, ICIFolderMonitorEventRuleParams interfaces.)

    HRESULT GetParams([out, retval] IDispatch* *pVal);
    HRESULT SetParams( [in] IDispatch* newVal);

    EFT v6.2 and later

  • Function Statement(lIndex As Long) As Object

  • Retrieves a statement object by index. (Refer to ICIEventRuleStatement interface.)

    HRESULT Statement([in] long lIndex,
    [out, retval] IDispatch** ppdispStatement);

    EFT v5.2 and later

  • Function StatementsCount() As Long

  • For an example using this method, refer to the EventRuleCreation script in Script Examples.

    Retrieves the number of listed statements.

    HRESULT StatementsCount([out, retval] long* plCount);

    Example (C#):

    rule.AddActionStatement(rule.StatementsCount(), eventLogActionParams);

    EFT v5.2 and later

Related Topics