When the tag query parameter is used in the Inbound Messages API, the message FlowFile is attributed with the value provided. This allows flow designers to use the RouteOnAttribute processor to route each incoming message to the appropriate downstream flow within their canvas.
To configure the RouteOnAttribute processor for tags, a dynamic relationship must be added for each tag that requires routing. These dynamic relationships are defined as custom properties within the RouteOnAttribute processor, including the tag relationship and an evaluation statement.
To configure tag relationships:
-
Go to the Properties configuration for the RouteOnAttribute processor.
-
Add a new property ('+' button).
-
Define the property name for the tag relationship, e.g., "tagName_relationship".
-
Set the property value to an Expression Language statement that evaluates to true (or false) for the tag expected, e.g., "${im.tag:equals(‘tagName’)}"
"im.tag" is the name of the attribute added to the FlowFile. The tagName entered in the statement must match what is sent through the API query parameter.
Once all dynamic relationships are defined and applied to the processor, they can be used for downstream processor connections.
Example:
Tag "po" and "asset" are sent through Inbound Messages API, indicate the BOD message coming to the system. In Dataflow Studio, each tag needs to be routed to a different BODToEAM processor for the appropriate BOD Type selection to ensure processing once it reaches EAM.
In the RouteOnAttribute processor, a dynamic relationship property must be added and defined for each tag:
Once entered and saved, these newly defined relationships are shown in the Create Connection dialog and in the processor Relationship tab.
These dynamic relationships allow each tag ("po" and "asset") to be connected and routed to the appropriate BODToEAM processor, for its corresponding each BOD type into EAM.
Using this as our example, the flow from Inbound Message queue to EAM may look something like the below: