Hey there,
I'm using the SPLITTER to split a message with several tickets IDs. For each Ticket I'll get the detail information. Based on those information I want to skip some of those tickets and don't want them to be gathered in the next step. I thought I solved it with a router in between, letting the "false" case go into an end step. But a router is not allowed betweend Splitter/Gather. What else can I do to skip some of those tickets?
Thanks,
Chris
Help others by sharing your knowledge.
AnswerRequest clarification before answering.
Simply use a Content Modifier to return an empty xml tag (whatever tag you're gathering) before the gather step. I use this approach in all flows, although I must say that I always use an xpath in my gather step. But an empty body will always to the trick.
If a single CM with an empty body doesn't work, try using two: The first sets a property that you leave empty (type constant with no value) and the second sets the body to that property (${property....})
EDIT2:
For some reason my pictures are not getting uploaded. So here's a text version:
<employees>
<employee>
<field1>...</field1>
<field2>...</field2>
<...>
</employee>
<employee>Before the gather step, I use a mapping to map my source XML to my target XML. Before that, there is a router that, based on the source XML, decides if the employee in question needs to be processed:
That last bit will result in the gather step not 'gathering' anything because there is no <employee> tag in the body for that segment.
Even better: If for whatever reason, the steps between the splitter and gather generate an XML that does not have that structure(<employees><employee>.......</employee></employees>), it will simply be ignored and not added to the result.
I hope this helps
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Chris,
You can leverage Content Filter instead of Router. Refer the below blog and in the end I have showed how to use it effectively.
https://blogs.sap.com/2017/06/01/sap-cloud-platform-integration-content-filter-in-detail/
Regards,
Sriprasad Shivaram Bhat
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I was also not aware that we don't necessarily need the gather step! I thought it's mandatory and like an endloop step. But without it I can use a router as planned
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That's an example.
A ticket is valid if
ExecutionDueDate - EstimatedInternalWork(in Days) <= today
<root>
<element>
<id>3511-9-807</id>
<versionTag>6</versionTag>
<fields>
<BillingObject/>
<Classification>1</Classification>
<Description>wöchentliche Inspektion</Description>
<EstimatedInternalWork>2</EstimatedInternalWork>
<ExecutionDueDate>07.08.2020 22:00:00</ExecutionDueDate>
<Note>o Vorortbegehung und Inspektion sämtlicher baulicher und gebäudetechnischer Anlagen o Beurteilung und Bewertung der fachgerechten Installation von baulichen und gebäudetechnischen Anlagen sowie deren Betriebsverhalten o Mängel und Auffälligkeiten sind zu dokumentieren o Durchführung von Massnahmen zur Gewährleistung der integralen Sicherheit an sämtlichen baulichen und gebäudetechnischen Anlagen des Objektes zur Sicherstellung der ordnungsgemässen Funktionalität (Funktionsprüfung) • Einleitung von notwendigen inspektionsbedingten Massnahmen zur Wiederherstellung des SOLL-Zustandes wie z.B. Durchführung zusätzlicher Wartungen, Instandsetzungen, Sanierungen oder Verbesserungen</Note>
<OperatorId>0-9-30337</OperatorId>
<TicketNumber>20200804.14</TicketNumber>
</fields>
<records>
<BillingObject>
<value/>
<text/>
</BillingObject>
<Classification>
<value>1</value>
<text>Inspektion</text>
</Classification>
<Description>
<value>wöchentliche Inspektion</value>
<text>wöchentliche Inspektion</text>
</Description>
<EstimatedInternalWork>
<value>2</value>
<text>2</text>
</EstimatedInternalWork>
<ExecutionDueDate>
<value>07.08.2020 22:00:00</value>
<text>07.08.2020 22:00:00</text>
</ExecutionDueDate>
<Note>
<value>o Vorortbegehung und Inspektion sämtlicher baulicher und gebäudetechnischer Anlagen o Beurteilung und Bewertung der fachgerechten Installation von baulichen und gebäudetechnischen Anlagen sowie deren Betriebsverhalten o Mängel und Auffälligkeiten sind zu dokumentieren o Durchführung von Massnahmen zur Gewährleistung der integralen Sicherheit an sämtlichen baulichen und gebäudetechnischen Anlagen des Objektes zur Sicherstellung der ordnungsgemässen Funktionalität (Funktionsprüfung) • Einleitung von notwendigen inspektionsbedingten Massnahmen zur Wiederherstellung des SOLL-Zustandes wie z.B. Durchführung zusätzlicher Wartungen, Instandsetzungen, Sanierungen oder Verbesserungen</value>
<text>o Vorortbegehung und Inspektion sämtlicher baulicher und gebäudetechnischer Anlagen o Beurteilung und Bewertung der fachgerechten Installation von baulichen und gebäudetechnischen Anlagen sowie deren Betriebsverhalten o Mängel und Auffälligkeiten sind zu dokumentieren o Durchführung von Massnahmen zur Gewährleistung der integralen Sicherheit an sämtlichen baulichen und gebäudetechnischen Anlagen des Objektes zur Sicherstellung der ordnungsgemässen Funktionalität (Funktionsprüfung) • Einleitung von notwendigen inspektionsbedingten Massnahmen zur Wiederherstellung des SOLL-Zustandes wie z.B. Durchführung zusätzlicher Wartungen, Instandsetzungen, Sanierungen oder Verbesserungen</text>
</Note>
<OperatorId>
<value>0-9-30337</value>
<text>Stehli Kevin</text>
</OperatorId>
<TicketNumber>
<value>20200804.14</value>
<text>20200804.14</text>
</TicketNumber>
</records>
</element>
</root>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Chris,
Quick question if its valid XML and you derive XPATH its easy to use Content Filter. Please share the input XML will try to help you with Condition ( for both valid or invalid ).
Regards,
Sriprasad Shivaram Bhat
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sriprasad,
thank you, I saw this post already. I can't use the filter because I have to do several calculations to determine if a ticket is valid or not. So I don't see how I can use the filter...
Thanks,
Chris
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.