Welcome to docs|Reactions|Updating reaction definitions

Updating reaction definitions

This page describes how you update Reaction Definitions in Serialized.

Serialized supports updating Reaction Definitions in a similar way to creating a reaction definition.

Updating a reaction definition does not affect any already triggered or scheduled reactions. The updated definition will only be used to trigger new reactions from the point in time when it is saved.

If you also want to cancel existing reactions, you need to delete the reaction definition and create a new one, or perform cancellation operations on the existing reactions.

Updating a reaction definition

To update a reaction definition is very similar to creating a reaction definition. The following example shows how to update a reaction definition that is configured to send notifications every time an order is placed. In the update request the feed name order and the event type OrderPlaced as well as an HTTP action.

ReactionDefinition request = newReactionDefinition("notify-on-order-placed")    .feed("order")    .reactOnEventType("OrderPlaced")    .action(httpAction(URI.create("")).build())    .build();reactionClient.createOrUpdateDefinition(request);
const request = {  reactionName: 'notify-on-order-placed',  reactOnEventType: 'OrderPlaced',  feedName: 'order',  action: {    actionType: "HTTP_POST",    targetUri: ''  }}await reactionsClient.createOrUpdateDefinition(request);