biztalk Shape

The Receive Shape

enables you to indicate to the Orchestration Engine that you wish to have a message conforming to a particular schema delivered to the orchestration. This message
delivery can be further restricted from the schema type by using a filter.

The general rule is that all orchestrations must start with an activating receive, which means a Receive shape with its Activate property set to True.

The first step before configuring a Receive shape is to create a BizTalk message。

 

The Send Shape

enables you to send a message.Send shapes can be configured to enable delivery notifications。

Flow Control Shapes

❑ Loop
❑ Delay
❑ Decide
❑ Parallel
❑ Listen
❑ Start Orchestration
❑ Call Orchestration

The Parallel Shape

Parallel shape would enable you to process multiple branches at the same time — the business process equivalent of spinning up multiple threads.

在Parallel Shape中,不同的Branch可以同时使用同一个变量或者消息。为了防止一个Branch修改一个其他分支(Branch)真在使用的数据,您必需在一个配置为同步的Scope中使用这些消息或者变量,以房子其他的分支修改这些共享的数据。

Parallel Shape可以是Orchetication中的第一个Shape,其他的Shape就不能这样用。在某种情况下,比如,你不确定哪个消息会先到,但是你要求两个消息都到达,你可以把两个Receive Shape放置在一个Parallel Shape中,当第一个消息到达后,第一个消息可以继续处理,而另外一个分支继续等待另外一个消息的到达。

The Listen Shape

侦听通常由多个分支组成,但是只有一个分支能成功。比如第一个分支中有个Receive Shape侦听消息,另外一个分支为一个Delay Shape延迟一个时段,如果在这个时段内,消息到达,则走第一个分支,否则,则走另外一个分支。

采用Listen Shape可以实现Send-wait-retry模式。

另外一种应用场景可以是这样的:你可能会接收2个或者2个以上的不同的消息,但是你不能事先预知哪个先到。你可以在Listen Shape中设置多个分支,每个分支中有一个Receive Shape来接收不同的Biztalk Message,第一个到达的Message将赢,其他的分支将会终止。另外,Listen Shape是从左至右的执行,因此,如果两个消息同事到达,最左边的包含Receive Shape的分支将会执行。

The Start Orchestration Shape

The Start Orchestration shape is used to invoke another BizTalk orchestration asynchronously, thus enabling the calling or parent orchestration to continue processing.

警告:采用Start Orchestration Shape调用Orchestration实际上就建立了两个Orchestration之间的关联,这就要求这些Orchestration要按照正确的顺序部署和停止/启动。修改其中一个Orchestration可能要求其他的也要做相应的修改,这会导致两个都需要重新部署。这样两个Orchestration就紧密的耦合了,要解除这种耦合,你可以采用逻辑端口(Logical Ports)中的直接绑定(Direct Port Binding)。

在调用其他的Orchestration的时候,被调用的Orchestration可能在其他的Biztalk Host上面,这样会带来性能的开销(Overhead),有时候,因为这种性能的开销,会要求你在Call和Start 两个Shape之间进行取舍。

The Call Orchestration Shape

The Call Orchestration shape, like the Start Orchestration shape, enables you to invoke another orchestration — the difference being that this invocation is done synchronously, meaning that the calling or parent orchestration must wait for the invoked orchestration to complete before processing can continue. 和Start的区别是,Call是同步的,而Start是异步的。这样,Parent Orchestration和Sub Orchestration是在同一个Biztalk Host上,这个调用是在内存中进行的,而不是跨应用程序域进行的,因此不会带来很大的性能的开销。

 

The Construct Message shape

The Construct Message shape allows only the Message Transform and Message Assignment shapes to be
dragged within its scope.

 The Message Transform shape

The Message Transform shape allows a message to be created following execution of a BizTalk Map.

The Message Assignment shape

as the name implies, allows messages to be constructed from other
messages and is primarily used to assign an existing message to another and to then perform modification.
It also enables messages to be created from .NET types, XmlDocuments, and so on. As discussed
earlier, messages are immutable, and therefore the Message Assignment shape must be used in order to
construct a new message based on another, which can then be modified while in the scope of a Construct
Message shape.

 

The Expression shape

enables you to enter any expression you choose in your orchestration. For example, you can make a .NET call to run an external program, or simply manipulate the values of your orchestration variables.

While the Expression shape is quite flexible, it is not good practice to use it to perform high-level orchestration logic, which preferably would be visible in the orchestration drawing itself. In general, it is easier to understand and maintain your orchestrations if your Expression shapes contain simple and modular expressions.

To configure an Expression shape

  1. If BizTalk Expression Editor is not visible, right-click the Expression shape and click Edit Expression or, in the Properties window, click the Ellipsis (...) button for the Expression property.
  2. In BizTalk Expression Editor, create an expression to assign values. For more information, see BizTalk Expression Editor.

posted @ 2010-02-26 13:44  jiangchao  阅读(284)  评论(0编辑  收藏  举报