Tuesday, April 11, 2023

#960 OIC 23.04 New Features - Events



What are OIC Events?

OIC 23.04 introduces Events. For many of you with a SOA Suite background, think of EDN. For OIC Gen 2 users, think of the Publish/Subscribe pattern. 

Here we have the ability to define events in OIC. These events can be published by an integration. 23.04 also gives us Triggers base on Event Subscriptions; e.g. integration A can publish a NewOrder event, while integration B can subscribe to the NewOrder event.

OIC Events - Simple Demo

Events are a first class citizen in OIC - as you can see, all you need to define is the event structure -














Next step is to create an integration that "published" the event - for that, 23.04 comes with a new action. A wizard starts, once I drop this on the canvas, allowing me to select from the list of defined events - 


 


As you can see, I can also define a new event inline.

A map for the publish action is also generated - 


In this example, the REST trigger is configured to receive an order which is then published. Th response payload contains the orderNr and status, in this scenario, the latter is set to "published".



Now to subscribing - 














23.04 brings augers the arrival of a new integration pattern - Event Subscription.

Here you just select the event to which you want to subscribe - 


The only logic I add is a Logger, logging the incoming orderNr.

I activate both integrations and then revisit the Events page -  


Usage is 2 - the publisher and subscriber.


Now to testing - 


That's the order published, now let's check in OIC -> Observability





Summa Summarum 

OIC events enable one to easily implement the publish/subscribe pattern within OIC. 

Events can be consumed up to 24 hours post publish. 

OIC Events are yet another compelling string to the bow of OIC developers!

No comments: