FilterArrayProcessor

Version #1

Description:

This processor will split an input array to two output arrays based on a condition defined in Spring Expression Language.
Note that access is really limited to a set of utility classes defined in java.util and java.lang package. Property write, instance creation, bean access is disabled.
Some additional utility methods are defined: listOf(items|array|null), setOf(items|array|null), hasAny(collection|array|null, items...), hasAll(collection|array|null, items...)
Some Respresso specific utilities: readInput(structurePath), readCurrentElement(structurePath), readPath(StructureObject|null, structurePath), jsonToStructure(String|null)
You may want to abort the whole process when you find a critical error in the data. In this case you can use error(String) which will throw an exception with your message. This may be used for restricting data format or editor users based on permissions.

Interface:

Internally used structures:

Basic sample:

<processor id="<FLOW_SCOPED_ARBITRARY_ID_GOES_HERE>" name="FilterArrayProcessor" version="1">
  {
    "condition": STRING
  }
</processor>

Advanced sample:

<processor id="<FLOW_SCOPED_ARBITRARY_ID_GOES_HERE>" name="FilterArrayProcessor" version="1">
  {
    "arrayPath": STRING,
    "condition": STRING
  }
</processor>

Chainable processors: