Dynamic Content Based Router - Forum - Technology Partner - Progress Community

Dynamic Content Based Router

  • Hello

    I try to implement "Dynamic Content Based Router" by this article http://www.psdn.com/library/entry!default.jspa?categoryID=1220&externalID=2141&fromSearchPage=true

    I created DCBR service and use him in my process.

    See attachments dcbr.gif and dcbr2.gif for details.

    But when scenario runs, following exception occurs:

    com.sonicsw.xq.XQServiceException: XCBR rules URL could not be resolved:

    Why is it happens?

    Where is an error?



  • I can't find the article, but the general issue is that you can't have a blank parameter for the XCBR rules file in the step definition.  That is, you can't get the XCBR content from a message part (which seems to be what you were trying to do).

  • I've got an XCBR routing rules file defined to operate on Message Part at Index 0.  I want to route to all legs defined ... period.  It's not really a recipient list driven by the message content as simply a router to all.  I get the same exception as the original poster here and I'm not trying to get the rules from the message, the xcbr rules file for the CBR service is in the sonicfs.  Still I get this error in the container log file:

    [10/11/23 10:40:55] ID=dev_ESBTest (severe) [Dispatch] Exception calling service C2CUnitStatusUpdateRouterCBRService: message rejected
    [10/11/23 10:40:55] ID=dev_ESBTest (severe) Trace follows...
    com.sonicsw.xq.XQServiceException: XCBR rules URL could not be resolved: null
        at com.sonicsw.xq.service.xcbr.XCBRService.service(XCBRService.java:170)
        at com.sonicsw.xq.service.xcbr.XCBRService.service(XCBRService.java:134)
        at com.sonicsw.xq.service.cbr.CBRService.service(CBRService.java:86)

        ... clipped off ...

    The message content root node in part 0 of the message will be .  I want to route this incoming message to several secondary processes.  Only one needs to respond to the requestor, the others just go and do their incremental units of work.

    First, I need to understand why the exception above when the service is called.  Second, is using a route to all configuration on the XCBR the best way to get an incoming message to several, known in advance, independent processes which can process in parallel?  I have absolutely no need to merge the results from the independent branches so a Split Join Parallel does not seem to make sense here.

    What Xpath expression could be used to simply always result in a true test to route to the Rules Address specified in the XCBR rules file?  I'm using "count(/*[local-name() = 'UnitStatusUpdate']) > 0" and that passed the evaluation test in the Xpath Helper.  However, I don't think it is even getting to the evaluation steps for the XCBR file because the exception kicks in beforehand.


  • Hello

    Could you provide an screenshot of your configuration SMC and workbench.

    This kind of error occurs when you does not specify the path to the rule files at the process level.


    Chan Jeremy

  • Hello

    The error you are facing happens because you did not provide an xcbr rule file at the level process (I don't say that it is a regular behaviour^^)

    If you want to use CBr as a dynamic router you should split your process.

    the process should just had the xcbr part and send it directly to the CBR entry point.

    The CBR will dynamically use the part specified as an init param.


    Chan Jeremy

  • Jeremy, thanks for the reply.  You asked me to provide some screenshots of my Workbench.  Here are three screenshots.

    1. CBR Process - SonicConnect operation routes to this CBR process.
    2. CBR Service - the CBR process contains this CBR Service which specifies the XCBR file in its init parameters
    3. CBR Service XCBR rules file - the same Xpath expression is used for all branches - they will all evaluate to true to dispatch to all legs.

    The rule, count(/*[local-name() = 'UnitStatusUpdate']) > 0, evaluates fine.  I could not figure out why the process or service would throw the exception trying to locate the XCBR file in the fs.  It is there.  The URL which specified it at the service level was correct (selected right from the browse to file option).  It is working now as designed, but it perplexes me because I don't know what changed other than I toggled Intra-Container messaging off, restarted, tried it, it worked once, then I toggled it back on, restarted, tried it, it still worked.  The exception went away and it can now find the XCBR file.  It makes no sense to me, maybe it does to someone else.

  • Chris,

    In fact you have configured the cbr service at process level with the runtime parameters.

    Init parameters are set from SMC or with a service configuration file (only in 8.0).

    Did you test the webservice with a wsclient such as soapui?

    to do this you need to deploy the process in a container and reload the esbcontainer at each update of the process.

    a good practice is to test WS (with a client)  in an assembly environment and to avoid deploying process in the development stage.

    furthermore I can see that you did not create a test scenario for the ESBProcess. You should create test scenario to validate your ESBProcess before testing the WS.


    Chan Jeremy

  • I see what you are referring to when you say my XCBR rules file was configured as a runtime parameter.  I didn't pick up on this initially because see the attached picture of the actual SMC and the Domain.  The service itself which was uploaded, I specified the same XCBR rules file as the service's Init parameter.

    I'm still not clear why you consider this a "process level" configuration.  There is a process, but the process contains a distinct service which is of type CBR Service with it's own specified XCBR init parameter.  Can you elaborate on this having now seen my SMC screenshot here?  Again, I greatly appreciate your responses and insights.

  • Chris,

    In fact I did not use the right words.

    By process level I meant with runtime parameters and by service level I meant with init parameters.

    Also keep in mind that runtime parameters override initparameters. In your screenshots, you have configured both but only runtime configuration was needed.

    The first problem of this thread is about a dynamic content router, I made test to make the example to work but I could not set a CBR step in an ESBprocess without setting the xcbr, cbr or js rules files as a runtime parameter.

    furthermore as I wrote in a previous post, when you deploy an ESBPROcess in dev ESBcontainer in order to test it with a WSClient you have to reload the esbcontainer at each update of the process.

    That said, I found two possible issues to your problem.

    1- you did not configure the runtime parameter in ESBProcess => the error is raised

    2- you configure the runtime parameter buit did not reload the ESBContainer => the error is raised again.

    ==>the day after, you restart the container and then it works!!

    If you want to use the init parameter configure your connect project to send the incoming message directly to the service entry.


    Chan Jeremy

  • Jeremy, thanks for the clarifications.  I do find it interesting that a CBR service can't be placed within a process without the CBR or XCBR rules file set as a runtime parameter.  Do you know why programmatically this is required when this service is placed in the context of a process?

  • Hello Chris,

    it seems that this behaviour is not the one that should be expected^^.

    here is an extract of the Workbench developper guide 8.0.1:


    If you specify both Routing Rules and Rules File, the routing rules  override the rules file. If neither the Routing  Rules nor Rules files  are specified as Runtime Parameters,  the corresponding Init  Parameters for the service are used instead.

    It's maybe time to open an incident...


    Chan Jeremy

  • Hi Chris

    Did you get anywhere with this? I'm just starting to dabble in Dynamic CBR and running into what looks like similar problems in 8.5. From what I can see, two things are required

    - Specify a Message Part Name as an INIT parameter on the CBR Service

    - Add a CBR step into a process and leave the XCBR or CBR Rules file and Javascript Rules file parameters empty.

    I get the an Problem when there is no rules file specified:

         Routing file location is empty  

    On the CBR service you need to specify the Message Part with the routing rules in the init parameters.

    Do I need to make sure the two Rules files parameters are empty as well?

    Is it a good idea to create a new CBR instance spacifically for Dynamic routing?

    And more generally about CBR.

    - If I specify a PROCESS as the target of a routing rule, does control return to the main process after executing the called process (just like it was a sub process)?

    - If I specify multiple Processes in the Rule Address part of the XCBR are they just executed in sequential order?