In this quick tutorial, we will cover “Working with the Retrieve Message Container Node”. This video goes through a step-by-step guide on how to implement your own flow that shows you how the Retrieve Message Container node functions.
In this video we will cover:
Prerequisite
Thank you for watching Working with the Retrieve Message Container Node in the Catenis Flow tutorial series. Watch the next video, Understanding the Read Message Node, to further expand your knowledge.
Links from this video for easy access:
To sign up for your free account, head to our website www.blockchainofthings.com.
Join our community forum for the quickest response time to all your questions and concerns. This forum is our customer support. https://forum.blockchainofthings.com
[Music]
Hi, this is Clara for Blockchain of Things.
In this tutorial we’ll create a flow containing
the Retrieve Message Container Node.
If you don’t know what a Retrieve Message Container Node is,
make sure you check out the previous video titled
“Understanding the Retrieve Message Container Node”
Great! Now let’s get flowing.
First, drag-and-drop a Retrieve Message Container Node
from the Catenis Flow palette area
into the Node-RED workspace and double-click
it to display its properties slide-out panel.
Add a descriptive name of your choice to the name field
that will help differentiate this node from others of
the same type on your Node-RED workspace.
On the device drop-down field of the properties slide-out panel,
choose the Catenis Virtual Device you previously configured.
Add the node’s configuration information based on your needs
to each field of the property slide-out panel.
Note, that additional properties can be set by passing a JSON object when handling large content.
Now, click the done button.
Drag-and-drop a Debug Node to your workspace and
wire the Retrieve Message Container Node
to the Debug Node.
Add an Inject Node to the Node-RED workspace
and wire the Inject Node to the Retrieve Message Container Node.
Double-click the Inject Node to open its properties slide-out panel.
In the drop-down payload field, choose the string type.
Enter a Catenis Message ID.
Note, that using this exact message ID
in the string field will produce an error
stating “no permission to Retrieve Message Container” as this example message ID refers to a message that was
placed on the blockchain by a device you do
not own or have permission to access.
Please use your own message ID that you generated
when you logged a message to the blockchain
using the Log Message Node.
Don’t have a message ID?
Complete the tutorial at this link: to generate your own message ID
Now, click the done button and click deploy.
Now, let’s test the flow.
Click this button to open the Debug Sidebar.
Click the button on the left of the Inject Node to send your message ID to the flow.
The Debug Sidebar should display the returned JSON object containing the API call results.
Awesome!
Now that you’ve retrieved the message container information.
What can you do with it?
Copy and save the message container information from the API call results into an external file
and check out our next tutorial to learn how to use this information with the Read Message Node.
[Music]