Research Article
A Cluster and Process Collaboration-Aware Method to Achieve Service Substitution in Cloud Service Processes
Algorithm 1
PathString_Generate (SN).
| Input: service net SN; | | Output: path string of SN; | (1) | t1 = t (SN.i); | (2) | PS = t1; | (3) | tc = t1; | (4) | tn = t (τ (t1)); | (5) | while (tn! = Null) | (6) | { if (tc ∈ SN.Ts∧tn ∈ SN.Ts) PS=PS + tn; | (7) | if (tc ∈ SN.Ts∧tn ∈ SN.TO) | (8) | { m = |τ (tn)|; | (9) | For j = 1 to m | (10) | obtain a place p in τ (tn) and build service net SubSNj with SubSNj.i = p; | (11) | spj = PathString_Generate (SubSNj); | (12) | if (I (tn) = O∨) PS = PS + spj + ||; | (13) | if (I (tn) = O∧) PS = PS + spj + ⊗; | (14) | End for | (15) | if (tc ∈ SN.Ts∧tn ∈ SN.TO∧j = = m) PS = PS + tn; | (16) | tc = tn; tn = t (τ (tc)); } | (17) | return (PS); | (18) | } |
|