HelperStable

Partition

Splits a typed collection between elements matching rules and the remaining elements.

Typed collection
Partition
Collection
Resulting collection(s)

Vue d’ensemble

Splits a typed collection between elements matching rules and the remaining elements.

Exemple

Separate overdue invoices from non-overdue invoices so the two groups can be handled in different branches.

Parameters 2

itemsRequisobject[]
Typed collection supplied by a binding. The concrete element type is preserved or unified in outputs.
filtersOptionnelobject[]
Structured filter rules applied to element fields. Every rule must match for an element to be retained.

Outputs 4

matchingobject[]
Elements satisfying all filter rules.
matching_countinteger
Number of elements in matching.
remainingobject[]
Elements that do not satisfy all filter rules.
remaining_countinteger
Number of elements in remaining.

Behavior

Each element belongs to exactly one of the two outputs: matching or remaining. Rules use the same semantics as filter_order.

Key point Collection operations preserve the data classification carried by their elements; filtering, sorting, or concatenating a list is not declassification.

Limits and responsibilities

  • Partition does not route the process; it produces two collections.
  • With an empty filter list, all elements belong to matching.