Tuesday, October 26, 2021

Building end to end RosettaNet application using logic app

In this article I will talk about the RosettaNet integration in logic app by going through all actions offered by logic App.

please read the official documentation first and also you may refer the RosettaNet spec http://xml.coverpages.org/RNIF-Spec020000.pdf for more details.

 

 

Host (Sender) and Guest (receiver) Sequence Diagram 

 

Mohammed_Barqawi_0-1634475274043.png

 

 

Link for the sequance diagram 

 

 

The artifacts in this article are divided into two groups based on the Role  :

For the Host side I have three logic apps running on Host integration account 

  • Initiator
  • Acknowledgment processor
  • Response processor  

For Guest (receiver) I have one logic app running on Guest integration account 

  • Message receiver and Ack and response 

Host Initiator

The initiator flow is described below 

 

Mohammed_Barqawi_2-1634476213745.png

 

 

 

Mohammed_Barqawi_3-1634476256010.png

 

 

 

Steps description

 

1

Initialize var that has the unique message ID(PIP instant identifier )

Here i am using the current time ticks function 

2

The encode action , I am picking the Host and the Gust based on the configured agreement

The message type is action (which mean that it is not a response to anything )

3

The URL of the partner http endpoint can be obtained from the agreement 

4

The Host will wait for the (Ack and response ) form the Sender to be processed 

 




Receiver: Message receiver and Ack and response

Mohammed_Barqawi_4-1634476299965.png

Mohammed_Barqawi_5-1634476358245.png

 

Mohammed_Barqawi_6-1634476400075.png

 

Steps description

 

1

Decode the incoming message that received from the Host 

Once the message received the message can be sent to backend system or store on Blob 

2

The receiver will generate an acknowledgment message 

3

Send the Ack message by getting the http endpoint from the agreement 

4

The receiver will encode a response message 

Note that the message type is Response, and the Role is Responder  

5

Send the Response message by getting the http endpoint from the agreement 

6

Send the response to the http request 




Sender: Acknowledgment processor & Sender: Response processor

 

Mohammed_Barqawi_8-1634476525718.png

 

 

The Acknowledgment processor and the responses processor are the same code, the only needed action is to Decode the message 



Using Azure resource explorer 

 

You may need to log to Azure resource explorer  Resource Explorer (azure.com) to track the Session 

It is extremely useful to see if the message get acked or response

As in the below picture and based on the lines 8 and 9 this message is not Acked and did not received any response  

Mohammed_Barqawi_7-1634476487178.png

 

 

To check the session information, you can go to the below URL 

 

https://resources.azure.com/subscriptions/YourSub/resourceGroups/RG/providers/Microsoft.Logic/integrationAccounts/IA/sessions

Posted at https://sl.advdat.com/3Cijgj5