Skip to content

AssertNotEquals

Fails the current server workflow script when the values are equal.

1
myScript.AssertNotEquals(expected: any, actual: any, message?: string):void

Parameters

any expected
    The value that must differ.

any actual
    The value to verify.

string message optional
    Error text returned in the thrown JavaScript Error.

Remarks

Server workflow scripts only. Equality follows the same .NET normalization and comparison rules as AssertEquals().

Examples

Verify that the approver is not the requester

1
Script.AssertNotEquals($Xml.Evaluate('Requester'), $Xml.Evaluate('Approver'), 'A request cannot be approved by its requester.');