Catenis Flow Guide

List Permission Events Node

The “List Permission Events” node retrieves a list of system defined permission events. Permission events are specific actions that can be set to either “allow” or “deny” at 4 different levels (see setting permission rights). The events are specific actions that can be taken based on what permission is set and at what permission level. All permission events are set on the device you want to allow or deny interactions with. This device is referred to as being the subject device or controlling device (the device that controls what can or cannot be done to it) and sets it’s permissions as to which other virtual devices can or cannot interact with it based on any given event (an event being an action the other devices wishes to perform on the subject device). Please see how permission are evaluated here.

Image of the List Permission Events Node

Node Properties Panel Field Description

Node property configuration slide-out panel (this panel is accessed by double-clicking on the node).

2020-07-27_21-15-37
Properties Configuration Panel of the List Permission Events Node

Node-RED Specific Fields

  1. Name Field:  Add a descriptive name of your choice that will help differentiate this node from others of the same type on the Node-RED workspace (not required).
  2. Connection Field: This drop-down selection is required.  Set a previously configured Catenis connection (virtual device) that you want to list the permission events for. If you need to configure a new virtual device click the pencil button to the right of the field and follow the direction on setting up a new virtual device that can be found here.

List of events that permissions can be set for

Permission rights can be set for these events to either “Allow” or “Deny” at 4 different levels:

  1. receive-notify-new-msg: Receive notification of new message from a device
  2. receive-notify-msg-read: Receive notification of message read by a device
  3. receive-notify-asset-of: Receive notification of asset received for assets issued by a device
  4. receive-notify-asset-from: Receive notification of asset received from a device
  5. receive-notify-confirm-asset-of: Receive notification of confirmation of pending asset issued by a device
  6. receive-notify-confirm-asset-from: Receive notification of confirmation of pending asset transferred by a device
  7. send-read-msg-confirm: Send read message confirmation to a device
  8. receive-msg: Receive message from a device
  9. disclose-main-props: Disclose device’s main properties (name, product unique ID) to a device
  10. disclose-identity-info: Disclose device’s basic identification information to a device
  11. receive-asset-of: Receive an amount of an asset issued by a device
  12. receive-asset-from: Receive an amount of an asset from a device

How to use interactively

This node can only be used in interactive mode. Interactive mode allows the end user to click on the action button attached to the left of the node. This action triggers the Catenis API method passing the parameters set in the node’s properties slide out panel.

  1. Drag and drop this node from the Catenis Flow pallet area to the Node-RED workspace. Double click it to display its properties slide out panel.
  2. On the “Device” drop-down field of the properties slide out panel choose the Catenis virtual device you previously configured. The virtual device is a configuration node containing the Catenis Virtual device information (device ID and API Secret key).
  3. Wire this node to a debug node.
  4. Click the red “Deploy” button on the upper right hand side of the Node-RED dashboard to deploy this flow. 
  5. To test the flow: click the square gray box attached to this node on the left. A JSON object containing all possible permission events should now be printed onto the debug sidebar.

Example Flow - Import Into Node-Red to Get Started


[{"id":"a7b32606.0a4288","type":"tab","label":"Flow 14","disabled":false,"info":""},{"id":"dd7b6586.ddd808","type":"list permission events","z":"a7b32606.0a4288","name":"","device":"","x":360,"y":120,"wires":[["8e1339a2.e07288"]]},{"id":"8e1339a2.e07288","type":"debug","z":"a7b32606.0a4288","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":630,"y":120,"wires":[]},{"id":"ef20eaba.879548","type":"comment","z":"a7b32606.0a4288","name":"Set virtual device for this Catenis node","info":"All Catenis nodes require that you set the proper virtual device on its slideout property panel on the device field.\n\nNot setting the device properly will result in a \"TypeError: Cannot read property 'ctnApiClient' of null\" ","x":390,"y":80,"wires":[]}]

Note: After importing this flow you will need to set the Catenis Flow node(s) in this flow to use a previously configured virtual devices. Instructions on how to set up your virtual device on Node-RED can be found here: https://blockchainofthings.com/docs/configure-your-first-virtual-device-on-catenis-flow/

Related Articles

CompanyElement_SM_LightBackgrounds
How can we make things Better for you?
  • Accepted file types: jpg, gif, png, pdf.
  • This field is for validation purposes and should be left unchanged.