Information Technology Reference
In-Depth Information
Clearly, the reference count of a message can be easily derived from
a data mapping table. Next, we define active reference count ( D ) for
each source message m in data mapping I.
is the number of data
mapping rules whose source message is m, and the target of this data
mapping is consumed in CRG. For example, the reference count of
eBay.OrderData is 1; if in Figure 4.8 there is always a token left in p 13
in terminal marking M e , the active reference count of eBay.OrderData
is 0 because it means that although message eBay.OrderData is referred
by one data mapping rule, the target message of this mapping is never
consumed. A data mapping rule is active if the target message is
consumed in at least one terminal marking M e .
On the basis of the concept of data mapping and active reference
count, we can build a mediator between two services. Algorithm 4.2
gives the method to do so. Its basic idea is illustrated in Figure 4.10, and
its procedure is explained as follows.
For a message mapping where
m
Þ
1, use a
store/ forward mediator. In Figure 4.10a, if message m 1 is sent by
p 1 and needed by p 2 , we simply merge p 1 and p 2 to form a store/ forward
mediator.
For message mapping with transformation, use a transformation
mediator. In Figure 4.10b, if m 1 is sent by p 1 and m 2 is needed by p 2 ,
and m 2 can be transformed from m 1 , we add a mediation transition mt
between p 1 and p 2 to form a transformation mediator.
For message src with
src
Þ¼Dð
target
Þ¼
src
Þ >
1, use a split mediator. For message
target with
1, use a merge mediator.
In Figure 4.10c, if m 1 is sent by p 1 and referred by m 3 and m 4 , m 2
is sent by p 2 andalsoreferredbym 3 and m 4 . We add split transitions
mt 1 and mt 2 after p 1 and p 2 , merge transitions mt 3 and mt 4 before p 3
and p 4 ,andweaddp 11 , p 12 , p 21 ,andp 22 to connect these mediation
transitions.
target
Þ >
Algorithm 4.2. (Generation of a Mediator)
Input:
SWF-nets N 1 and N 2 , and data mapping I
Output: M ¼ð
P m
;
T m
;
F m
; S
;
C m
Þ
m
1. P m
¼
P M1
[
P M2 , T m
¼
F m
¼ 1
Search WWH ::




Custom Search