on 2016 Jul 26 8:14 AM - last edited on 2024 Feb 04 6:05 AM by postmig_api_4
Hi Experts,
We have requirement where we need to push the data in two different data hub adapter based on some condition.Actually, we have different instances of hybris server and data hub adapter but having single instance of data hub. If A condition machted then A data adapter should be called else my B data adapter instance should be called. How can i achieve this requirement with help of data hub?
Thanks in advance,
Request clarification before answering.
I would disagree with this approach (recommendation at the end) but here is how to do it :
It is assumed that you have 1 single pool and this single pool is published to 2 separate target systems. Some canonical shall be published to the 1st system and others to the 2nd, but never both.
You have to write a publication handler where most of the logic is in the following 2 methods.
public <T extends CanonicalItem> boolean isApplicable(T item, TargetItemCreationContext context)
public <T extends CanonicalItem> List<T> group(T item, TargetItemCreationContext context)
isApplication will check both the context.getTargetSystemPublication().getTargetSystem().getTargetSystemType()
and the logical condition. The group method would simply return an empty list if the canonical item shall not be published to this target system.
I would recommend you instead to create 2 pools and 2 feeds. Each pool has its own target system. In this case, it is the source system which choose the feed->destination.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
we have a similar scenario where we have source as hybris commerce and order with entries has to be sent to different target sap system depending on the type of the product or warehouse of the product. Or in otherwords each consignment is send to a different system based on the criteria.
i see you mentioned above that we can create different pools to have different target systems, could you please help me with that approach or configuration for creating different pools and handling the data routing.
Thanks in advance
User | Count |
---|---|
7 | |
2 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.