Can I use the Drupal Rules module to update Developer App?

In devconnect_developer_apps/devconnect_developer_apps.rules.inc there is an action for creating a developer app (devconnect_developer_apps_create_app) . I don't see an update_app action there. Is there a way I can create a custom rule to update an existing developer app?

My use case is that when I create a node of a specific content type, a developer app is created via Rules. When the node is updated, I also want to update that app. I'm using a machine name field for the app, which is the machine app name in Apigee.

I appreciate any direction folks can provide!

0 2 161
2 REPLIES 2

Generally you should be able to define new rules and actions in your own custom module. There's also work being done to integrate the Business Rules module, which seems to be the more popular option in D8: https://github.com/apigee/apigee-edge-drupal/pull/289.

If you're writing custom code, also take a look at hook_entity_update() which should be fired when your node is updated.

Thanks, for your reply and confirming that writing a custom Rule is the right direction. I tagged the post D7, but I probably should have specified that this is for D7. Although it's helpful to know that the team is probably going to switch from Rules to Business Rules.

If I end up with something that may be general enough to help others, then I'll post it here.