在面向服务架构下,为了让更多的相关服务请求者使用用户设计的服务而不发生死锁,提出了一种基于消息状态树的方法,该方法由外部交互消息序列逆向设计无环有限次交互的服务。在设计服务时,首先由服务设计者按照一定的方法生成消息状态树,然后通过一个算法将该消息状态树转换为服务自动机,再将服务自动机自动转换成业务过程执行语言服务,并在最后给出了一个可供服务注册中心使用的服务匹配算法来进行服务匹配与否的判断,同时分析了该算法的可行性和复杂度。最后,以一个自动贩卖机为例,说明了如何使用该方法进行设计服务。
In order to provide service which could be used by more requesters without dead-locks under the service-oriented architecture,a method based on a message state tree was proposed to realize the reverse design of services by interactive message sequences.During the service design process,a message state tree was generated by service designer according to specific methods.Then,an algorithm was introduced to realize the conversion from the tree to service automation and a method was presented to transform service automation into business process execution language.Thirdly,a service mapping algorithm was put forward to judge mapping of the service.Finally,the feasibility and complexity of the deadlock-free decision algorithm were analyzed.Also,an example of vending machine was used to illustrate how to design a universal service.