Loading
Issue #3605421: Show a process instance variable as a typed Views column
Adds a configurable Process variable Views field on the process instance, so a dashboard can show a named process variable as its own column.
Configure the field with:
- Variable: the variable to show. A dotted path reads into
a structured value, the same syntax flow conditions use:
order.totalshows thetotalkey of the array held inorder. A plain name shows a scalar. - Display as: Text, Number, Date (a Unix timestamp or a date string, formatted with the chosen date format), or Yes/No for a boolean.
The field reads the instance-wide value, never a branch token-local one, and the named variable is batch-loaded for the whole page in a single query, so a column over many instances does not read per row. Add the field more than once to show several variables side by side.
What is included
- New Views field handler
orchestra_instance_variableand its declaration inviews_data_alter. - Config schema for the handler options.
- A kernel test covering the dotted path, every display type, the missing key fallback, instance-wide vs token-local reads, and the per-page batch load.
- Docs: a "Process variables as columns" section in the Views guide.
phpcs (Drupal, DrupalPractice), phpstan (level 5) and cspell are clean; the new and the extended Views tests pass.