Midhun Mathew
Midhun Mathew

Reputation: 2207

use message from one orchestration as input to another

I have 2 orchestrations in a BizTalk Application. I want to use the output of one orchestration as input to another. Is there a way that I can do this? Can one orchestration used in another orchestration?

Upvotes: 0

Views: 1222

Answers (2)

Mahmoud Shaaban
Mahmoud Shaaban

Reputation: 122

There is a simple solution by passing messages from orchestration to another using send port in the first orchestration that will pass the message to the second orchestration that will receive the message via the receive port bound to the second one.

Upvotes: 1

Dan Field
Dan Field

Reputation: 21641

There are several ways to do this:

  1. Use a Call Orchestration (synchronous, can return a parameter back to the caller) or Start Orchestration shape (asynchronous, fire and forget). Either one allows for variable parameters without promoting properties.
  2. Create a direct bound receive port on Orchestration 2 and publish the message from Orchestration 1 on a direct bound send port. This will always work asynchronously. Passing variables could only work by using mutli-part messages or promoting properties.

There are various design considerations around this:

  • Do you need to return a parameter? (use Call Orchestration)
  • Will Orchestration 2 be called from multiple sources, or only orchestrations (or only one orchestration?) (Direct bound messaging is probably best))
  • Does it make more sense to be able to pass variable parameters along with a message to Orchestration 2? (Call/Start Orchestration) Do you already have a property schema designed for these variables? (Direct bind)
  • Do you need execution of Orchestration 2 to be handled before continuing Orchestration 1? (Call Orchestration)
  • Do you need to handle exceptions that occur in Orchestration 2 in Orchestration 1? (Call orchestration could at least support returning an exception object if necessary)

Upvotes: 4

Related Questions