Advanced scenarios
Filtering on ORIGIN versus Next or Previous
You can incorporate ORIGIN(...) references to compare the origin’s fields with the candidate next or previous activity’s fields.
Remember the restriction on only using ORIGIN with a simple = in the filter.
Combining with other operators
CONCAT(): Builds strings from multiple fields.
CASE WHEN(... ) THEN ... ELSE ...: Conditional logic
SUBSTRING(...), TO_LONG(...): Data transformations
PU_FIRST(...) / PU_ANY(...): Higher-level pipeline
Handling edge cases
If the origin is the first activity in a case, a backward iteration typically aborts the calculation and returns NULL.
If the origin is the last activity, a forward iteration typically aborts the calculation and returns NULL.
Use a fallback or additional logic if the calculation should be continued.
Performance in deep nesting
Very deeply nested calls can impact the system performance. Often you can simplify the logic to fewer iteration calls.