Improve Introduction
Discussion from https://drupal.slack.com/archives/C0287U62CSG/p1708346540768469
James Shields
2 days ago
Hi,
I'm trying to create an ECA task that emails all users with a role when a comment is posted.
I came across this example: https://ecaguide.org/library/test%20models/views/
But I haven't managed to import it. The error seems to suggest it has a dependency on Bartic, which seems odd.
I've been trying to recreate by reading the YML.
I have an "insert comment" event and I'm triggering a task to run the view, and triggering a "custom event" from that.
It's generating an email for each user in the group, but it's not letting me add tokens from the comment into the email I'm generating.
I've also tried using "set token" to set up tokens with the values I want to put in the email, but they are coming up blank when they get to the send email task.
ecaguide.orgecaguide.org
ECA Library - Views - ECA - Drupal Events, Conditions, Actions
Documentation, tutorials and resources for Drupal's ECA module and its eco-system.
19 replies
jurgenhaas
2 days ago
If the ECA model import fails due to suspicious dependencies, that indicates that the config of a Drupal site is already invalid before doing the import. Not sure, how to fix that, but I guess a regular drush config:import may come up with some more details. When all is fixed, the import of ECA models will then work as well.
jurgenhaas
2 days ago
Then about the token usage, that's most likely a syntax issue with the tokens in the content. If you want to export your model and upload it here, I'll be happy to review and see if I can find the problem.
jurgenhaas
1 day ago
@James Shields
We've had a similar issue here (https://www.drupal.org/project/eca/issues/3419027) and we just got the confirmation, that the config was broken and needed fixing.
Drupal.org
Failed to import models
Thank you for the great efforts on this project. I've just tried ECA module and it's wonderful. I downloaded some examples from https://ecaguide.org/library/ ,but when importing got this message: Error message The import failed due to the following reason: There were errors validating the config synchronization. Configuration workflow.state.dummy_action_creation depends on the workflow.workflow.dummy_action configuration that will not exist after import.
Feb 3rd
James Shields
1 day ago
Sorry, posted to the wrong thread!
James Shields
1 day ago
I've figured out my problem!
I'd missed the "Tokens to forward" property in the Trigger custom event task.
I put my tokens in there, and it starts working!
James Shields
1 day ago
Better still, I can put comment in the Tokens to forward field, and all the comment properties are available in the send email component. I was worried that I'd have to create new tokens and assign the values from the comment to them.
jurgenhaas
1 day ago
Sounds great, congrats for figuring all that out. Have you also had a chance to look into the bokren import issue?
James Shields
1 day ago
Sorry, I haven't yet. I have some time today. The site I tried it on has a lot installed. I'll try on a fairly vanilla Drupal & ECA install and see what happens.
James Shields
1 day ago
I notice a lot of the examples have screencasts attached, but not that one. Might it be worth redoing it and adding the screencast?
jurgenhaas
1 day ago
Yes, good idea. We're currently even working on an idea where we want to combine 3 components: a blog post that describes all about the screencast, that refers to the model. That would be better for more proactive marketing, as we can reach more people with the blog post. Then, they can either watch the video or directly download the example - or both, whatever they prefer.
James Shields
1 day ago
This isn't directly related to this issue, but the one thing I found less than intuative about ECA was adding conditions. I had watched a Demo a while back, but it wasn't highlighted in a way that I remembered. Once you know, it's super easy, but you need to know that once you've added a task box, you need to go back to the connector and add the condition.
James Shields
1 day ago
The ECA guide has some great details, but the "Usage" section mainly covers deciding which editor to use, and getting into the editor. The "Concepts" section seems to assume you already know the basics and are ready to jump into things like permissions and tokens.
jurgenhaas
1 day ago
That's a good point, and you're certainly not alone. We thought at the beginning, this knowledge would come from the BPMN context, but most users haven't used that ever before using it with ECA, so people may not know that. Any ideas how we could make that more obvious?
jurgenhaas
1 day ago
My last comment was about conditions.
James Shields
1 day ago
I feel the the first 3 items under Concepts should be "Events", "Conditions", and "Actions", and cover the basics of adding each to a model.
jurgenhaas
1 day ago
That makes sense. Due to the nature of the decoupled UI, we would have to link to the BPMN.io sction to describe that last bit, though. Because in other modellers that works completely different.
James Shields
1 day ago
It would be cute if there was a "Don't know what to do? Click here!" that appeared over the BPMN editor when you open a new model. Would be great if the link would show a quick screencast showing how to add an event, condition and action.
James Shields
1 day ago
I see your point that how you configure conditions will be completely different. I still think those are essential things people are going to look for in the concepts section of the guide. Perhaps the Condition section (for example) could cover some general information about conditions, and the types of conditions available, then link to the relevant sections in the Modeller area on how to configure them in each modeller (which don't currently exist).
jurgenhaas
1 day ago
Absolutely, like your ideas on that. Hope, we can either find the time to work on all that or people who want to help. It's a lot going on these days :slightly_smiling_face:
Edited by jurgenhaas