Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add RulesActions for generating event messages #450

Closed
dannylamb opened this issue Dec 7, 2016 · 0 comments
Closed

Add RulesActions for generating event messages #450

dannylamb opened this issue Dec 7, 2016 · 0 comments

Comments

@dannylamb
Copy link
Contributor

dannylamb commented Dec 7, 2016

Using the EventGenerator service from #445, make three rules actions. One for each write event on a Fedora Resource (Create, Update, Delete).

Here's an example of what the Create action's annotation will look like.

 * @RulesAction(
 *   id = "islandora_generate_create_event",
 *   label = @Translation("Generates a Create event message"),
 *   category = @Translation("Islandora"),
 *   context = {
 *     "entity" = @ContextDefinition("entity",
 *       label = @Translation("Entity"),
 *       description = @Translation("The newly created entity.")
 *     ),
 *   },
 *   provides = {
 *     "message" = @ContextDefinition("string",
 *       label = @Translation("The Create event message")
 *     )
 *   }
 * )

Be sure to set the provided context value instead of returning so the serialized message is available to downstream rules actions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant