ICIEventRule - Event Rule 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

In the Members column, "Function" and "Sub" indicate that the member is a method.

 

Members

How it's used

Applicable Version

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

 

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

Add action statement at specified position.

HRESULT AddActionStatement(

[in] long lIndex,

[in] IDispatch* pdispParams,

[out, retval] IDispatch** ppdispActionStatement);

Example (C#):

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

EFT Server v5.2 and later

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

Add If-statement at specified position.

HRESULT AddIfStatement(

[in] long lIndex,

[in] EventProperty property,

[in] ConditionOperator op,

[in] VARIANT varConditionValue,

[in] VARIANT_BOOL bNot,

[out, retval] IDispatch** ppdispIfStatement);

(Refer to EventProperty.)

EFT Server v5.2 and later

Sub DeleteStatement(lIndex As Long)

Delete event rule’s statement by index.

HRESULT DeleteStatement(

[in] long lIndex);

EFT Server v5.2 and later

Function GetParams() As Object

Retrieve event rule’s parameters. The actual object depends on event rule’s type. (Refer to ICIEventRuleParams, ICITimerEventRuleParams, ICIFolderMonitorEventRuleParams interfaces.)

HRESULT GetParams(

[out, retval] IDispatch* *pVal);

EFT Server v6.2 and later

Sub SetParams(newVal As Object)

Set event rule’s parameters.

HRESULT SetParams(

[in] IDispatch* newVal);

EFT Server v6.2 and later

Function Statement(lIndex As Long) As Object

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

HRESULT Statement(

[in] long lIndex,

[out, retval] IDispatch** ppdispStatement);

EFT Server v5.2 and later

Function StatementsCount() As Long

 

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

Retrieve a number of listed statements.

HRESULT StatementsCount(

[out, retval] long* plCount);

Example (C#):

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

EFT Server v5.2 and later