Research Article

Web Services Conversation Adaptation Using Conditional Substitution Semantics of Application Domain Concepts

Algorithm 3

Sequence mediator procedure (SMP).
Input: (the th source state), (the th target
state), (the required goal)
Output: Return true when sequences re-clustering is finished.
(1)Begin
(2)if ( ) then
(3)    Apply Algorithm 3 over ( , , )
(4)else
(5)    if ( ) then
(6)    Expand
(7)    Apply Algorithm 3 over ( , , )
(8)    else
(9)    if ( ) then
(10)    Apply CRO over
(11)     Apply Algorithm 3 over ( , , )
(12)   else
(13)    BackTrack =
(14)   if ( ) then
(15)    if ( ) then
(16)       Apply Algorithm 4 over ( , , )
(17)    else
(18)       if ( ) then
(19)       Apply CRO over
(20)      Apply Algorithm 3 over ( , , )
(21)       else
(22)       Mark as Unmatched
(23)       Apply Algorithm 4 over (BackTrack,
       , )
(24)      end if
(25)      end if
(26)   else
(27)      Merge unmatched source states with their
      predecessors.
(28)      Return true
(29)   end if
(30)  end if
(31)   end if
(32) end if
(33) End