Problem/Motivation
I want to use ECA 2.x with the Workflow module and multiple workflows.
When trying to add a BPMN Model i get the following error:
Found config field Workflow transition action config in workflow_node_given_state_action with non-supported value.
Found config field Workflow transition action config in workflow_node_next_state_action with non-supported value.
Steps to reproduce
* Install eca:2.1.8
* Intall bpmn_io:2.0.8
* Install workflow:2.0.0
* Try to add a model via BMPN and save it: nothing happens
* Lookup error in the logger / recent log messages
Proposed resolution
Did not investigate in the error, but when deleting WorkflowNodeGivenStateAction and WorkflowNodeNextStateAction class, ECA is working again.
This bug is a blocker on our side at the moment using Workflow.
| Comment | File | Size | Author |
|---|---|---|---|
| #26 | Screenshot_20250708_141321.png | 61.53 KB | daniel.pernold |
| #26 | Screenshot_20250708_140324.png | 49.34 KB | daniel.pernold |
| #26 | Screenshot_20250708_140510.png | 48.36 KB | daniel.pernold |
Comments
Comment #2
daniel.pernold commentedDid some debugging and my suspicion is the Element here: https://git.drupalcode.org/project/workflow/-/blob/2.0.0/src/Plugin/Acti...
When returning the $form above this line without setting the $form['workflow_transition_action_config'] on L213, I was able to save the ECA model. Did not test for any subsequent errors.
Comment #3
daniel.pernold commentedThis line breaks BPMN, dunno why atm.
WorkflowDefaultWidget::createInstance($transition);
Comment #4
johnvHmm,
when installing/updateing the modules, I get the following error:
Comment #5
johnvThe $readOnly parameter is missing in the implemententation:
Downloading drupal/bpmn_io (3.0.0-alpha5)
Upgrading drupal/eca (dev-3.0.x b72d3ca => 2.1.8)
using modules
Machine name: bpmn_io Version: 3.0.0-alpha5
Machine name: eca (no version specified)
Machine name: eca_ui (no version specified)
Comment #6
johnvSame problem with
public function convert(ModelOwnerInterface $owner, ConfigEntityInterface $model, bool $readOnly = FALSE): array;
I updated the function declaration of both functions in bpmnio.php.
Update.php is now correct.
Also working with Workflow 2.1.0, but the mentioned classes were not touched, lately.
Comment #7
johnvIn heed instructions how to "Try to add a model via BMPN and save it: nothing happens"
Comment #8
chriszz commentedinstructions how to "Try to add a model via BMPN and save it: nothing happens"
Install ECA base, ECA content (e.g.) and ECA BMPN Modules to your system. You do not need ECA workflow - since this is for core workflows.
Navigate here: /admin/config/workflow/eca
Now you see a button to add a new model - and there is also a log page.
Does this help?
Comment #9
johnvI did all that.
When trying to add a model, i get the following error:
What do I need to do?
I am trying to import a model, with problems for another config, to be tackled here: #3531149: ECA error when importing model: There were errors validating the config synchronization: block.block.workflowtransitionform
Comment #10
chriszz commentedhttps://www.drupal.org/project/eca/issues/3322251
Just install the BPMN Modeller
Comment #11
johnvOK, now it works.
Please test v2.1.2 or v2.0.x-dev, run update.php, and report back.
Comment #12
johnvComment #13
johnvRenaming, since getting confused with Workflow ECA module
Comment #16
chriszz commentedThe log does not show any messages - but Saving of new ECA models is still not possible with the actions installed
new warning comes up
You have multiple workflows in the system. Please first select the field name and save the form.
Comment #18
johnvI am now upgrading and testing the Workflow ECA module in #3513056: Adapt to Workflow 2.1 and ECA 2.
Are you using that submodule, too?
With current Workflow DEV version and the patch, I can save and execute an ECA event + action.
Still working on the Condition - the Workflow ECA module must be .
The new message 'You have multiple' is intentional, but never used in this context.
Sorry to hear that the Actions problem is not solved. It should have been solved in workflow_update_8008(). I presume you did proper update.php. Can you re-run workflow_update_8008() again?
Do you have the problem for 1 or 2 Actions ('next' and 'new')?
Comment #19
chriszz commentedOn my side, I cannot create any ECA flows, as long as those plugins are still available.
WorkflowNodeNextStateAction.php
WorkflowNodeGivenStateAction.php
If those are deleted, the ECA can be configured again.
Also, ECAs continue to run, even if configuration is blocked.
There is no log message of whatsever
8008 has run successfully- so this is not the problem
Comment #22
johnvPlease try again with version 2.0.x-dev and both report back.
The warning is now removed and replaced by a switchable field description.
Also, a NULL was passed to Twig, where only (empty) strings are allowed.
Comment #23
golubovicm commentedTried with dev-2.0.x and 2.1.4 and saving model is still not possible (instead of buttons "Save" and "Cancel" I see only "Update workflow" which does nothing when clicked).
Comment #24
johnv@golubovicm, easel share you use case.
It seems you are using the action, but Op is not about using the actions. Only having them causes the problem.
Comment #25
chriszz commentedWell it does not matter what we try to use, as long as the actions are there, the form is blocked. Of course we need to use those actions if possible inside of the workflow. However, there are other ways to create the necessary process steps - however, now the ECA form is simply blocked and nothing can be changed at all.
The errors are not shown anymore - now there is no more reaction at all. If you want I could show you so that it is easier to avoid missunderstandings.
Comment #26
daniel.pernold commented@johnv The behaviour is the same as before, with one difference: the label of the button changed.
Before (2.0.0)
After (dev-2.0x.)
Still, when clicking on "Save" or "Update workflow" the ECA Form does just nothing. I guess that "Update workflow" as button here is completely misplaced. Just a blind guess, but I think the implementation of the ConfigurationForm for these Actions is not compatible with ECA at all.
When I remove both the "buildConfigurationForm" Methods from the Action classes (this and this), ECA works again. The following should happen when clicking "Save":
Comment #27
daniel.pernold commentedTo be more precise: the problem sits somewhere in the src/Plugin/Action/WorkflowStateActionBase::buildConfigurationForm implementation.
Comment #28
johnvThanks Daniel,
Your screendumps reveal the key issue. You are using the Gin theme, or a subtheme.
That does a strange thing with Form buttons.
Also, i think you have 'action buttons' specified in one or all of your workflows.
Please confirm both assumptions.
Now I can reproduce the error.
Perhaps the following must be reviewed in this context: #3458569: Support Gin Admin theme's MoreActions button
Comment #29
chriszz commentedHi John, we use radios, no action buttons.
Also workflow itself works well - what is difficult is the configuration of ECA with the workflow module activated.
The observation and the workarround currently is:
- active ECAs in the system work well - so the process all fine
- it is possible to configure ECAs as long as the action files are deleted from the workflow module
- it is impossible to use the BPMN ECA configuration with the workflow modules installed if those actions are in the system.
Comment #30
daniel.pernold commented@johnv Yes, we use GIN here as theme (but just contrib, no special subtheme). Gin has an option for "sticky" form buttons, but it is disabled on our side.
Comment #31
johnvPff,
first some complaints.
- Drupal form handling is way too difficult, and uses too many conventions (null vs NULL, '?TYPE' vs. '|null', etc.
- Why does ECA module load and perform all those configuration form upfront??
- Why does Gin theme mess around with existing forms?
But then the bright side:
- this issue reveals a regression error where the 'action buttons' are no longer suppressed in the Workflow Action configuration form.
- this issue forced me to make a step further: until now, for adding the WorkflowTransition form element, I called a complete form. Now, I still do not the ideal situation (calling a proper widget), but call only the form element building thing, without loading the complete form surroundings.
(In v1.7, many code was coded and executed twice)
This may lead me to remove more duplicate code in the future.
Thanks,
Please test 2.0.x and report back.
Comment #33
golubovicm commentedTried and "Save" button appears, but it doesn't work. When clicked nothing happens.
Comment #34
daniel.pernold commentedI guess because ECA wants to display those forms when using the actions. But not sure.
Comment #35
johnvPlease use 2.0.x dev version.
Or New 2.1.x branche.
The 2.1.4 version does not contain this fix, yet.
Comment #37
daniel.pernold commented@johnv Latest 2.0.x dev-version seems to fix the issue. Thanks! Would appreciate a new bugfix version.
Comment #38
johnvNice,
ITMT, I managed to create a 2.1.x version, which is now the actual one.
Working on 1 issue, then will create a new version. Will keep you posted, and leave tis open as a reminder until then.
Comment #39
johnv@golubovicm, is your problem solved, too?
Comment #40
johnvVersion 2.1.5 is now released. Happy testing and using!
Comment #42
golubovicm commented@johnv yes, problem solved, thank you.