Basic Activities
Standard Elements:<source><target>
<invoke>
An asynchronous invocation requires only the input variable of the operation because it does not expect a response as part of the operation.
A synchronous invocation requires both an input variable and an output variable这些属性只在executable processes中有用。WSDL fault 由QName标识,target Namespace of the corresponding portType and the fault name.
一个acitivity可与另一个activity(作为其compensation)关联
<receive>
business process通过<receive>&<reply>向其partner提供服务。<receive>指定了the partner link it expects to receive from,and the portType & operation that it expects the partner to invoke定义一个variable用来接收message data.
The only way to instantiate a business process is to annotate a <receive>activity with the createInstance attribute set to "yes".
Anonoted<receive> acitivities must be initial activities.
<receive>is a blocking activity
<reply>
send a response to a request previously accepted through a <receive> activity.Such response仅对同步交互有意义。
An asynchronous response is sent by invoking the corresponding one-way operation on the partner link,可定义一个variable包含message data to be sent in reply.
<throw>
业务流程显式地发出内部故障信号时,使用<throw>。每个故障需要有一个全局唯一的QName。<throw>活动为故障提供QName,可提供一个variable of data,提供故障的其他信息。Fault Handler可使用such data分析处理fault。
<wait>
允许business process specifies a delay for a certain period of time or until a certain deadline is reached.
<wait (for = "duration-expr"|until = "deadline-expr") ></wait>
典型的应用是invoke an operation at a certain time(一般是个常数,或依赖流程状态的表达式)
<empty>
When a fault needs to be caught and suppressed.
Structured Activities
规定了一组活动发生的顺序。
<sequence>
一个sequence包含一个或多个按顺序执行的活动,in the order in which they are listed within the <sequence> element.The sequence activity completes when the final activity in the sequence has completed.
<switch>
由有序的一个或多个条件分支组成<case>可能有<otherwise>分支。选择条件为true的第一个分支并执行其活动。如果都不符合,选<otherwise>。如<otherwise>未显式制定,an otherwise branch with an <empty>活动将被执行
<while>
支持repeated performance of a special iterative activity. Until the given Boolean thile condition no longer hold true.
<pick>
等待一组事件中的一个发生,然后执行与发生的事件相关的活动。事件的发生往往是互斥的。如果不止一个事件发生,选最先发生的那个。
<pick>是一组形为event/activity的分支,当pick接收到一个event后,便不再接收其他events。
可能的事件:
case:接收到一个消息而创建流程实例,pick本身的createInstance的值是yes(缺省为no),pick中的event必须为进站消息。
每个<pick>必须包含至少一个onMessage Event.
<flow>
提供并发(concurrency)和同步(synchronization)
如果一个活动的使能条件为false,该活动被跳过。从而终止。
<link>用来表达synchronization dependencies.
<source><target><transitionCondition>source 和 target中都要指定linkName.
links可以跨越结构化活动的边界。
link不能跨越活动<while>,serializable scope,event handler,compensation handler的边界
A->B link是A的outgoing link(出站)
B->A link是A的incoming link(进站)
Y->X X has a synchronization dependency on Y.
每个座位link target的活动都有一个implicit or explicit joinCondition属性与之关联。
要求至少一个incoming link的status为positive.
joinCondition is a Boolean experession
该表达式由Boolean operators & thebpws:getLinkStatus函数来构造。
如果一个有多个outgoing links 的活动完成,enable多个target activities such an antivity is often called a "fork activity".