Create action for ECA

Created on 31 August 2022, about 2 years ago
Updated 24 January 2023, almost 2 years ago

Problem/Motivation

We would like to be able to post Slack messages using the ECA rules framework .

Steps to reproduce

It does not appear this already exists.

Proposed resolution

It looks like the ECA module by default includes all actions registered with Drupal core. I believe we would need to create a new action that's registered with Drupal core and it would automatically work with ECA?

Remaining tasks

User interface changes

API changes

Data model changes

Feature request
Status

Active

Version

1.0

Component

Code

Created by

🇺🇸United States jweirather Phoenix, AZ

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇺🇸United States smustgrave

    Would a submodule be best for this? Not sure what ECA requires.

  • 🇺🇸United States Glottus

    I had a need for this, too, so I wrote this submodule which seems to work pretty well. It could use some review and polish, however.

    I'm not sure if it's necessary to pass the $entity to the execute() function, for example, and I'm not sure if this strictly depends on the drupal/node, they were carried over from how I had written this for Business Rules and/or other ECA submodules I was using as inspiration.

  • Status changed to Needs review 28 days ago
  • 🇮🇹Italy kopeboy Milan

    Any core action will be picked up by ECA.

    I don't have a Slack server to try but the patch seems good?
    Maybe a doubt about token substitutions: I'm not sure if ECA will automatically apply substitutions or you need to do it in your action code, but it the latter case, I would allow even the channel and user to be tokenized.

Production build 0.71.5 2024