Parameters
filter
A boolean expression that references fields of the potential next (or previous) activity as well as optional references to the origin activity using ORIGIN(...).
If an activity does not meet the filter, the activity is skipped. The operator continues searching until it finds an activity that does match or until it exhausts the list.
Note that value calculation parameters are not supported in filter expressions of the SUCCESSOR or PREDECESSOR operators.
steps
An integer, FIRST / LAST, or an integer expression.
FIRST → the first matching activity.
1 (default) → the first matching activity.
2 → the second matching activity.
-2 → the second to last matching activity.
-1 → the final matching activity.
LAST → the final matching activity.
If the list does not contain enough matching activities, the operator returns the specified fallback or the calculation is aborted and NULL is returned.
fallback
The value returned if no matching activity is found.
Defaults to calculation abortion and NULL if not specified.
Common usage: fallback: 'NotFound', fallback: -1, etc.
ORIGIN(...)
Retrieves the specified field from the origin activity.
Often used in filter expressions to compare the origin’s field value with the candidate next/previous activity’s field value.
The call picks a subsequent activity with the same cost as the current activity.
SUCCESSOR(
"_ARIS.Activity"."activity_name",
filter: ORIGIN("_ARIS.Activity"."Activity cost") = "_ARIS.Activity"."Activity cost"
)
Restrictions on ORIGIN usage in filter expressions
When using ORIGIN within a filter expression, the following constraints apply (enforced by the environment):
ORIGIN in simple equality only:
You can only use ORIGIN(...) in a simple equals (=) comparison.
Non-equality comparisons (>, <, >=, <=, etc.) with ORIGIN are not supported in the filter.
Example error:
"The ORIGIN operator is only supported with simple equals (=) comparisons in the filter expression."
ORIGIN on only one side of =:
You cannot have ORIGIN(...) appear on both sides of the same equality comparison.
Example of invalid usage:
ORIGIN("_ARIS.Activity"."Activity cost") = ORIGIN("_ARIS.Activity"."Activity cost")
Example error:
"The ORIGIN operator can only appear on one side of a simple equals (=) comparison in the filter expression."
No mixing ORIGIN and non-ORIGIN fields on the same side:
Example error:
"The ORIGIN operator cannot be mixed with non-ORIGIN access on one side of a simple equals (=) comparison."
No additional conditions if ORIGIN is used:
You can combine ORIGIN with other sub-expressions on the same side of the = in a single filter.
However, you cannot combine multiple conditions with AND or OR, you are restricted to one condition only.
Example error:
"The ORIGIN operator is only supported in filter expressions with simple equals (=) comparisons."
If you want to use the ORIGIN(...) operator in your filter, it must have the following form:
ORIGIN("_ARIS.Activity"."someField") = "_ARIS.Activity"."someOtherField"
or
"_ARIS.Activity"."someField" = ORIGIN("_ARIS.Activity"."someOtherField")
The operator may not use additional conditions or ORIGIN on both sides. The usage of arithmetic, concatenation, switches is allowed on each side.