- Issue created by @daniel.pernold
- 🇦🇹Austria daniel.pernold
Did 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.
- 🇦🇹Austria daniel.pernold
This line breaks BPMN, dunno why atm.
WorkflowDefaultWidget::createInstance($transition);
- 🇳🇱Netherlands johnv
Hmm,
when installing/updateing the modules, I get the following error:Fatal error: Declaration of Drupal\bpmn_io\Plugin\modeler_api_modeler\BpmnIo::edit(Drupal\modeler_api\Plugin\modeler_api_model_owner\ModelOwnerInterface $owner, string $id, string $data, bool $isNew = false): array must be compatible with Drupal\modeler_api\Plugin\modeler_api_modeler\ModelerBase::edit(Drupal\modeler_api\Plugin\modeler_api_model_owner\ModelOwnerInterface $owner, string $id, string $data, bool $isNew = false, bool $readOnly = false): array in C:\damp\xampp\htdocs\drupal-11\drupal\modules\contrib\bpmn_io\src\Plugin\modeler_api_modeler\BpmnIo.php on line 109
- 🇳🇱Netherlands johnv
The $readOnly parameter is missing in the implemententation:
public function edit(ModelOwnerInterface $owner, string $id, string $data, bool $isNew = FALSE, bool $readOnly = FALSE): array;
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) - 🇳🇱Netherlands johnv
Same 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.
- 🇳🇱Netherlands johnv
In heed instructions how to "Try to add a model via BMPN and save it: nothing happens"
- 🇦🇹Austria ChrisZZ Vienna
instructions 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?
- 🇳🇱Netherlands johnv
I did all that.
When trying to add a model, i get the following error:There are no modellers available yet. Install at least one module that integrates a modeller. A list of available integrations can be found on the ECA project page.
What do I need to do?
I am trying to import a model, with problems for another config, to be tackled here: 🐛 ECA error when importing model: There were errors validating the config synchronization Active
- 🇦🇹Austria ChrisZZ Vienna
https://www.drupal.org/project/eca/issues/3322251 →
Just install the BPMN Modeller
- 🇳🇱Netherlands johnv
OK, now it works.
Please test v2.1.2 or v2.0.x-dev, run update.php, and report back. - 🇳🇱Netherlands johnv
Renaming, since getting confused with Workflow ECA → module
- 🇦🇹Austria ChrisZZ Vienna
The 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. - 🇳🇱Netherlands johnv
I am now upgrading and testing the Workflow ECA → module in 📌 Adapt to upcoming 1.9 release of Workflow Active .
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?
- 🇦🇹Austria ChrisZZ Vienna
On my side, I cannot create any ECA flows, as long as those plugins are still available.
WorkflowNodeNextStateAction.php
WorkflowNodeGivenStateAction.phpIf 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
- 🇳🇱Netherlands johnv
Please 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. - 🇦🇹Austria golubovicm
Tried with dev-2.0.x and 2.1.4 and saving is still not possible (instead of buttons "Save" and "Cancel" I see only "Update workflow" which does nothing when clicked).
- 🇳🇱Netherlands 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. - 🇦🇹Austria ChrisZZ Vienna
Well 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.
- 🇦🇹Austria daniel.pernold
@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":
- 🇦🇹Austria daniel.pernold
To be more precise: the problem sits somewhere in the src/Plugin/Action/WorkflowStateActionBase::buildConfigurationForm implementation.
- 🇳🇱Netherlands johnv
Thanks 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: ✨ Support Gin action item Active
- 🇦🇹Austria ChrisZZ Vienna
Hi 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. - 🇦🇹Austria daniel.pernold
@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.
- 🇳🇱Netherlands johnv
Pff,
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. - 🇦🇹Austria golubovicm
Tried and "Save" button appears, but it doesn't work. When clicked nothing happens.
- 🇦🇹Austria daniel.pernold
Why does ECA module load and perform all those configuration form upfront??
I guess because ECA wants to display those forms when using the actions. But not sure.
- 🇳🇱Netherlands johnv
Please use 2.0.x dev version.
Or New 2.1.x branche.
The 2.1.4 version does not contain this fix, yet. - 🇦🇹Austria daniel.pernold
@johnv Latest 2.0.x dev-version seems to fix the issue. Thanks! Would appreciate a new bugfix version.
- 🇳🇱Netherlands johnv
Nice,
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. Automatically closed - issue fixed for 2 weeks with no activity.