- Issue created by @gaelicmichael
- πΊπΈUnited States gaelicmichael
And as a side-note, I can't get even the value in a CT-specific field of the triggering node ("entity") to appear in the email.
The value
[node:title]
does get rendered... but not[node:field_my_custom_name]
. Why??Clear, explicit examples in documentation would be welcome.
- πΊπΈUnited States gaelicmichael
In fact, I've just determined that the problem must just be the use of tokens.
The ENTITY: LOAD REFERENCE Action does seem to be working, but the custom fields in the loaded entity are not being rendered.
Let's say that the token for the loaded entity is
entity_ctb
.The token
[entity_ctb:title]
does work but[entity_ctb:field_ctb_text]
does not. Why? This ought to be simple. - π©πͺGermany jurgenhaas Gottmadingen
Have you tried the token browser for the correct syntax of the token? That browser is available below the property panel in the bpmn_io UI if you have the token module installed and enabled (which is optional).
In that browser you can not only see what fields are available for each entity type but also the correct syntax. Often, the syntax depends upon the used field type, so e.g. the syntax for your example could probably be something like
[entity_ctb:field_ctb_text:value]
, but I can't tell for sure as it really depends on the data structure for each field. - πΊπΈUnited States gaelicmichael
I don't see any reference to a Token Browser on the Property Panel on the bpmn_io UI.
I have enabled all of the ECA modules that were installed by default. I do not see any mention of a Token Browser on this page:
https://www.drupal.org/project/eca/ βCan you please be more specific?
- π©πͺGermany jurgenhaas Gottmadingen
It's a different module: Token β
When you install and enable that, you get a link to the token browser. And if you want to know more about tokens in ECA. then this page is certainly interesting: https://ecaguide.org/eca/concepts/tokens/
- πΊπΈUnited States gaelicmichael
It is working now and the only thing that I changed was installing the Token module. This suggests that, contrary to the documentation, the Token module is actually required for the normal functionality to work.
I did read that webpage https://ecaguide.org/eca/concepts/tokens/ and did not find it very satisfying. It is not always clear and it is not complete. It is not sufficient to only discuss trivial examples, like the use of the title and mail fields. In real world settings, people are going to want to use the fields defined in their own Content Types.
In order to be useful, the documentation needs to discuss somewhere, whether on this page or another:
- How to use and refer to fields in custom Content Types, with real and non-trivial examples.
- How to access the fields in a Content Item that is referred to by an Entity Reference field (i.e., need to use the ENTITY: LOAD REFERENCE Action). Again, non-trivial and real world examples with clear explanations are needed.
I'm sorry if I sound frustrated, but I've spent two weeks trying to get ECA modules to work that should have been possible in less than a day.