Group nodes in ACE



Group nodes in ACE are the new set of nodes that has been released in IBM App Connect Enterprise. If you are familiar and have worked on aggregation nodes earlier, then working on group nodes is easier. Group nodes are nothing but aggregate nodes that are used for aggregation style operations. The only difference between these two is that Aggregate nodes require local  queue manager to be associated with Integration node whereas group nodes does not need local queue manager associated with integration node.

One might wonder what is the use of group node when we can make use of association with queue manager for a node and use aggregate node. Consider the example of flows deployed over cloud. In these cases, there is no queue manager associated with an integration server thus making it impossible to use aggregation nodes. To overcome this, Group nodes are bought into picture wherein the coordinated data will now be held in memory instead of queues. Also in cases where Queue manager is not required, group nodes can be used.

The group nodes consists of a set of three nodes in total
1) Group Scatter node
2) Group Gather node
3) Group Complete node

Group Scatter node is similar to Aggregate Control node
Group Gather node is similar to Aggregate Request node
Group Complete node is similar to Aggregate Reply node

Below is the sample use case to demonstrate the use of Group nodes.

Assumptions:

  • The below flow only talks about success scenario and does not handle error scenarios
  • Use is familiar with aggregation concepts.
  • Input will be dummy input and data is constructed in the ESQL code( just for explanation)
  • The output is also dummy data and does not include all relevant fields


Scenario:

Assume that a user wants to know the flight related information from source to destination along with the hotel information at the destination so that he can decide whether to go for flight + hotel booking or only flight booking. 

In order to achieve this, we will be making use of group nodes concept in ACE.

The application is divided into 4 message flows [groupScatterFlow, groupGatherFlow, groupCompleteFlow, FlightAndHotelProcessingLogic flow]

Flow 1: GroupScatterFlow
  • The input to this flow will be a dummy request in JSON format that sends data to to Group Scatter node.
  • In the compute node, we would copy the Local Environment details in Environment variables. Please note that for Group nodes, the Environment variables is expected to be of this format.
  • The input message is then sent to two callable async invoke nodes for them to retrieve flight and hotel details respectively.


Flow 2: FlightAndHotelProcessingLogic.msgflow

This flow constructs message in ESQL for flight and ticket details and sends back the response. I have added logic manually here just for this blog. Ideally it will be a call either to external service or database invocation.




Flow 3: groupGatherFlow

This flow will receive the messages constructed in flow 2 and group Gather node will consolidate the messages


Flow 4: groupCompleteFlow

This flow will sends the consolidated output as a response to the originator. Please note the mapping in ESQL that is being done.






Flow Exerciser values for reference


Input and Output Message



For more details on node properties, please refer IBM link





10 comments:

  1. Nice Prasad... Very informative and helpful

    ReplyDelete
  2. Well explained Prasad. Very informative.

    ReplyDelete
  3. Hi
    It was nice. But little confused in scatter flow where compute node is connected to two asyn invoke nodes but in the esql it is not mentioned for propagation.

    ReplyDelete
    Replies
    1. In the ESQL it was written as "RETURN TRUE;". It indicates as control going via out terminal.

      Delete
  4. Hi prasad, can you help me with PI and test data.

    ReplyDelete
  5. This comment has been removed by a blog administrator.

    ReplyDelete