There are several ways to do this:
- 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.
- 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)