AnsweredAssumed Answered

Process Documents individually after Splitting

Question asked by iyshwarya.x.gopalan.-nd984266 on Aug 21, 2018
Latest reply on Aug 27, 2018 by iyshwarya.x.gopalan.-nd984266

Hi all,

 

I have a json file and I'm passing this file to a process call. Here I am splitting the documents based on the episodeproductid and checking if the ID in each document  exists in DB and routing to 2 different flow using decision shape. 

 

 

 

Given below is the sample JSON before splitting. 

 

{ 
"products":[ 
{

"Id":1234
"ProductNumber":54316,
"ProductId":73310128,
"title":"ABC",
"titles":[

],
"episodes":[ 
{ 
"episodeProductId":182700,
"Number":1,
"title":"TBD",
"titles":[

]
},

{ 
"episodeProductId":182724,
"Number":2,

"title":"TBD",
"titles":[

]
},

]

}

]

}

 

After splitting document-1  is                                                              

{                                                                                     
"products":[ 
{

"Id":1234
"ProductNumber":54316,
"ProductId":73310128,
"title":"ABC",
"titles":[

],
"episodes":[ 
{ 
"episodeProductId":182700,
"Number":1,
"title":"TBD",
"titles":[

]

}

]

}

]

}

and document2 with the episodeProductId=182724. I tried storing the episodeProductId  in DPP .

For eg if ID  182700 exists in DB , it is routed to the corresponding flow  and for the second ID(182724)- Say it does not exist in DB, ideally it should follow a different route. But both documents follow the same route.Looks like the Process property is overwritten.

 

Can someone please help me to achieve this.

 

Thanks in Advance.

Outcomes