calling a subprocess that uses DBservices, need to add that

Posted by Admin on 10-Feb-2010 11:42

I have an ESB Process that calls a subprocess in another container that uses database services. So Process A, Container A  calls subprocess B, Container B. subprocess B uses database services so Datbase Service has been added to Container B. Also my parent process (A) expects a reply from the subprocess (B).

When I run Process A it complains because I do not have database services added to Container A. I do not want to add it to Container A or have the subprocess run in it either. I just want to call the subprocess, have all the work run in it's own container then reply back to the parent process.

Any ideas on this? thanks

All Replies

Posted by Bill Wood on 10-Feb-2010 15:49

darrenpaul wrote:

I have an ESB Process that calls a subprocess in another container that uses database services. So Process A, Container A  calls subprocess B, Container B. subprocess B uses database services so Datbase Service has been added to Container B. Also my parent process (A) expects a reply from the subprocess (B).

When I run Process A it complains because I do not have database services added to Container A. I do not want to add it to Container A or have the subprocess run in it either. I just want to call the subprocess, have all the work run in it's own container then reply back to the parent process.

Any ideas on this? thanks

The issue here is the statement above "Container A calls subprocess B, Container B".  This is not a correct statement.  Process A may call subprocess B, but ESB calls to subprocesses do NOT go to the entry endpoint of Process B.   When you 'go to a subprocess', what the caller does is that it gets the definition of Process B, looks at the first service (not the Entry endpoint) and goes to that. 

This happens in Container A, in your case.

You did not say it, but I am guessing the Database Service in Container B is deployed without an entry endpoint.

If you add an entry endpoint to the DB Service, then things will work.

In summary, you have a (very common) misconception -- that you need to deploy subprocesses to containers, and that the ESB uses the entry endpoint to invoke subprocesses.  In reality:

  • The Entry Entpoint of a process is ONLY used when you want to expose the process to JMS clients (or HTTP direct/WS-Protocol).
  • Within the ESB, if you go to a subprocess, or dispatch to a process asynchonously, the ESB does NOT use the Entry Endpoint, and instead does this by:
    • Getting the Process definition from the DS
    • Going to the first Service.
      • When the ESB goes to the first service, it follows the same rules that that would do. (is intracontainer on, is the service availlble in the container, and if not, then go to the Entry endpoint of the Service.

This thread is closed