Skip to Content

How to use Router in HCI

Hi Experts,

This is my scenario:

The Process Call will call a local process that would call a RESTful GET web service. The response of the web service is either HTTP Status 200 or 206. Hence, I used the following condition in my Router: ${header.CamelHttpResponseCode} = '200' for OK. NOT OK is the default since the initial call always ends up in this status so I have to loop the call again until it becomes 200 / OK.

When I try deploy the iFlow, I'm not getting any errors but it's not getting deployed.

If I remove the Router and simply routes the Reply to the End event, it's getting deployed successfully.

Any ideas why? Did I use the router here incorrectly? I've also tried using it in the parent process but to no avail.

Thanks in advance!

capture.png (70.3 kB)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • Best Answer
    Jan 23, 2017 at 07:05 AM

    Hello Mark,

    There is a way to do it.Its not required to have Router in this Location Integration Process.

    I guess you want to loop this Local Integration Process to make sure you will go ahead once you get the status code 200 OK.You can right click on the Process Call and make it as Looping Process.When you get a HTTP Response Code as 206 looping process will get triggered again and when it returns you 200 call will get completed sending back the data to main integration process.

    Regards,

    Sriprasad Shivaram Bhat

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Sriprasad,

      Thanks for the info. Yep, I've actually tried that as well as shown in the snapshot but it doesn't seem to iterate. Since the first call always ends up in 206, I'm expecting the Process Call to trigger the Local Integration Process but it just moves forward to the last Modifier right away.

      capture3.png (88.3 kB)
  • Jan 23, 2017 at 05:18 AM

    Hello Mark,

    Could you please check in your Component status overview once ,if Integration project in error could you please share the tail log.

    Regards,

    Sriprasad Shivaram Bhat

    Add comment
    10|10000 characters needed characters exceeded

    • Hi Sriprasad,

      If I point the Router to both End Events, then I can deploy the iFlow successfully. So I guess it's not possible to assign the Router to a Request Reply Service call. In that case, how can I make a loop to trigger the GET request while it's still not 200?

      capture2.png (24.2 kB)
  • Jan 23, 2017 at 07:28 AM

    Hello Mark,

    I have tried the above one it worked fine for me it works like While() loop.Could you please share the output after the Process Call I think it should have both 200 and 206 status code response.

    Regards,

    Sriprasad Shivaram Bhat

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 23, 2017 at 07:55 AM

    Hello Mark,

    Yes I got your point it works as While() loop not Do..While () .I can see 2 messages just before Request Reply can you verify whether it contains both 200 and 206 responses,can you just verify those.?

    If both the status messages are present Looping Process works fine and it will return the messages which satisfied the condition and it will not return when condition gets failed.

    Let me check on the earlier solution which you proposed and revert back with my findings or any options.

    Regards,

    Sriprasad Shivaram Bhat

    Add comment
    10|10000 characters needed characters exceeded