cancel
Showing results for 
Search instead for 
Did you mean: 

Router Step is only working in one condition

joel_langoyan
Participant
0 Kudos
429

Hi Experts,

Please help enlighten what I'm doing wrong or what I'm missing. I have below iFlow which splits and routes the input payload based on the Movement_Type value. Just to mention, the splitter checks for Report_Data. I have defined the following conditions:

//Movement_Type = 'N'

//Movement_Type = 'U'

//Movement_Type = 'D'

I have also tried using the following:

//Movement_Type[text() = 'N']

//Movement_Type[text() = 'U']

//Movement_Type[text() = 'D']

However, for some reason the router only works in when the type is D as seen in the simulation. I also tested with the iFlow deployed and same thing happens.

This is my input.

<Report_Data>
	<Report_Entry>
		<UserName></UserName>
		......
		<Manager_ID></Manager_ID>
		<Events>
			....
			<Movement_Type>N</Movement_Type>
			....
		</Events>
	</Report_Entry>
</Report_Data>
<Report_Data>
	<Report_Entry>
		<UserName></UserName>
		...
		<Manager_ID></Manager_ID>
		<Events>
			....
			<Movement_Type>U</Movement_Type>
			....
		</Events>
	</Report_Entry>
</Report_Data>
<Report_Data>
	<Report_Entry>
		<UserName></UserName>
		...
		<Manager_ID></Manager_ID>
		<Events>
			....
			<Movement_Type>D</Movement_Type>
			....
		</Events>
	</Report_Entry>
</Report_Data>         

Accepted Solutions (0)

Answers (1)

Answers (1)

alex_bundschuh
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Joel,

your sample XML doesn't have a root node but then the iterative splitter would already fail which I guess is not the case, I take it that D is the default, so it always performs the default route because your xpath seems to be wrong, the only idea that I have is that the expression type of your routing rule is wrong, you need to select XML?

Alex

joel_langoyan
Participant
0 Kudos

Hi Alexander,

The sample XML is intentional as the Report Data are grouping for Report Entry based on Movement type value. I updated the iflow for clarity and update the conditions. Now, the D also gets routed as well to the not D route as if it got multicast. The Gather should have only those N and U.