[meta] Data Processors

Created on 18 November 2019, over 4 years ago
Updated 10 July 2024, 2 days ago

We need to decide what to do about data processors, so I've collected some related issues here in this meta.

In summary, in D8+ we only use data processor plugins for token replacement in direct input mode in the UI. There is currently no way to use any data processor plugin other than 'rules_tokens', and 'rules_tokens' is always used - there's no provision for conditional use of the processor.

Moreover, if we want token replacement with programmatically-created rules, we have to ->process() the rule explicitly. Is this desirable? Or should the processors be uniformly applied to both UI-created rules and programmatically-created rules?

Most things (all things?) that were done in D7 using data processors can now be done with DataFilter plugins in the typed_data module. Here's a list of things @fago has said in the related issues (notes/clarifications in parentheses were added by me).

  1. Rules data processors (ed. plugins) are not added in by default, i.e. they are just ignored as long as no one activates them
  2. Given we have data filters, the only use-case left (ed. for data processors) seems to be the token processor. Thus, we should make it so that the processor a) is able to tell whether it should be enabled b) we need to save that information and c) allow them to show some help.
  3. So question is, do we want to add the processor automatically for every input? That means every processor? In D7, the processor had a chance to look at the direct input and check whether it needs to be executed or not. The optional execution seems to be a reasonable performance improvement we should port (ed. see #2804035: Processor plugins cannot decide to not process context β†’ ), but first off we need to solve this issue by just auto-adding all processors. Given that, I think processors should probably converted from plugins to tagged services.
  4. I think most data processors are outdated in D8 by having data filters like {{ date|dateOffset('+1day') }}. So auto-attaching them + make them (tagged) services seems to be the most reasonable
  5. Adding data processor forms or something else seems to be silly (ed. I think this refers to the "Add offset" type input used in D7)

Also see:
Rules Data Processor Plugins
Extending Rules β†’

🌱 Plan





Rules Core

Created by

πŸ‡ΊπŸ‡ΈUnited States TR Cascadia

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024