[go: up one dir, main page]

CN102291464B - System and Method for Dynamically Generating Web Service from Business Process in BPM - Google Patents

System and Method for Dynamically Generating Web Service from Business Process in BPM Download PDF

Info

Publication number
CN102291464B
CN102291464B CN2011102512528A CN201110251252A CN102291464B CN 102291464 B CN102291464 B CN 102291464B CN 2011102512528 A CN2011102512528 A CN 2011102512528A CN 201110251252 A CN201110251252 A CN 201110251252A CN 102291464 B CN102291464 B CN 102291464B
Authority
CN
China
Prior art keywords
service
business process
interface
web service
module
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CN2011102512528A
Other languages
Chinese (zh)
Other versions
CN102291464A (en
Inventor
魏巍
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
PRIMETON INFORMATION TECHNOLOGY Co Ltd
Original Assignee
PRIMETON INFORMATION TECHNOLOGY Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by PRIMETON INFORMATION TECHNOLOGY Co Ltd filed Critical PRIMETON INFORMATION TECHNOLOGY Co Ltd
Priority to CN2011102512528A priority Critical patent/CN102291464B/en
Publication of CN102291464A publication Critical patent/CN102291464A/en
Application granted granted Critical
Publication of CN102291464B publication Critical patent/CN102291464B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

The invention relates to a system for dynamically generating Web Service by business flow in an enterprise BPM (Business Process Management) system. The system comprises a business flow service interface defining module, a dynamic Web Service member assembling module, a Web Service dynamic generating module, a disaster recovering module, a dynamic service management module, a security control module and a business flow service version control module. The invention also relates to a method for dynamically generating Web Service by business flow of the system. By using the system and method provided by the invention, the business flow has natural integration characteristic; the Web Service is published while the process is scheduled; unique service interface standard is obtained and the encoding is not needed. Meanwhile, portability and expandability of the system are enhanced; the system and method provided by the invention can rapidly adapt to business requirement variation and technical variation and have the advantages of simple development period, explicit interface, convenience in configuration, higher efficiency in operation period, stable and reliable system performance and wider application range; and the establishment of a highly modular and highly integrated software system can be supported.

Description

BPM中业务流程动态生成Web Service的系统及方法System and Method for Dynamically Generating Web Service from Business Process in BPM

技术领域 technical field

本发明涉及计算机应用领域,特别涉及关于业务流程管理的体系结构(BPM)的计算机应用技术领域,具体是指一种企业BPM系统中实现业务流程动态生成Web Service的系统及方法。The present invention relates to the field of computer applications, in particular to the field of computer application technology related to the architecture of business process management (BPM), and specifically refers to a system and method for dynamically generating Web Services from business processes in an enterprise BPM system.

背景技术 Background technique

在企业级应用开发领域,随着应用规模的不断扩大,各个系统之间的集成和交互变得越来越频繁,要实现一个特定的功能,需要与多个系统进行通信,通过各系统之间的协作来完成。目前主流的软件项目的架构类似“竖井”,在这个“竖井”中有数据库,中间层、客户端表现层等。各个应用系统的数据分属在不同的竖井中,当我们的信息化发展到一定程度,已开发和上线运行的系统需要整合或实现数据共享时,我们不得不通过在“竖井”中“穿洞”来访问数据。一旦一个数据对象发生了变化,对其他系统的影响就将变得“不可知”和“不可控”了。In the field of enterprise-level application development, with the continuous expansion of the application scale, the integration and interaction between various systems become more and more frequent. To realize a specific function, it is necessary to communicate with multiple systems. collaboration to complete. At present, the architecture of mainstream software projects is similar to a "silo", in which there are databases, middle layers, and client presentation layers. The data of each application system belongs to different silos. When our informatization develops to a certain extent and the systems that have been developed and put into operation need to be integrated or share data, we have to pass through the "holes" in the "silos". " to access the data. Once a data object changes, the impact on other systems will become "unknowable" and "uncontrollable".

业务流程管理(Business Process Management,BPM)软件系统,是解决现有软件系统结构弊端的一种有效手段。业务流程是通过梳理和编排业务活动。BPM软件系统是由之前的以功能和数据为中心转变为以业务流程为中心,通过业务流程的运行来驱动业务的发展,通过业务流程来整合不同业务部门之间的业务交互,提升整个企业的效率。Business process management (Business Process Management, BPM) software system is an effective means to solve the disadvantages of the existing software system structure. Business processes are defined by combing and orchestrating business activities. The BPM software system has changed from function- and data-centered to business-process-centered, driving business development through the operation of business processes, integrating business interactions between different business departments through business processes, and improving the entire enterprise. efficiency.

业务流程在BPM软件系统中处于核心地位。传统实施BPM方法里面包含业务流程建模、业务流程分析、业务流程设计、业务流程执行、业务流程监控、业务流程优化等步骤。但是随着企业规模的发展以及自身业务模式的转变,要求BPM系统能够快速响应业务的变化,要求BPM系统具有集成能力和敏捷变化能力。具体就是从两个维度扩展,第一是业务流程要求能够以Web Service的方式与其他业务系统集成,例如能够与SAP的库存管理系统、IBM Lotus系统集成;第二就是业务流程的动态优化和调整能力,企业业务流程时刻会面临变化,例如金融业对利率、存款准备金等指标的敏感性,业务分析人员要求在最短时间内对业务流程调整来满足业务的变化。Business process is at the core of BPM software system. Traditional BPM implementation methods include business process modeling, business process analysis, business process design, business process execution, business process monitoring, business process optimization and other steps. However, with the development of enterprise scale and the transformation of its own business model, the BPM system is required to be able to quickly respond to business changes, and the BPM system is required to have integration capabilities and agile change capabilities. Specifically, it expands from two dimensions. The first is that the business process requires integration with other business systems in the form of Web Service, such as being able to integrate with SAP’s inventory management system and IBM Lotus system; the second is the dynamic optimization and adjustment of business processes Ability, business processes of enterprises will always face changes, such as the sensitivity of the financial industry to indicators such as interest rates and deposit reserves, business analysts require business process adjustments in the shortest possible time to meet business changes.

针对第一种情况,通常采用的方法是对BPM系统进行二次开发,对BPM系统中的业务流程进行封装,引入第三方的Web Service组件,例如内嵌一个Axis2等开源框架,通过封装业务流程操作接口,自定义一组接口对象,借助Axis2发布为Web Service。但是由于集成标准的不同,甚至不同业务系统集成模式的区别,不同BPM系统经过实施之后可能出现服务不一致的现象,例如服务接口的数据不一致,访问安全性控制不一致等,造成服务不可用的现象。For the first case, the usual method is to carry out secondary development of the BPM system, encapsulate the business process in the BPM system, introduce third-party Web Service components, for example, embed an open source framework such as Axis2, and encapsulate the business process Operation interface, customize a set of interface objects, and publish it as Web Service with the help of Axis2. However, due to differences in integration standards and even differences in the integration modes of different business systems, service inconsistencies may occur after the implementation of different BPM systems, such as inconsistency in service interface data, inconsistency in access security control, etc., resulting in service unavailability.

针对第二种情况,BPM在发展过程中经历过Workflow,Human Task,Business Form等,通过把一些需要调整的指标在业务流程分析阶段定义为人工任务,借助人力的方式来控制业务流程的运行;还有通过业务流程模板里面嵌入动态脚步语言的方式,借助程序执行脚本语言的能力来提高流程灵活性。但是每一种方式都有局限性,例如借助人力的方式对人员的要求非常高,在业务系统运行过程中非常复杂,经常面临错误回退、改派等,增大了系统的复杂度,而采用动态脚本语言的方式对业务人员无法理解,而且对于软件开发人员也很难调试等。从软件组件的角度来看,这种方案对业务流程的程序代码的耦合度非常高。For the second case, BPM has experienced Workflow, Human Task, Business Form, etc. in the development process. By defining some indicators that need to be adjusted as manual tasks in the business process analysis stage, the operation of the business process is controlled by means of manpower; There is also a way to embed a dynamic script language in the business process template, and use the ability of the program to execute the script language to improve process flexibility. However, each method has limitations. For example, using human resources has very high requirements for personnel, and it is very complicated during the operation of the business system. It often faces error rollbacks, reassignments, etc., which increases the complexity of the system. The way of adopting dynamic scripting language cannot be understood by business personnel, and it is also difficult for software developers to debug and so on. From the perspective of software components, this solution has a very high degree of coupling to the program code of the business process.

随着系统的不断扩大,BPM系统中的业务流程越来越多,以及业务流程之间的集成也越来越多。如果选择对人员要求非常高以及软件模块耦合性高的解决方案,这无论对于业务分析人员还是软件开发测试人员都将是一个灾难。在BPM日益需要服务集成的今天,如何在BPM系统中实现业务流程动态生成Web Service变得非常紧迫。With the continuous expansion of the system, there are more and more business processes in the BPM system, and there are more and more integrations between business processes. If you choose a solution that requires very high personnel and highly coupled software modules, it will be a disaster for both business analysts and software development testers. Today, as BPM increasingly needs service integration, how to realize the dynamic generation of Web Service by business process in BPM system has become very urgent.

发明内容 Contents of the invention

本发明的目的是克服了上述现有技术中的缺点,提供一种能够在BPM系统中通过编排业务流程之后系统自动根据服务接口定义生成Web Service,并且具有灾难恢复、安全控制、简单明确、无须编码、服务接口一致、系统性能稳定可靠,适用范围较为广泛的实现业务流程动态生成Web Service的系统及方法。The purpose of the present invention is to overcome the above-mentioned shortcomings in the prior art, to provide a system that can automatically generate a Web Service according to the service interface definition after the business process is arranged in the BPM system, and has disaster recovery, security control, simple and clear, no need Coding and service interfaces are consistent, the system performance is stable and reliable, and the system and method for realizing the dynamic generation of Web Service by business processes are widely applicable.

为了实现上述的目的,本发明的企业BPM系统中实现业务流程动态生成Web Service的系统包括:In order to achieve the above-mentioned purpose, in the enterprise BPM system of the present invention, the system for realizing the dynamic generation of Web Service by business process includes:

业务流程服务接口定义模块,用以定义业务流程的Web Service接口信息;The business process service interface definition module is used to define the Web Service interface information of the business process;

动态Web Service构件装配模块,与所述的业务流程服务接口定义模块连接,用以根据业务流程的Web Service接口信息装配构件;The dynamic Web Service component assembly module is connected with the business process service interface definition module to assemble components according to the Web Service interface information of the business process;

Web Service动态生成模块,与所述的动态Web Service构件装配模块连接,用以加载所述的构件,生成Web Service服务,并提供Web Service服务接入处理;The Web Service dynamic generation module is connected with the dynamic Web Service component assembly module to load the components, generate Web Service services, and provide Web Service service access processing;

动态服务管理模块,与所述的Web Service动态生成模块连接,用以对Web Service进行管理操作;The dynamic service management module is connected with the dynamic generation module of Web Service to manage the Web Service;

灾难恢复模块,与所述的动态Web Service构件装配模块,用以在系统重启时根据系统中的业务流程自动生成Web Service;The disaster recovery module, and the dynamic Web Service component assembly module, are used to automatically generate Web Service according to the business process in the system when the system is restarted;

安全控制模块,与所述的Web Service动态生成模块连接,用以对Web Service服务提供安全保障;Security control module, is connected with described Web Service dynamic generation module, in order to Web Service service provides safety guarantee;

业务流程服务版本控制模块,分别与所述的动态Web Service构件装配模块和Web Service动态生成模块连接,用以向所述系统中存在的多版本的业务流程服务提供多版本的动态服务。The business process service version control module is respectively connected with the dynamic Web Service component assembly module and the Web Service dynamic generation module to provide multi-version dynamic services to the multi-version business process services existing in the system.

该企业BPM系统中实现业务流程动态生成Web Service的系统中,所述的业务流程服务接口定义模块包括:In this enterprise BPM system, in the system that realizes the dynamic generation of Web Service by business process, the described business process service interface definition module includes:

服务接口元数据模型解析器,用以对BPM系统所支持的数据类型进行解析;The service interface metadata model resolver is used to analyze the data types supported by the BPM system;

业务流程服务接口定义配置器,与所述的服务接口元数据模型解析器连接,用以对业务流程定义服务接口的服务名称和服务参数用XML语言进行定义;The business process service interface definition configurator is connected with the service interface metadata model parser to define the service name and service parameters of the business process definition service interface in XML language;

服务接口定义分析器,与所述的业务流程服务接口定义配置器连接,并连接所述的动态Web Service构件装配模块,用以将服务接口定义转换为服务对象。The service interface definition analyzer is connected with the business process service interface definition configurator, and connected with the dynamic Web Service component assembly module, so as to convert the service interface definition into a service object.

该企业BPM系统中实现业务流程动态生成Web Service的系统中,所述的数据类型为基本类型、复杂类型和XSD类型中的一种或者多种。In the enterprise BPM system that realizes the dynamic generation of Web Services by business processes, the data type is one or more of basic types, complex types, and XSD types.

该企业BPM系统中实现业务流程动态生成Web Service的系统中,所述的动态WebService构件装配模块包括:In the enterprise BPM system that realizes the dynamic generation of Web Service by business processes, the dynamic WebService component assembly module includes:

服务接口生成器,连接所述的服务接口定义分析器,根据所述的服务接口定义产生服务虚拟java接口;A service interface generator, connected to the service interface definition analyzer, generates a service virtual java interface according to the service interface definition;

服务组件生成器,连接所述的服务接口生成器,根据所述的服务接口定义创建包含服务和数据类型资源的服务构件包;The service component generator is connected to the service interface generator, and creates a service component package containing services and data type resources according to the service interface definition;

服务组件调度器,连接所述的服务组件生成器,并连接所述的Web Service动态生成模块,根据所述的服务接口定义对服务组件的部署、发布、销毁进行调度。The service component scheduler connects the service component generator and the Web Service dynamic generation module, and schedules the deployment, release and destruction of the service component according to the service interface definition.

该企业BPM系统中实现业务流程动态生成Web Service的系统中,所述的Web Service动态生成模块包括:In this enterprise BPM system, in the system that realizes the dynamic generation of Web Service by business process, the dynamic generation module of Web Service includes:

服务构件加载器,连接所述的服务组件调度器,用以加载所述的服务构件包;A service component loader, connected to the service component scheduler, to load the service component package;

Web Service服务生成器,连接所述的服务构件加载器,通过所述的虚拟java接口生成Web Service服务;Web Service service generator, connects described service component loader, generates Web Service service by described virtual java interface;

Web Service服务接入器,连接所述的Web Service服务生成器,并连接所述的动态服务管理模块、灾难恢复模块、安全控制模块和业务流程服务版本控制模块,用以提供Web Service调用事务的业务处理。Web Service service access device, connected to the Web Service service generator, and connected to the dynamic service management module, disaster recovery module, security control module and business process service version control module, in order to provide Web Service calling transaction business processing.

本发明还提供一种利用系统实现企业BPM系统中实现业务流程动态生成Web Service的方法,该方法包括以下步骤:The present invention also provides a method of utilizing the system to realize the dynamic generation of Web Service by business processes in the enterprise BPM system, the method comprising the following steps:

(1)所述的业务流程服务接口定义模块进行业务流程编排过程定义服务接口信息操作;(1) The business process service interface definition module performs business process orchestration process definition service interface information operations;

(2)所述的动态Web Service构件装配模块和所述的业务流程服务版本控制模块进行业务流程热部署动态生成Web Service操作;(2) The described dynamic Web Service component assembly module and the described business process service version control module perform business process hot deployment to dynamically generate Web Service operations;

(3)所述的灾难恢复模块进行系统故障恢复操作;(3) The disaster recovery module performs a system failure recovery operation;

(4)所述的安全控制模块进行业务流程服务安全拦截操作;(4) The security control module performs the security interception operation of the business process service;

(5)所述的Web Service动态生成模块进行业务流程服务接入操作;(5) described Web Service dynamic generation module carries out business process service access operation;

(6)所述的动态服务管理模块进行动态服务管理操作。(6) The dynamic service management module performs dynamic service management operations.

该企业BPM系统中实现业务流程动态生成Web Service的方法中,所述的业务流程服务接口定义模块包括:服务接口元数据模型解析器、与所述的服务接口元数据模型解析器连接的业务流程服务接口定义配置器以及与所述的业务流程服务接口定义配置器连接的服务接口定义分析器,所述的业务流程服务接口定义模块进行业务流程编排过程定义服务接口信息操作,具体包括以下步骤:In the method for realizing business process dynamic generation Web Service in this enterprise BPM system, described business process service interface definition module comprises: service interface metadata model resolver, the business process connected with described service interface metadata model resolver The service interface definition configurator and the service interface definition analyzer connected with the business process service interface definition configurator, the business process service interface definition module performs business process orchestration process definition service interface information operations, specifically including the following steps:

(11)所述的服务接口元数据模型解析器加载系统支持的数据类型,所述的数据类型包括简单数据类型和复杂数据类型;(11) The data types supported by the loading system of the service interface metadata model parser, the data types include simple data types and complex data types;

(12)所述的业务流程服务接口定义配置器编排流程并配置服务接口;(12) The business process service interface definition configurator orchestrates the process and configures the service interface;

(13)所述的服务接口定义分析器将业务流程中的服务定义解析为服务对象。(13) The service interface definition analyzer parses the service definition in the business process into service objects.

该企业BPM系统中实现业务流程动态生成Web Service的方法中,所述的复杂数据类型为Java Bean、List、Set和Map类型中的一种或者多种。In the method for realizing the dynamic generation of Web Service by business processes in the enterprise BPM system, the complex data type is one or more of Java Bean, List, Set and Map types.

该企业BPM系统中实现业务流程动态生成Web Service的方法中,所述的服务接口定义是包含接口定义结构描述XSD Schema的XML片段,服务接口定义包含服务接口名称和服务接口参数列表,所述的服务接口参数列表包括传入参数合返回值。In the method for realizing business process dynamic generation Web Service in this enterprise BPM system, described service interface definition is to comprise the XML fragment of interface definition structure description XSD Schema, and service interface definition comprises service interface name and service interface parameter list, and described The service interface parameter list includes incoming parameters and return values.

该企业BPM系统中实现业务流程动态生成Web Service的方法中,所述的服务接口定义分析器将业务流程中的服务定义解析为服务对象,具体包括以下步骤:In the method for realizing the dynamic generation of Web Service by business process in the enterprise BPM system, the service interface definition analyzer in the business process is parsed into a service object by the service interface definition analyzer, which specifically includes the following steps:

(131)所述的服务接口定义分析器在BPM引擎启动过程注入到服务接口元数据模型解析器中;(131) The service interface definition analyzer is injected into the service interface metadata model parser in the BPM engine startup process;

(132)Web界面部署流程时候,服务接口元数据模型解析器调用服务接口定义分析器对服务接口定义XML片段解析为包含服务名称,服务参数列表的Java Bean对象,并且缓存该Java Bean对象。(132) During the web interface deployment process, the service interface metadata model parser invokes the service interface definition parser to parse the service interface definition XML fragment into a Java Bean object containing a service name and a service parameter list, and caches the Java Bean object.

该企业BPM系统中实现业务流程动态生成Web Service的方法中,所述的动态WebService构件装配模块包括:服务接口生成器、连接所述的服务接口生成器的服务组件生成器以及连接所述的服务组件生成器的服务组件调度器,所述的动态Web Service构件装配模块和业务流程服务版本控制模块进行业务流程热部署动态生成Web Service操作,具体包括以下步骤:In the method for dynamically generating Web Service by business processes in the enterprise BPM system, the dynamic WebService component assembly module includes: a service interface generator, a service component generator connected to the service interface generator, and a service component generator connected to the service interface The service component scheduler of the component generator, the described dynamic Web Service component assembly module and the business process service version control module perform business process hot deployment and dynamically generate Web Service operations, specifically including the following steps:

(21)所述的服务接口生成器根据业务流程动态部署触发将服务对象转换为虚拟Java接口;(21) The service interface generator is triggered according to the dynamic deployment of the business process to convert the service object into a virtual Java interface;

(22)所述的服务组件生成器加载服务对应的虚拟Java接口、数据类型定义XSD Schema信息,并依据模板创建出该服务组件文件;(22) The service component generator loads the virtual Java interface corresponding to the service, the data type definition XSD Schema information, and creates the service component file according to the template;

(23)所述的服务组件调度器对服务组件进行调度,所述的调度包括服务组件部署、发布和销毁;(23) The service component scheduler schedules the service components, and the scheduling includes service component deployment, release and destruction;

(24)所述的业务流程服务版本控制模块对服务组件版本进行切换,并将发布版本服务组件作为默认服务。(24) The business process service version control module switches the version of the service component, and uses the service component of the released version as a default service.

该企业BPM系统中实现业务流程动态生成Web Service的方法中,所述的服务组件包含服务装配文件、依赖资源XSD文件和复杂数据类型Acegis文件。In the method for dynamically generating Web Services by business processes in the enterprise BPM system, the service components include service assembly files, dependent resource XSD files and complex data type Acegis files.

该企业BPM系统中实现业务流程动态生成Web Service的方法中,所述的服务组件生成器加载服务对应的虚拟Java接口、数据类型定义XSD Schema信息并依据模板创建出该服务组件文件,具体包括以下步骤:In the method for dynamically generating Web Service by business processes in the enterprise BPM system, the service component generator loads the corresponding virtual Java interface and data type definition XSD Schema information of the service and creates the service component file according to the template, specifically including the following step:

(221)所述的服务组件生成器调用服务接口生成器创建的虚拟Java接口作为服务接口;(221) The service component generator invokes the virtual Java interface created by the service interface generator as the service interface;

(222)所述的服务组件生成器根据服务接口的反射数据类型,判断是否依赖相关的XSD文件,若是,则进入步骤(223),若否,则进入步骤(224);(222) The described service component generator judges whether to rely on the relevant XSD file according to the reflection data type of the service interface, if so, then enter step (223), if not, then enter step (224);

(223)服务组件生成器从BPM系统中加载该XSD文件放入服务组件,并进入步骤(224);(223) The service component generator loads the XSD file from the BPM system and puts it into the service component, and enters step (224);

(224)服务组件生成器根据服务接口的反射数据类型,判断是否包含List、Set或Map复杂数据类型,若是,则进入步骤(225),若否,则进入步骤(226);(224) The service component generator judges whether to include List, Set or Map complex data types according to the reflection data type of the service interface, if so, then enter step (225), if not, then enter step (226);

(225)服务组件生成器创建描述复杂类型的Aegis文件放入服务组件中,并进入步骤(226);(225) service component generator creates and describes the Aegis file of complex type and puts into service component, and enters step (226);

(226)服务组件生成器使用模板资源创建服务组件。(226) The service component generator uses the template resource to create the service component.

该企业BPM系统中实现业务流程动态生成Web Service的方法中,所述的灾难恢复模块进行系统故障恢复操作,具体包括以下步骤:In the method for realizing business process dynamic generation Web Service in this enterprise BPM system, described disaster recovery module carries out system fault recovery operation, specifically comprises the following steps:

(31)所述的灾难恢复模块在系统遇到灾难故障需要重启时作为启动Listener检查服务组件状态,确定是否启动恢复;(31) The disaster recovery module described in the disaster recovery module checks the service component status as a starting Listener when the system encounters a disaster failure and needs to restart, and determines whether to start recovery;

(32)所述的灾难恢复模块确定启动恢复之后,调用所述的动态Web Service构件装配模块器对系统中故障服务重新生成。(32) After the disaster recovery module determines to start the recovery, it calls the dynamic Web Service component assembly module to regenerate the faulty service in the system.

该企业BPM系统中实现业务流程动态生成Web Service的方法中,所述的安全控制模块进行业务流程服务安全拦截操作,具体为:In the method for realizing the dynamic generation of Web Service by the business process in the enterprise BPM system, the security control module performs the security interception operation of the business process service, specifically:

所述的安全控制模块根据系统配置的用户名和口令对服务请求进行拦截,并禁止未授权用户调用。The security control module intercepts the service request according to the user name and password configured by the system, and prohibits unauthorized users from invoking it.

该企业BPM系统中实现业务流程动态生成Web Service的方法中,所述的Web Service动态生成模块进行业务流程服务接入操作,具体为:In the method for realizing business process dynamic generation Web Service in this enterprise BPM system, described Web Service dynamic generation module carries out business process service access operation, specifically:

所述的Web Service动态生成模块根据系统配置的用户名和口令对服务请求进行拦截,并禁止未授权用户调用。The described Web Service dynamic generation module intercepts the service request according to the user name and password configured by the system, and prohibits unauthorized users from invoking.

该企业BPM系统中实现业务流程动态生成Web Service的方法中,所述的动态服务管理模块进行动态服务管理操作,具体为:In the method for realizing business process dynamic generation Web Service in this enterprise BPM system, described dynamic service management module carries out dynamic service management operation, specifically:

所述的动态服务管理模块对系统内所有的服务组件进行管理。The dynamic service management module manages all service components in the system.

该企业BPM系统中实现业务流程动态生成Web Service的方法中,所述的管理包括查询服务WSDL和统计服务数据。In the method for dynamically generating Web Services by business processes in the enterprise BPM system, the management includes querying service WSDL and statistical service data.

采用了该发明的企业BPM系统中实现业务流程动态生成Web Service的系统,其包括业务流程服务接口定义模块、连接该业务流程服务接口定义模块的动态Web Service构件装配模块,连接该动态Web Service构件装配模块的Web Service动态生成模块和灾难恢复模块、连接该Web Service动态生成模块的动态服务管理模块和安全控制模块,以及分别与所述的动态Web Service构件装配模块和Web Service动态生成模块连接的业务流程服务版本控制模块。利用该系统的业务流程动态生成Web Service的方法,其业务流程具有天然的集成特性,在编排流程的同时发布出Web Service,并且服务接口标准统一,无需编码。同时增强了系统可移植性和可扩展性,能够快速适应业务需求的变化和技术变化,能够支撑建立高度模块化而且又高度整合的软件系统,开发期简单,接口明确,配置方便,运行期效率较高、系统性能稳定可靠,适用范围较为广泛,为BPM系统的集成发展打下了坚实的基础。Adopt the enterprise BPM system of this invention to realize the system that business process dynamically generates Web Service, it comprises business process service interface definition module, the dynamic Web Service component assembly module that connects this business process service interface definition module, connects this dynamic Web Service component The Web Service dynamic generation module and the disaster recovery module of the assembly module, the dynamic service management module and the security control module connected to the Web Service dynamic generation module, and the components connected with the dynamic Web Service component assembly module and the Web Service dynamic generation module respectively Business process service versioning module. The method of dynamically generating Web Service by using the business process of the system has natural integration characteristics, and the Web Service is released while the process is arranged, and the service interface standard is unified without coding. At the same time, it enhances the portability and scalability of the system, can quickly adapt to changes in business needs and technology changes, and can support the establishment of a highly modular and highly integrated software system. The development period is simple, the interface is clear, the configuration is convenient, and the operation period is efficient. It is relatively high, the system performance is stable and reliable, and the scope of application is relatively wide, which has laid a solid foundation for the integrated development of the BPM system.

附图说明 Description of drawings

图1为本发明的企业BPM系统中实现业务流程动态生成Web Service的系统的结构示意图。Fig. 1 is a schematic structural diagram of a system that realizes business process dynamic generation of Web Service in the enterprise BPM system of the present invention.

图2为本发明的企业BPM系统中实现业务流程动态生成Web Service的系统中的服务动态生成模块的类图。Fig. 2 is the class diagram of the service dynamic generation module in the system that realizes business process dynamic generation Web Service in the enterprise BPM system of the present invention.

图3为本发明的企业BPM系统中实现业务流程动态生成Web Service的系统中的服务组件生成器的类图。Fig. 3 is the class diagram of the service component generator in the system that realizes business process to dynamically generate Web Service in the enterprise BPM system of the present invention.

图4为本发明的企业BPM系统中实现业务流程动态生成Web Service的系统中的服务接入模块的类图。Fig. 4 is the class diagram of the service access module in the system that realizes business process dynamic generation Web Service in the enterprise BPM system of the present invention.

图5为本发明的企业BPM系统中实现业务流程动态生成Web Service的系统中的灾难恢复模块的类图。Fig. 5 is the class diagram of the disaster recovery module in the system that realizes business process to dynamically generate Web Service in the enterprise BPM system of the present invention.

图6为本发明的企业BPM系统中实现业务流程动态生成Web Service的方法的时序图。FIG. 6 is a sequence diagram of a method for dynamically generating a Web Service from a business process in the enterprise BPM system of the present invention.

图7为利用本发明的方法在企业BPM系统中实现业务流程动态生成Web Service调用的时序图。FIG. 7 is a sequence diagram of dynamically generating Web Service calls by business processes in an enterprise BPM system using the method of the present invention.

具体实施方式 Detailed ways

为了能够更清楚地理解本发明的技术内容,特举以下实施例详细说明。In order to understand the technical content of the present invention more clearly, the following examples are given in detail.

请参阅图1所示,为本发明的企业BPM系统中实现业务流程动态生成Web Service的系统的结构示意图。Please refer to FIG. 1 , which is a schematic structural diagram of a system for realizing business process dynamic generation of Web Service in the enterprise BPM system of the present invention.

在一种实施方式中,该企业BPM系统中实现业务流程动态生成Web Service的系统包括:In one embodiment, the system for realizing the dynamic generation of Web Service by business processes in the enterprise BPM system includes:

业务流程服务接口定义模块,用以定义业务流程的Web Service接口信息;The business process service interface definition module is used to define the Web Service interface information of the business process;

动态Web Service构件装配模块,与所述的业务流程服务接口定义模块连接,用以根据业务流程的Web Service接口信息装配构件;The dynamic Web Service component assembly module is connected with the business process service interface definition module to assemble components according to the Web Service interface information of the business process;

Web Service动态生成模块,与所述的动态Web Service构件装配模块连接,用以加载所述的构件,生成Web Service服务,并提供Web Service服务接入处理;The Web Service dynamic generation module is connected with the dynamic Web Service component assembly module to load the components, generate Web Service services, and provide Web Service service access processing;

动态服务管理模块,与所述的Web Service动态生成模块连接,用以对Web Service进行管理操作;The dynamic service management module is connected with the dynamic generation module of Web Service to manage the Web Service;

灾难恢复模块,与所述的动态Web Service构件装配模块,用以在系统重启时根据系统中的业务流程自动生成Web Service;The disaster recovery module, and the dynamic Web Service component assembly module, are used to automatically generate Web Service according to the business process in the system when the system is restarted;

安全控制模块,与所述的Web Service动态生成模块连接,用以对Web Service服务提供安全保障;Security control module, is connected with described Web Service dynamic generation module, in order to Web Service service provides safety guarantee;

业务流程服务版本控制模块,分别与所述的动态Web Service构件装配模块和Web Service动态生成模块连接,用以向所述系统中存在的多版本的业务流程服务提供多版本的动态服务。The business process service version control module is respectively connected with the dynamic Web Service component assembly module and the Web Service dynamic generation module to provide multi-version dynamic services to the multi-version business process services existing in the system.

利用该种实施方式的系统实现业务流程动态生成Web Service的方法包括以下步骤:The method for realizing the dynamic generation of Web Service by the business process using the system of this kind of implementation mode includes the following steps:

(1)所述的业务流程服务接口定义模块进行业务流程编排过程定义服务接口信息操作;(1) The business process service interface definition module performs business process orchestration process definition service interface information operations;

(2)所述的动态Web Service构件装配模块和所述的业务流程服务版本控制模块进行业务流程热部署动态生成Web Service操作;(2) The described dynamic Web Service component assembly module and the described business process service version control module perform business process hot deployment to dynamically generate Web Service operations;

(3)所述的灾难恢复模块进行系统故障恢复操作;(3) The disaster recovery module performs a system failure recovery operation;

(4)所述的安全控制模块进行业务流程服务安全拦截操作;(4) The security control module performs the security interception operation of the business process service;

(5)所述的Web Service动态生成模块进行业务流程服务接入操作;(5) described Web Service dynamic generation module carries out business process service access operation;

(6)所述的动态服务管理模块进行动态服务管理操作。(6) The dynamic service management module performs dynamic service management operations.

在一种较优选的实施方式中,所述的业务流程服务接口定义模块包括:In a more preferred implementation manner, the business process service interface definition module includes:

服务接口元数据模型解析器,用以对BPM系统所支持的数据类型进行解析;The service interface metadata model resolver is used to analyze the data types supported by the BPM system;

业务流程服务接口定义配置器,与所述的服务接口元数据模型解析器连接,用以对业务流程定义服务接口的服务名称和服务参数用XML语言进行定义;The business process service interface definition configurator is connected with the service interface metadata model parser to define the service name and service parameters of the business process definition service interface in XML language;

服务接口定义分析器,与所述的业务流程服务接口定义配置器连接,并连接所述的动态Web Service构件装配模块,用以将服务接口定义转换为服务对象。The service interface definition analyzer is connected with the business process service interface definition configurator, and connected with the dynamic Web Service component assembly module, so as to convert the service interface definition into a service object.

其中,所述的数据类型为基本类型、复杂类型和XSD类型中的一种或者多种。Wherein, the data type is one or more of basic type, complex type and XSD type.

利用该种实施方式的系统实现业务流程动态生成Web Service的方法中,所述的业务流程服务接口定义模块进行业务流程编排过程定义服务接口信息操作,具体包括以下步骤:Utilize the system of this kind of embodiment to realize the method that business process dynamically generates Web Service, described business process service interface definition module carries out business process orchestration process definition service interface information operation, specifically comprises the following steps:

(11)所述的服务接口元数据模型解析器加载系统支持的数据类型,所述的数据类型包括简单数据类型和复杂数据类型;(11) The data types supported by the loading system of the service interface metadata model parser, the data types include simple data types and complex data types;

(12)所述的业务流程服务接口定义配置器编排流程并配置服务接口;(12) The business process service interface definition configurator orchestrates the process and configures the service interface;

(13)所述的服务接口定义分析器将业务流程中的服务定义解析为服务对象。(13) The service interface definition analyzer parses the service definition in the business process into service objects.

其中,所述的复杂数据类型为Java Bean、List、Set和Map类型中的一种或者多种。Wherein, the complex data type is one or more of Java Bean, List, Set and Map types.

在一种进一步优选的实施方式中,所述的服务接口定义是包含接口定义结构描述XSDSchema的XML片段,服务接口定义包含服务接口名称和服务接口参数列表,所述的服务接口参数列表包括传入参数合返回值。In a further preferred embodiment, the service interface definition is an XML fragment containing the interface definition structure description XSDSchema, the service interface definition contains the service interface name and the service interface parameter list, and the service interface parameter list includes the incoming parameter and return value.

在利用该实施方式的系统实现业务流程动态生成Web Service的方法中,所述的服务接口定义分析器将业务流程中的服务定义解析为服务对象,具体包括以下步骤:In the method of using the system of this embodiment to dynamically generate a Web Service from a business process, the service interface definition analyzer resolves the service definition in the business process into a service object, specifically including the following steps:

(131)所述的服务接口定义分析器在BPM引擎启动过程注入到服务接口元数据模型解析器中;(131) The service interface definition analyzer is injected into the service interface metadata model resolver in the BPM engine startup process;

(132)Web界面部署流程时候,服务接口元数据模型解析器调用服务接口定义分析器对服务接口定义XML片段解析为包含服务名称,服务参数列表的Java Bean对象,并且缓存该Java Bean对象。(132) During the web interface deployment process, the service interface metadata model parser invokes the service interface definition parser to parse the service interface definition XML fragment into a Java Bean object containing a service name and a service parameter list, and caches the Java Bean object.

在另一种优选的实施方式中,所述的动态Web Service构件装配模块包括:In another preferred embodiment, the dynamic Web Service component assembly module includes:

服务接口生成器,连接所述的服务接口定义分析器,根据所述的服务接口定义产生服务虚拟java接口;A service interface generator, connected to the service interface definition analyzer, generates a service virtual java interface according to the service interface definition;

服务组件生成器,连接所述的服务接口生成器,根据所述的服务接口定义创建包含服务和数据类型资源的服务构件包;The service component generator is connected to the service interface generator, and creates a service component package containing services and data type resources according to the service interface definition;

服务组件调度器,连接所述的服务组件生成器,并连接所述的Web Service动态生成模块,根据所述的服务接口定义对服务组件的部署、发布、销毁进行调度。The service component scheduler connects the service component generator and the Web Service dynamic generation module, and schedules the deployment, release and destruction of the service component according to the service interface definition.

在利用该实施方式的系统实现业务流程动态生成Web Service的方法中,所述的动态WebService构件装配模块和业务流程服务版本控制模块进行业务流程热部署动态生成WebService操作,具体包括以下步骤:In the method of using the system of this embodiment to dynamically generate a Web Service from a business process, the dynamic Web Service component assembly module and the business process service version control module perform hot deployment of the business process to dynamically generate a Web Service operation, specifically including the following steps:

(21)所述的服务接口生成器根据业务流程动态部署触发将服务对象转换为虚拟Java接口;(21) The service interface generator is triggered according to the dynamic deployment of the business process to convert the service object into a virtual Java interface;

(22)所述的服务组件生成器加载服务对应的虚拟Java接口、数据类型定义XSD Schema信息,并依据模板创建出该服务组件文件;(22) The service component generator loads the virtual Java interface corresponding to the service, the data type definition XSD Schema information, and creates the service component file according to the template;

(23)所述的服务组件调度器对服务组件进行调度,所述的调度包括服务组件部署、发布和销毁;(23) The service component scheduler schedules the service components, and the scheduling includes service component deployment, release and destruction;

(24)所述的业务流程服务版本控制模块对服务组件版本进行切换,并将发布版本服务组件作为默认服务。(24) The business process service version control module switches the version of the service component, and uses the service component of the released version as a default service.

在进一步优选的实施方式中,所述的服务组件包含服务装配文件、依赖资源XSD文件和复杂数据类型Acegis文件。所述的服务组件生成器加载服务对应的虚拟Java接口、数据类型定义XSD Schema信息并依据模板创建出该服务组件文件,具体包括以下步骤:In a further preferred embodiment, the service component includes a service assembly file, a dependent resource XSD file and a complex data type Acegis file. The service component generator loads the virtual Java interface corresponding to the service, the data type defines XSD Schema information and creates the service component file according to the template, specifically including the following steps:

(221)所述的服务组件生成器调用服务接口生成器创建的虚拟Java接口作为服务接口;(221) The service component generator invokes the virtual Java interface created by the service interface generator as the service interface;

(222)所述的服务组件生成器根据服务接口的反射数据类型,判断是否依赖相关的XSD文件,若是,则进入步骤(223),若否,则进入步骤(224);(222) The described service component generator judges whether to rely on the relevant XSD file according to the reflection data type of the service interface, if so, then enter step (223), if not, then enter step (224);

(223)服务组件生成器从BPM系统中加载该XSD文件放入服务组件,并进入步骤(224);(223) The service component generator loads the XSD file from the BPM system and puts it into the service component, and enters step (224);

(224)服务组件生成器根据服务接口的反射数据类型,判断是否包含List、Set或Map复杂数据类型,若是,则进入步骤(225),若否,则进入步骤(226);(224) The service component generator judges whether to include List, Set or Map complex data types according to the reflection data type of the service interface, if so, then enter step (225), if not, then enter step (226);

(225)服务组件生成器创建描述复杂类型的Aegis文件放入服务组件中,并进入步骤(226);(225) service component generator creates and describes the Aegis file of complex type and puts into service component, and enters step (226);

(226)服务组件生成器使用模板资源创建服务组件。(226) The service component generator uses the template resource to create the service component.

在另一种较优选的实施方式中,所述的Web Service动态生成模块包括:In another preferred embodiment, the dynamic generation module of Web Service includes:

服务构件加载器,连接所述的服务组件调度器,用以加载所述的服务构件包;A service component loader, connected to the service component scheduler, to load the service component package;

Web Service服务生成器,连接所述的服务构件加载器,通过所述的虚拟java接口生成Web Service服务;Web Service service generator, connects described service component loader, generates Web Service service by described virtual java interface;

Web Service服务接入器,连接所述的Web Service服务生成器,并连接所述的动态服务管理模块、灾难恢复模块、安全控制模块和业务流程服务版本控制模块,用以提供Web Service调用事务的业务处理。Web Service service access device, connected to the Web Service service generator, and connected to the dynamic service management module, disaster recovery module, security control module and business process service version control module, in order to provide Web Service calling transaction business processing.

在一种更优选的实施方式中,所述的企业BPM系统中实现业务流程动态生成Web Service的方法,具体包括以下步骤:In a more preferred embodiment, the method for realizing business process dynamic generation of Web Service in the described enterprise BPM system specifically includes the following steps:

(31)所述的灾难恢复模块在系统遇到灾难故障需要重启时作为启动Listener检查服务组件状态,确定是否启动恢复;(31) The disaster recovery module described in the disaster recovery module checks the service component status as a starting Listener when the system encounters a disaster failure and needs to restart, and determines whether to start recovery;

(32)所述的灾难恢复模块确定启动恢复之后,调用所述的动态Web Service构件装配模块器对系统中故障服务重新生成。(32) After the disaster recovery module determines to start the recovery, it calls the dynamic Web Service component assembly module to regenerate the faulty service in the system.

所述的安全控制模块进行业务流程服务安全拦截操作,具体为:所述的安全控制模块根据系统配置的用户名和口令对服务请求进行拦截,并禁止未授权用户调用。The security control module performs the security interception operation of the business process service, specifically: the security control module intercepts the service request according to the user name and password configured in the system, and prohibits unauthorized users from calling it.

所述的Web Service动态生成模块进行业务流程服务接入操作,具体为:所述的WebService动态生成模块根据系统配置的用户名和口令对服务请求进行拦截,并禁止未授权用户调用。The described Web Service dynamic generation module performs business process service access operation, specifically: the described Web Service dynamic generation module intercepts the service request according to the user name and password configured by the system, and prohibits unauthorized users from invoking.

所述的动态服务管理模块进行动态服务管理操作,具体为:所述的动态服务管理模块对系统内所有的服务组件进行管理。所述的管理包括查询服务WSDL和统计服务数据。The dynamic service management module performs dynamic service management operations, specifically: the dynamic service management module manages all service components in the system. The management includes querying service WSDL and statistical service data.

在本发明的实际应用中,如图2至图7所示,该企业BPM系统中实现业务流程动态生成Web Service的系统和方法中,所述的系统结构包括:In the practical application of the present invention, as shown in Fig. 2 to Fig. 7, in this enterprise BPM system realizes in the system and the method that business process dynamically generates Web Service, described system structure comprises:

(1)业务流程服务接口定义模块,定义业务流程的服务接口,其中包括:(1) The business process service interface definition module defines the service interface of the business process, including:

(a)元数据模型解析器,负责维护业务流程动态Web Service支持的数据类型,包括JavaBean对象和XSD用户自定义的类型等;(a) The metadata model parser is responsible for maintaining the data types supported by the business process dynamic Web Service, including JavaBean objects and XSD user-defined types, etc.;

(b)业务流程服务定义接口配置,通过接口定义配置流程的服务接口描述信息,如服务名称,服务参数等;(b) Business process service definition interface configuration, through the interface definition configuration process service interface description information, such as service name, service parameters, etc.;

(c)服务接口定义分析器,提供服务接口解析的能力,转换为服务相关的Java对象;(c) Service interface definition analyzer, which provides the capability of analyzing service interface and converts it into service-related Java objects;

(2)服务动态生成模块,与所述的业务流程服务接口定义模块相连接,在流程部署时候动态生成Web Service,其中包括:(2) The service dynamic generation module is connected with the business process service interface definition module, and dynamically generates Web Service when the process is deployed, including:

(a)服务生成器,通过结构化定义的服务定义,服务生成器能够模拟出Java接口;(a) Service generator, through the structurally defined service definition, the service generator can simulate the Java interface;

(b)服务组件生成器,负责为每一个服务组件生成服务组件,以及依赖的资源文件;(b) Service component generator, responsible for generating service components and dependent resource files for each service component;

(c)服务组件调度器,调度服务组件生成之后的发布过程,包括逐出原版本、更新缓存等操作;(c) The service component scheduler, which schedules the publishing process after the service component is generated, including operations such as evicting the original version and updating the cache;

(d)服务版本控制器,业务流程特殊的版本属性使得流程服务需要版本控制,版本控制器维护当前流程的服务版本。(d) Service version controller. The special version attribute of the business process makes the process service need version control, and the version controller maintains the service version of the current process.

图2为本发明的企业BPM系统中实现业务流程动态生成Web Service的系统中的服务动态生成模块的类图,其中包括:Fig. 2 is the class diagram of the service dynamic generation module in the system that realizes business process dynamic generation Web Service in the enterprise BPM system of the present invention, wherein includes:

ProcessServiceModuleActivator:接口ModuleActivator的实现,通过ExtensionPointRegistry的实例获得系统中已注册的扩展类型,添加扩展点的实现;ProcessServiceModuleActivator: the implementation of the interface ModuleActivator, obtain the registered extension type in the system through the instance of ExtensionPointRegistry, and add the implementation of the extension point;

ProcessDirectProcesser:接口StAXArtifactProcessor的实现,读取到在composite文件中定义的新的component时,回调read()方法;ProcessDirectProcesser: the implementation of the interface StAXArtifactProcessor, when the new component defined in the composite file is read, the read() method is called back;

ModelFactoryExtensionPoint:用来获取系统中已注册的AssemblyFactory与JavaInterfaceFactory;ModelFactoryExtensionPoint: used to obtain the AssemblyFactory and JavaInterfaceFactory registered in the system;

AssemblyFactory:用来创建新的服务;AssemblyFactory: used to create new services;

JavaInterfaceFactory:用来创建新的java接口;JavaInterfaceFactory: used to create new java interfaces;

IProcessServiceImplementation:流程服务的实现,封装基于流程的服务信息;IProcessServiceImplementation: the implementation of process services, encapsulating process-based service information;

ProcessServiceProviderFactory:接口ImplementationProviderFactory的实现,添加运行时信息的扩展点,流程服务的逻辑提供者的工厂,用于实例化逻辑提供者;ProcessServiceProviderFactory: the implementation of the interface ImplementationProviderFactory, the extension point for adding runtime information, the factory of the logic provider of the process service, used to instantiate the logic provider;

ProcessServiceProvider:流程服务的逻辑提供者,负责创建具体Invoker;ProcessServiceProvider: the logical provider of the process service, responsible for creating a specific Invoker;

ProcessDirectInvoker:接口invoker的实现,流程服务执行器,调用发布的Web Service时会回调invoke()方法。ProcessDirectInvoker: The implementation of the interface invoker, the process service executor, will call back the invoke() method when calling the published Web Service.

图3为本发明的企业BPM系统中实现业务流程动态生成Web Service的系统中的服务组件生成器的类图,其中包括:Fig. 3 is the class diagram of the service component generator in the system that realizes business flow dynamic generation Web Service in the enterprise BPM system of the present invention, wherein includes:

IModelChangeListener:资源变更监听器接口;IModelChangeListener: resource change listener interface;

XSDResourceChangedListener:XSD/Wsdl资源变更监听器;XSDResourceChangedListener: XSD/Wsdl resource change listener;

WorkflowChangeListener:流程变更监听器;WorkflowChangeListener: Process change listener;

DefinitionCacheService:流程定义缓存服务;DefinitionCacheService: process definition cache service;

IMessageStartEventInquire:MessageStartEvent节点查询接口IMessageStartEventInquire: MessageStartEvent node query interface

ResourceChangedComponentManager:构件包管理器;ResourceChangedComponentManager: component package manager;

ResourceChangedMissionFactory:资源变更任务工厂;ResourceChangedMissionFactory: Resource Changed Mission Factory;

ResourceChangedMission:资源变更的构件包生成任务;ResourceChangedMission: component package generation task for resource changes;

XSDWSDLResourceChangedMission:XSD/Wsdl资源变更构件包更新任务;XSDWSDLResourceChangedMission: XSD/Wsdl resource change component package update task;

MseWFChangeMission:MessageStartEvent流程变更构件包更新任务。MseWFChangeMission: MessageStartEvent process change component package update task.

(3)灾难恢复模块,当系统遇到故障重启之后恢复流程服务时候自动根据故障情况,在BPM系统中生成Web Service,其中包括:(3) The disaster recovery module, when the system encounters a fault and restarts to restore the process service, automatically generates a Web Service in the BPM system according to the fault situation, including:

(a)服务恢复处理器,判断故障情况在灾难恢复过程动态创建新的业务流程服务,(a) The service recovery processor, which judges the failure situation and dynamically creates new business process services during the disaster recovery process,

从而实现系统自动恢复;So as to realize the automatic recovery of the system;

图5为本发明的企业BPM系统中实现业务流程动态生成Web Service的系统中的灾难恢复模块的类图,其中包括:Fig. 5 is the class diagram of the disaster recovery module in the system that realizes business process to dynamically generate Web Service in the enterprise BPM system of the present invention, including:

IComponentLoad:构件包加载接口;IComponentLoad: component package loading interface;

ComponentLoadTimer:构件包加载定时器;ComponentLoadTimer: component package loading timer;

ComponentLoadTimerTask:构件包加载定时任务。ComponentLoadTimerTask: component package loading timing task.

(4)安全控制模块,在上述服务组件生成器创建服务组件时候调用,根据系统安全配置对服务组件增加安全性,其中包括:(4) The security control module is invoked when the above-mentioned service component generator creates the service component, and adds security to the service component according to the system security configuration, including:

(a)安全控制器,对服务组件的安全控制,支持WS-Security协议;(a) Security controller, which controls the security of service components and supports WS-Security protocol;

(5)动态服务接入模块,服务调用者调用业务流程服务时候,把Web Service调用转换为流程引擎的调度,其中包括:(5) The dynamic service access module, when the service caller calls the business process service, converts the Web Service call into the scheduling of the process engine, including:

(a)动态服务转换器,映射Web Service调用为流程引擎的调度操作;(a) Dynamic service converter, mapping Web Service calls to scheduling operations of the process engine;

图4为本发明的企业BPM系统中实现业务流程动态生成Web Service的系统中的服务接入模块的类图,其中包括:Fig. 4 is the class diagram of the service access module in the system that realizes business flow dynamic generation Web Service in the enterprise BPM system of the present invention, wherein includes:

Invoker:Web Service服务接入接口;Invoker: Web Service service access interface;

DynamicWebServiceInvoker:Invoker接口实现,用来处理动态生成的Web Service服务的接入;DynamicWebServiceInvoker: Invoker interface implementation, used to handle the access of dynamically generated Web Service services;

Message:调用Web Service服务时传入的参数;Message: the parameters passed in when calling the Web Service;

IMessageStartEventProcessManager:MessageStartEvent流程管理接口。IMessageStartEventProcessManager: MessageStartEvent process management interface.

(6)动态服务管理模块,提供对系统内动态Web Service的管理功能,包括服务查询、服务监控等。(6) The dynamic service management module provides management functions for dynamic Web Services in the system, including service query and service monitoring.

基于上述的系统结构可以看出,本发明在设计和实现过程中是服务概念的一种延伸和抽象,把包含业务含义的业务流程抽象出服务的概念,该服务可以直接映射到软件领域的WebService,基于这种思路做到软件模块化,并且与BPM系统解耦,本发明描述的技术完全可以适应与其他领域,如规则系统、专家系统、决策支持系统等。Based on the above system structure, it can be seen that the present invention is an extension and abstraction of the service concept in the process of design and implementation, abstracting the business process containing business meaning from the service concept, and the service can be directly mapped to the WebService in the software field , based on this idea to achieve software modularization and decoupling from the BPM system, the technology described in the present invention can be fully adapted to other fields, such as rule systems, expert systems, and decision support systems.

本发明的核心设计是提供一种动态生成服务的框架,框架负责监听服务生成事件、执行服务生成、维护服务组件等,并且基于此框架实现BPM系统中业务流程的动态服务生成。本发明的实现原理如下:The core design of the present invention is to provide a framework for dynamically generating services. The framework is responsible for monitoring service generation events, executing service generation, maintaining service components, etc., and realizing dynamic service generation of business processes in the BPM system based on this framework. Realization principle of the present invention is as follows:

BPM系统中是以图形化语言描述业务执行过程,最终形成物理结构为XML文档的业务流程,其中包含流程、活动、属性定义、事件定义等概念,在业内又分为多个标准规范,如XPDL、BPEL、BPMN等。通常业务流程是通过客户端程序调用API的方式发起流程,流程引擎启动部署的业务流程结合各类资源等,在执行过程中需要流程引擎按照调度算法执行,在流程运行的不同环节,例如Human Task需要人工参与,而Service Task则通过调用本地Java方法或者Web Service的方式执行活动。The BPM system uses a graphical language to describe the business execution process, and finally forms a business process whose physical structure is an XML document, which includes concepts such as process, activity, attribute definition, and event definition. It is divided into multiple standard specifications in the industry, such as XPDL , BPEL, BPMN, etc. Usually, the business process is initiated by calling the API from the client program. The process engine starts and deploys the business process combined with various resources. During the execution process, the process engine needs to execute according to the scheduling algorithm. In different links of the process operation, such as Human Task Human participation is required, while Service Task performs activities by calling local Java methods or Web Services.

从以上业务流程的工作过程,可以抽象出关于业务流程的如下概念:From the working process of the above business process, the following concepts about business process can be abstracted:

1.流程接口:流程接入是BPM系统的入口,即一组可调用的API,包括JavaAPI、WebService、Restful Web等形式。1. Process interface: Process access is the entrance of the BPM system, that is, a set of callable APIs, including JavaAPI, WebService, Restful Web and other forms.

2.流程:流程是BPM系统执行的基本单元,BPM系统中的流程引擎根据流程定义的分支聚合模式计算流程的迁移路线。2. Process: The process is the basic unit of BPM system execution. The process engine in the BPM system calculates the migration route of the process according to the branch aggregation mode defined by the process.

3.图元:图元是流程中最小粒度的执行单元,流程引擎依据图元上的配置进行不同业务语义的执行;3. Graphics: Graphics are the smallest granularity execution unit in the process, and the process engine executes different business semantics according to the configuration on the graphics;

本方法中服务接口定义就是对以上服务接口概念的扩展,通过在业务流程编排过程增加服务接口定义,满足Web Service的技术要求,为动态生成Web Service提供事实数据结构来源。The service interface definition in this method is an extension of the above service interface concept. By adding the service interface definition in the business process orchestration process, it meets the technical requirements of Web Service and provides a source of factual data structure for dynamically generating Web Service.

在有了事实数据结构来源基础之上,动态生成Web Service需要在流程引擎中加入事件监听器,当流程发生变化,例如流程发布、流程取消发布、流程删除等事件产生之后,事件监听器自动把事件转换为具体的服务创建、服务销毁操作。同时使用监听机制能最大程度上做到软件组件结构解耦,从而能够把本方法抽象为一个动态生成Web Service的框架。另外,通过事件监听机制可以引入异步的服务动态生成,从而提高BPM系统的整体性能。Based on the source of the factual data structure, the dynamic generation of Web Service needs to add an event listener to the process engine. Events are transformed into specific service creation and service destruction operations. At the same time, using the monitoring mechanism can maximize the decoupling of the software component structure, so that this method can be abstracted into a framework for dynamically generating Web Services. In addition, asynchronous service dynamic generation can be introduced through the event monitoring mechanism, thereby improving the overall performance of the BPM system.

本方法的动态Web Service是以服务组件为物理介质来发布Web Service,服务组件是一个包含服务描述文件,服务资源文件如Aegis文件,服务安全配置文件的物理存储结构。而不依赖于具体的服务发布技术(服务发布技术并不是本方法重点阐述的内容),如Aixs2、Apache CXF、Spring WS等。The dynamic Web Service of this method uses the service component as the physical medium to release the Web Service. The service component is a physical storage structure that includes a service description file, a service resource file such as an Aegis file, and a service security configuration file. It does not depend on the specific service publishing technology (the service publishing technology is not the focus of this method), such as Aixs2, Apache CXF, Spring WS, etc.

该基于上述的系统结构BPM系统中实现业务流程动态生成Web Service的方法,所述的方法包括业务流程编排过程定义服务接口信息操作、业务流程部署动态生成Web Service操作、系统故障服务恢复操作、业务流程服务安全拦截操作、业务流程服务接入操作、动态服务管理操作。The method for dynamically generating Web Service by business process in the BPM system based on the above-mentioned system structure, the method includes business process orchestration process definition service interface information operation, business process deployment dynamic generation Web Service operation, system failure service recovery operation, business Process service security interception operation, business process service access operation, dynamic service management operation.

所述的业务流程编排过程定义服务接口信息操作,包括以下步骤:The business process orchestration process defines service interface information operations, including the following steps:

(11)所述的服务定义接口元数据解析器加载BPM系统中动态流程服务支持的数据类型,包括基本简单数据类型和复杂类型,复杂类型包括Java Bean、List、Set、Map和自定义的XSD数据类型,加载复杂XSD类型包括以下步骤;(11) The service definition interface metadata parser loads the data types supported by the dynamic process service in the BPM system, including basic simple data types and complex types, and the complex types include Java Bean, List, Set, Map and self-defined XSD Data type, loading complex XSD type includes the following steps;

(a)导入目标XSD,选择本地XSD定义文件或者提供网络URL地址;(a) Import the target XSD, select a local XSD definition file or provide a network URL address;

(b)判断导入类型对应的命名空间内是否已经存在该XSD类型,如果存在,则导入过程失败,为了防止同名XSD类型的冲突。(b) Determine whether the XSD type already exists in the namespace corresponding to the imported type, if it exists, the import process fails, in order to prevent the conflict of the XSD type with the same name.

(c)元数据解析器对成功导入的XSD类型建立元数据库。(c) The metadata parser builds a metadata database for the successfully imported XSD types.

(12)所述的业务流程服务接口定义配置器在编排流程的时候配置服务接口,包括如下步骤;(12) The business process service interface definition configurator configures the service interface when orchestrating the process, including the following steps;

(a)编排业务流程,设置流程使用消息启动事件(BPMN规范描述的Message StartEvent),即确定此业务流程通过消息的方式启动;(a) Orchestrate the business process, set the process to use the message start event (Message StartEvent described in the BPMN specification), that is, determine that the business process is started by means of a message;

(b)消息启动事件中定义服务接口名称,例如Account Service,定义服务接口操作名称,例如operation1;(b) Define the service interface name in the message start event, such as Account Service, and define the service interface operation name, such as operation1;

(c)设置服务接口参数,从元数据提供的数据类型中选择数据类型,定义参数名称,以及参数类型,包括输入参数列表和输出参数列表;(c) Set service interface parameters, select data types from the data types provided by metadata, define parameter names, and parameter types, including input parameter lists and output parameter lists;

(13)所述的服务接口定义分析器把业务流程中的服务定义解析为服务对象,其中服务定义使用XML片段描述,服务定义规格约束使用XSD Schema描述,所述的服务接口分析器生成的服务对象为Java Bean;(13) The service interface definition analyzer in the business process is parsed into a service object by the service interface definition analyzer, wherein the service definition uses an XML fragment description, and the service definition specification constraint uses an XSD Schema description, and the service generated by the service interface analyzer The object is a Java Bean;

(a)所述的服务接口定义分析器在BPM引擎启动过程注入到业务流程解析器中;(a) the service interface definition analyzer is injected into the business process analyzer during the BPM engine startup process;

(b)当完成业务流程建模和设计,提交部署流程时候,BPM引擎触发业务流程解析器事件,会调用业务流程解析器调用服务接口定义分析器对服务接口定义XML片段解析为包含服务名称,服务参数列表的Java Bean对象,并且缓存该对象;(b) When the business process modeling and design is completed and the deployment process is submitted, the BPM engine triggers the business process parser event, and calls the business process parser to call the service interface definition parser to parse the service interface definition XML fragment to include the service name, The Java Bean object of the service parameter list, and cache the object;

所述的业务流程部署动态生成Web Service操作,包括以下步骤:The described business process deployment dynamically generates Web Service operations, including the following steps:

(21)所述的服务生成器把服务对象转换为虚拟Java接口,使用ASM框架,在JVM中用字节码的方式直接创建Java接口,采用如下转换规则,服务对象中的服务名称转换为Java虚拟接口的名称,服务对象中的操作名称转换为Java虚拟接口的方法名称,服务对象中的参数列表转换为Java虚拟接口的方法参数。(21) The service generator described in (21) converts the service object into a virtual Java interface, uses the ASM framework, directly creates the Java interface with the mode of bytecode in the JVM, adopts the following conversion rules, and the service name in the service object is converted into Java The name of the virtual interface, the operation name in the service object is converted to the method name of the Java virtual interface, and the parameter list in the service object is converted to the method parameter of the Java virtual interface.

(22)所述的服务组件生成器依据服务对应的虚拟Java接口、数据类型定义XSD Schema信息,组件生成器依据模板创建出该服务组件文件,服务组件是可以被服务容器加载并且识别的文件结构;(22) The service component generator defines XSD Schema information according to the virtual Java interface and data type corresponding to the service, and the component generator creates the service component file according to the template, and the service component is a file structure that can be loaded and recognized by the service container ;

(23)所述的服务组件调度器负责对服务组件调度,包括服务组件部署、激活、发布、销毁等;(23) The service component scheduler is responsible for scheduling service components, including service component deployment, activation, release, destruction, etc.;

(a)服务组件调度器对组件生成器创建的服务组件统一调度,组件首先是被部署到指定组件仓库;(a) The service component scheduler uniformly schedules the service components created by the component generator, and the components are first deployed to the specified component warehouse;

(b)组件调度器激活目标组件,在激活过程中识别相应的资源文件,例如XSD等交由XSD资源处理器加载;(b) The component scheduler activates the target component, and identifies the corresponding resource file during the activation process, such as XSD, etc., which are loaded by the XSD resource processor;

(c)组件调度器对正确激活的组件进行发布,以Web Service方式提供出来;24)所述的版本控制器对服务组件版本进行切换,把发布版本服务组件作为默认服务;所述的系统故障恢复操作,包括以下步骤:(c) The component scheduler publishes the correctly activated components and provides them in the form of Web Service; 24) The version controller switches the version of the service component, and uses the service component of the released version as the default service; the system failure described Recovery operation, including the following steps:

(31)所述的服务灾难恢复处理器是在系统遇到灾难故障需要重启时,灾难恢复处理器作为启动Listener检查服务组件状态,确定是否启动恢复;(31) The service disaster recovery processor is that when the system encounters a disaster failure and needs to be restarted, the disaster recovery processor checks the service component status as a startup Listener to determine whether to start recovery;

(32)所述的服务灾难恢复处理器确定启动恢复之后,调用服务生成器对系统中故障服务重新生成;(32) After the service disaster recovery processor determines to start the recovery, it calls the service generator to regenerate the faulty service in the system;

所述的业务流程服务安全拦截操作,包括以下步骤:The business process service security interception operation includes the following steps:

(41)所述的服务安全控制器根据系统配置的用户名和口令对服务请求进行拦截,对未授权用户禁止调用;(41) The service security controller intercepts the service request according to the user name and password configured by the system, and prohibits calls to unauthorized users;

(a)设置启用业务流程动态服务安全性,此设置是全局性设置,即BPM系统中所有的流程采用统一的安全策略,设置服务的用户名和密码;(a) Set and enable the dynamic service security of the business process. This setting is a global setting, that is, all processes in the BPM system adopt a unified security policy, and set the user name and password of the service;

(b)对安全性的修改会触发服务组件的重新部署,规则如下:如果启用服务安全性,服务组件调度器扫描BPM系统内的所有服务组件,增加其安全性策略描述。(b) The modification of security will trigger the redeployment of service components. The rules are as follows: If service security is enabled, the service component scheduler scans all service components in the BPM system and adds its security policy description.

如下描述:Described as follows:

安全策略定义在Definition.xml文件中设置,配置如下The security policy definition is set in the Definition.xml file, and the configuration is as follows

Figure BDA0000087087130000162
Figure BDA0000087087130000162

如果取消服务安全性,则组件调度器扫描服务组件,把其中的If the service security is canceled, the component scheduler scans the service components and puts the

<binding.ws policySets=″sca_1.0:wsAuthenticationPolicy″/>节点删除。<binding.ws policySets="sca_1.0:wsAuthenticationPolicy"/> node is deleted.

(c)用户安全拦截是通过扩展CallbackHandler接口实现,对Web Service调用的用户名和口令与之前设置的匹配,如果未授权用户则抛出异常;(c) User security interception is implemented by extending the CallbackHandler interface. The user name and password invoked by the Web Service match those previously set, and an exception is thrown if the user is not authorized;

所述的业务流程服务接入操作,包括以下步骤:The business process service access operation includes the following steps:

(51)所述的动态Web Service接入模块(Invoker)负责把与BPM系统无关的Web Service调用转换为BPM系统的本地API调用;(51) The described dynamic Web Service access module (Invoker) is responsible for converting the Web Service call irrelevant to the BPM system into the local API call of the BPM system;

(a)Invoker在对Web Service请求过程处理过程分析出当前处理的业务流程名称,请求参数等,最终请求业务流程的Message Start Event执行启动流程。(a) Invoker analyzes the name of the currently processed business process, request parameters, etc. during the processing of the Web Service request process, and finally requests the Message Start Event of the business process to execute the start process.

(b)Invoker调用完成之后把返回结果返回到Web Service的Response中;(b) After the Invoker call is completed, the return result is returned to the Response of the Web Service;

(c)如果发生异常,Invoker把异常信息返回到Fault Body中;(c) If an exception occurs, Invoker returns the exception information to the Fault Body;

所述的动态服务管理操作,包括以下步骤:The dynamic service management operation includes the following steps:

(61)所述的动态服务管理模块对系统内所有的服务组件管理,包括查询服务WSDL、统计服务数据等.(61) The dynamic service management module manages all service components in the system, including query service WSDL, statistical service data, etc.

(a)BPM系统发布的动态Web Service需要提供一个界面查询当前可用的服务列表,支持用户调用或者与ESB系统的集成等,管理模块提供查询功能。(a) The dynamic Web Service released by the BPM system needs to provide an interface to query the list of currently available services, support user calls or integration with the ESB system, etc., and the management module provides query functions.

如图6所示,为本发明的企业BPM系统中实现业务流程动态生成Web Service的方法的时序图,其时序为:As shown in Figure 6, it is a sequence diagram of a method for dynamically generating Web Service by implementing a business process in the enterprise BPM system of the present invention, and its sequence is:

1、当在composite配置文件中读取到扩展的配置信息后,会调用ProcessDirectProcesser中read()方法;1. When the extended configuration information is read in the composite configuration file, the read() method in ProcessDirectProcesser will be called;

2、在read()方法中创建ProcessServiceImplementationImpl的实例;2. Create an instance of ProcessServiceImplementationImpl in the read() method;

3、设置ProcessServiceImplementationImpl中的流程名;3. Set the process name in ProcessServiceImplementationImpl;

4、设置版本号;4. Set the version number;

5、调用ProcessServiceImplementationImpl中的build()方法,创建Web服务;5. Call the build() method in ProcessServiceImplementationImpl to create a Web service;

6、调用assemblyFactory.createService()创建Service的实例;6. Call assemblyFactory.createService() to create an instance of Service;

7、创建Service的实例;7. Create an instance of Service;

8、设置Service的实例的名称,也就是对外发布web服务的名称;8. Set the name of the Service instance, that is, the name of the published web service;

9、根据流程定义,创建对应的java接口;9. According to the process definition, create the corresponding java interface;

10、通过创建的java接口发布wsdl。10. Publish wsdl through the created java interface.

本发明中,业务流程服务发布之后,客户端与BPM系统端交互的桥梁是WSDL(WebService Definition Language),其中包括了以下几个主要元素:In the present invention, after the business process service is released, the bridge between the client and the BPM system is WSDL (WebService Definition Language), which includes the following main elements:

types——数据类型定义的容器,使用XML Schema来描述数据类型的结构信息。types——a container for data type definitions, using XML Schema to describe the structural information of data types.

portType——描述服务操作的抽象集合,与Java接口类似。portType——A collection of abstractions describing service operations, similar to Java interfaces.

binding——数据传输过程中指定的具体传输协议以及所定义操作的数据格式规范。binding——The specific transmission protocol specified in the data transmission process and the data format specification of the defined operation.

service——对外提供的服务。service - the service provided externally.

operation——对服务中所支持的操作的抽象描述,描述了访问入口的请求/响应消息以及异常的声明。operation—an abstract description of the operations supported in the service, describing the request/response message of the access entry and the statement of the exception.

在调用Web Service过程中,客户端与服务器端交互的信息为SOAP消息,以XML格式进行定义,其结构包括了以下几个主要元素:In the process of invoking Web Service, the information exchanged between the client and the server is SOAP message, which is defined in XML format, and its structure includes the following main elements:

SOAP Body——封装了要传递的数据。SOAP Body - encapsulates the data to be passed.

SOAPHeader——作为传递消息的扩展,可以自由添加。SOAPHeader - As an extension for passing messages, it can be added freely.

如图7所示,为利用本发明的方法在企业BPM系统中实现业务流程动态生成Web Service调用的时序图。在外部系统调用发布的流程的Web服务时,会回调ProcessDirectInvoker中的invoke()方法。在invoke()方法中通过IProcessServiceImplementation接口获取流程名和版本号,通过传入的Message参数获取调用Web服务时传入的参数。之后调用引擎的流程启动接口,启动流程。As shown in FIG. 7 , the sequence diagram of Web Service calling is dynamically generated for realizing the business process in the enterprise BPM system by using the method of the present invention. When the external system calls the web service of the published process, it will call back the invoke() method in ProcessDirectInvoker. In the invoke() method, the process name and version number are obtained through the IProcessServiceImplementation interface, and the parameters passed in when calling the Web service are obtained through the passed Message parameter. Then call the process start interface of the engine to start the process.

本发明的BPM系统中实现业务流程动态生成Web Service的方法,包括Web界面编排业务流程定义服务接口和动态生成Web Service,所述的方法包括运行期支撑不同数据对象转换扩展的通用框架和开发期数据对象转换的配置格式定义。运行期支撑不同数据对象转换扩展的通用框架包括数据对象转换的配置加载,通过该配置形成数据类型转换的有向图,根据有向图能找到从源数据类型到目标数据类型转换所需的最短路径,同时针对接入服务以及接出服务时提供不同数据对象的转换操作,数据转换时,接口元数据统一用WSDL进行描述。开发期数据对象转换的配置格式定义包括了针对特定数据类型转换的接口实现以及对转换器的注册。In the BPM system of the present invention, the method for dynamically generating Web Services from business processes includes arranging business processes on a Web interface to define service interfaces and dynamically generating Web Services. Configuration format definition for data object transformations. The general framework supporting different data object conversion extensions at runtime includes configuration loading of data object conversion, through which a directed graph of data type conversion is formed, and the shortest time required for conversion from source data type to target data type can be found according to the directed graph. Path, while providing conversion operations for different data objects when accessing services and receiving services. During data conversion, the interface metadata is described in WSDL. The configuration format definition of data object conversion in the development period includes the interface implementation for specific data type conversion and the registration of the converter.

经过以上步骤,业务流程在编排之后无须编码,系统不用重启,不用技术人员开发即生成了Web Service,其他系统即可以集成在一起,从中可以得出采用了BPM系统中实现业务流程动态生成Web Service的方法,使业务流程的开发工作变得简单而高效,不再需要服务封装等,而且对外的业务服务统一,数据类型一致。After the above steps, the business process does not need to be coded after the arrangement, the system does not need to be restarted, and the Web Service is generated without the development of technicians, and other systems can be integrated together. From this, it can be concluded that the business process is dynamically generated by using the BPM system. Web Service The method makes the development of business processes simple and efficient, no longer needs service encapsulation, etc., and the external business services are unified and the data types are consistent.

采用了该发明的企业BPM系统中实现业务流程动态生成Web Service的系统,其包括业务流程服务接口定义模块、连接该业务流程服务接口定义模块的动态Web Service构件装配模块,连接该动态Web Service构件装配模块的Web Service动态生成模块和灾难恢复模块、连接该Web Service动态生成模块的动态服务管理模块和安全控制模块,以及分别与所述的动态Web Service构件装配模块和Web Service动态生成模块连接的业务流程服务版本控制模块。利用该系统的业务流程动态生成Web Service的方法,其业务流程具有天然的集成特性,在编排流程的同时发布出Web Service,并且服务接口标准统一,无需编码。同时增强了系统可移植性和可扩展性,能够快速适应业务需求的变化和技术变化,能够支撑建立高度模块化而且又高度整合的软件系统,开发期简单,接口明确,配置方便,运行期效率较高、系统性能稳定可靠,适用范围较为广泛,为BPM系统的集成发展打下了坚实的基础。Adopt the enterprise BPM system of this invention to realize the system that business process dynamically generates Web Service, it comprises business process service interface definition module, the dynamic Web Service component assembly module that connects this business process service interface definition module, connects this dynamic Web Service component The Web Service dynamic generation module and the disaster recovery module of the assembly module, the dynamic service management module and the security control module connected to the Web Service dynamic generation module, and the components connected with the dynamic Web Service component assembly module and the Web Service dynamic generation module respectively Business process service versioning module. The method of dynamically generating Web Service by using the business process of the system has natural integration characteristics, and the Web Service is released while the process is arranged, and the service interface standard is unified without coding. At the same time, it enhances the portability and scalability of the system, can quickly adapt to changes in business needs and technology changes, and can support the establishment of a highly modular and highly integrated software system. The development period is simple, the interface is clear, the configuration is convenient, and the operation period is efficient. It is relatively high, the system performance is stable and reliable, and the scope of application is relatively wide, which has laid a solid foundation for the integrated development of the BPM system.

在此说明书中,本发明已参照其特定的实施例作了描述。但是,很显然仍可以作出各种修改和变换而不背离本发明的精神和范围。因此,说明书和附图应被认为是说明性的而非限制性的。In this specification, the invention has been described with reference to specific embodiments thereof. However, it is obvious that various modifications and changes can be made without departing from the spirit and scope of the invention. Accordingly, the specification and drawings are to be regarded as illustrative rather than restrictive.

Claims (15)

1.一种企业BPM系统中实现业务流程动态生成Web Service的系统,其特征在于,所述的系统包括:1. realize the system that business process dynamically generates Web Service in a kind of enterprise BPM system, it is characterized in that, described system comprises: 业务流程服务接口定义模块,用以定义业务流程的Web Service接口信息;所述的业务流程服务接口定义模块包括:Business process service interface definition module, in order to define the Web Service interface information of business process; Described business process service interface definition module comprises: 服务接口元数据模型解析器,用以对BPM系统所支持的数据类型进行解析;The service interface metadata model resolver is used to analyze the data types supported by the BPM system; 业务流程服务接口定义配置器,与所述的服务接口元数据模型解析器连接,用以对业务流程定义服务接口的服务名称和服务参数用XML语言进行定义;The business process service interface definition configurator is connected with the service interface metadata model parser to define the service name and service parameters of the business process definition service interface in XML language; 服务接口定义分析器,与所述的业务流程服务接口定义配置器连接,并连接所述的动态Web Service构件装配模块,用以将服务接口定义转换为服务对象;The service interface definition analyzer is connected with the described business process service interface definition configurator, and connected with the described dynamic Web Service component assembly module, in order to convert the service interface definition into a service object; 动态Web Service构件装配模块,与所述的业务流程服务接口定义模块连接,用以根据业务流程的Web Service接口信息装配构件;The dynamic Web Service component assembly module is connected with the business process service interface definition module to assemble components according to the Web Service interface information of the business process; Web Service动态生成模块,与所述的动态Web Service构件装配模块连接,用以加载所述的构件,生成Web Service服务,并提供Web Service服务接入处理;The Web Service dynamic generation module is connected with the dynamic Web Service component assembly module to load the components, generate Web Service services, and provide Web Service service access processing; 动态服务管理模块,与所述的Web Service动态生成模块连接,用以对Web Service进行管理操作;The dynamic service management module is connected with the dynamic generation module of Web Service to manage the Web Service; 灾难恢复模块,与所述的动态Web Service构件装配模块,用以在系统重启时根据系统中的业务流程自动生成Web Service;The disaster recovery module, and the dynamic Web Service component assembly module, are used to automatically generate Web Service according to the business process in the system when the system is restarted; 安全控制模块,与所述的Web Service动态生成模块连接,用以对Web Service服务提供安全保障;Security control module, is connected with described Web Service dynamic generation module, in order to Web Service service provides safety guarantee; 业务流程服务版本控制模块,分别与所述的动态Web Service构件装配模块和Web Service动态生成模块连接,用以向所述系统中存在的多版本的业务流程服务提供多版本的动态服务。The business process service version control module is respectively connected with the dynamic Web Service component assembly module and the Web Service dynamic generation module to provide multi-version dynamic services to the multi-version business process services existing in the system. 2.根据权利要求1所述的企业BPM系统中实现业务流程动态生成Web Service的系统,其特征在于,所述的动态Web Service构件装配模块包括:2. in the enterprise BPM system according to claim 1, realize the system that business process dynamically generates Web Service, it is characterized in that, described dynamic Web Service component assembly module comprises: 服务接口生成器,连接所述的服务接口定义分析器,根据所述的服务接口定义产生服务虚拟java接口;A service interface generator, connected to the service interface definition analyzer, generates a service virtual java interface according to the service interface definition; 服务组件生成器,连接所述的服务接口生成器,根据所述的服务接口定义创建包含服务和数据类型资源的服务构件包;The service component generator is connected to the service interface generator, and creates a service component package containing services and data type resources according to the service interface definition; 服务组件调度器,连接所述的服务组件生成器,并连接所述的Web Service动态生成模块,根据所述的服务接口定义对服务组件的部署、发布、销毁进行调度。The service component scheduler connects the service component generator and the Web Service dynamic generation module, and schedules the deployment, release and destruction of the service component according to the service interface definition. 3.根据权利要求2所述的企业BPM系统中实现业务流程动态生成Web Service的系统,其特征在于,所述的Web Service动态生成模块包括:3. in the enterprise BPM system according to claim 2, realize the system that business process dynamically generates Web Service, it is characterized in that, described Web Service dynamic generation module comprises: 服务构件加载器,连接所述的服务组件调度器,用以加载所述的服务构件包;A service component loader, connected to the service component scheduler, to load the service component package; Web Service服务生成器,连接所述的服务构件加载器,通过所述的虚拟java接口生成Web Service服务;Web Service service generator, connects described service component loader, generates Web Service service by described virtual java interface; Web Service服务接入器,连接所述的Web Service服务生成器,并连接所述的动态服务管理模块、灾难恢复模块、安全控制模块和业务流程服务版本控制模块,用以提供Web Service调用事务的业务处理。Web Service service access device, connected to the Web Service service generator, and connected to the dynamic service management module, disaster recovery module, security control module and business process service version control module, in order to provide Web Service calling transaction business processing. 4.一种利用权利要求1所述的系统实现企业BPM系统中实现业务流程动态生成WebService的方法,其特征在于,所述的方法包括以下步骤:4. a method utilizing the system described in claim 1 to realize business process dynamic generation WebService in the enterprise BPM system, is characterized in that, described method comprises the following steps: (1)所述的业务流程服务接口定义模块进行业务流程编排过程定义服务接口信息操作,具体包括以下步骤:(1) The business process service interface definition module performs business process orchestration process definition service interface information operations, specifically including the following steps: (11)所述的服务接口元数据模型解析器加载系统支持的数据类型,所述的数据类型(11) The data type supported by the service interface metadata model resolver loading system, the data type 包括简单数据类型和复杂数据类型;Including simple data types and complex data types; (12)所述的业务流程服务接口定义配置器编排流程并配置服务接口;(12) The business process service interface definition configurator orchestrates the process and configures the service interface; (13)所述的服务接口定义分析器将业务流程中的服务定义解析为服务对象;(13) The service interface definition analyzer parses the service definition in the business process into a service object; (2)所述的动态Web Service构件装配模块和所述的业务流程服务版本控制模块进行业务流程热部署动态生成Web Service操作;(2) The dynamic Web Service component assembly module and the business process service version control module perform hot deployment of business processes to dynamically generate Web Service operations; (3)所述的灾难恢复模块进行系统故障恢复操作;(3) The disaster recovery module performs system failure recovery operations; (4)所述的安全控制模块进行业务流程服务安全拦截操作;(4) The security control module performs security interception operations of business process services; (5)所述的Web Service动态生成模块进行业务流程服务接入操作;(5) The Web Service dynamic generation module performs business process service access operations; (6)所述的动态服务管理模块进行动态服务管理操作。(6) The dynamic service management module performs dynamic service management operations. 5.根据权利要求4所述的企业BPM系统中实现业务流程动态生成Web Service的方法,其特征在于,所述的复杂数据类型为Java Bean、List、Set和Map类型中的一种或者多种。5. in the enterprise BPM system according to claim 4, realize the method that business flow dynamically generates Web Service, it is characterized in that, described complex data type is one or more in Java Bean, List, Set and Map type . 6.根据权利要求4所述的企业BPM系统中实现业务流程动态生成Web Service的方法,其特征在于,所述的服务接口定义是包含接口定义结构描述XSD Schema的XML片段,服务接口定义包含服务接口名称和服务接口参数列表,所述的服务接口参数列表包括传入参数和返回值。6. in the enterprise BPM system according to claim 4, realize the method that business flow dynamically generates Web Service, it is characterized in that, described service interface definition is to comprise the XML fragment of interface definition structure description XSD Schema, and service interface definition comprises service An interface name and a service interface parameter list, the service interface parameter list includes incoming parameters and return values. 7.根据权利要求6所述的企业BPM系统中实现业务流程动态生成Web Service的方法,其特征在于,所述的服务接口定义分析器将业务流程中的服务定义解析为服务对象,具体包括以下步骤:7. in the enterprise BPM system according to claim 6, realize the method that business process dynamically generates Web Service, it is characterized in that, described service interface definition analyzer resolves the service definition in business process into service object, specifically comprises the following step: (131)所述的服务接口定义分析器在BPM引擎启动过程注入到服务接口元数据模型解析器中;(131) The service interface definition analyzer is injected into the service interface metadata model parser during the BPM engine startup process; (132)Web界面部署流程时候,服务接口元数据模型解析器调用服务接口定义分析器对服务接口定义XML片段解析为包含服务名称,服务参数列表的Java Bean对象,并且缓存该Java Bean对象。(132) During the web interface deployment process, the service interface metadata model parser invokes the service interface definition parser to parse the service interface definition XML fragment into a Java Bean object containing the service name and service parameter list, and caches the Java Bean object. 8.根据权利要求4所述的企业BPM系统中实现业务流程动态生成Web Service的方法,其特征在于,所述的动态Web Service构件装配模块包括:服务接口生成器、连接所述的服务接口生成器的服务组件生成器以及连接所述的服务组件生成器的服务组件调度器,所述的动态Web Service构件装配模块和业务流程服务版本控制模块进行业务流程热部署动态生成Web Service操作,具体包括以下步骤:8. in the enterprise BPM system according to claim 4, realize the method that business flow dynamically generates Web Service, it is characterized in that, described dynamic Web Service component assembly module comprises: service interface generator, connection described service interface generation The service component generator of the server and the service component scheduler connected to the service component generator, the dynamic Web Service component assembly module and the business process service version control module perform business process hot deployment to dynamically generate Web Service operations, specifically including The following steps: (21)所述的服务接口生成器根据业务流程动态部署触发将服务对象转换为虚拟Java接口;(21) The service interface generator triggers the conversion of the service object into a virtual Java interface according to the dynamic deployment of the business process; (22)所述的服务组件生成器加载服务对应的虚拟Java接口、数据类型定义XSD Schema信息,并依据模板创建出该服务组件文件;(22) The service component generator loads the corresponding virtual Java interface and data type definition XSD Schema information of the service, and creates the service component file according to the template; (23)所述的服务组件调度器对服务组件进行调度,所述的调度包括服务组件部署、发布和销毁;(23) The service component scheduler schedules the service components, and the scheduling includes service component deployment, release and destruction; (24)所述的业务流程服务版本控制模块对服务组件版本进行切换,并将发布版本服务组件作为默认服务。(24) The business process service version control module switches the version of the service component, and uses the service component of the released version as the default service. 9.根据权利要求8所述的企业BPM系统中实现业务流程动态生成Web Service的方法,其特征在于,所述的服务组件包含服务装配文件、依赖资源XSD文件和复杂数据类型Acegis文件。9. in the enterprise BPM system according to claim 8, realize the method that business process dynamically generates Web Service, it is characterized in that, described service component comprises service assembly file, dependent resource XSD file and complex data type Acegis file. 10.根据权利要求9所述的企业BPM系统中实现业务流程动态生成Web Service的方法,其特征在于,所述的服务组件生成器加载服务对应的虚拟Java接口、数据类型定义XSDSchema信息并依据模板创建出该服务组件文件,具体包括以下步骤:10. in the enterprise BPM system according to claim 9, realize the method that business process dynamically generates Web Service, it is characterized in that, described service component generator loads the corresponding virtual Java interface of service, data type definition XSDSchema information and according to template Create the service component file, including the following steps: (221)所述的服务组件生成器调用服务接口生成器创建的虚拟Java接口作为服务接口;(221) The service component generator invokes the virtual Java interface created by the service interface generator as the service interface; (222)所述的服务组件生成器根据服务接口的反射数据类型,判断是否依赖相关的XSD文件,若是,则进入步骤(223),若否,则进入步骤(224);(222) The service component generator determines whether it depends on the relevant XSD file according to the reflection data type of the service interface, if yes, then enters step (223), if not, then enters step (224); (223)服务组件生成器从BPM系统中加载该XSD文件放入服务组件,并进入步骤(224);(223) The service component generator loads the XSD file from the BPM system into the service component, and enters step (224); (224)服务组件生成器根据服务接口的反射数据类型,判断是否包含List、Set或Map复杂数据类型,若是,则进入步骤(225),若否,则进入步骤(226);(224) The service component generator judges whether the complex data type of List, Set or Map is included according to the reflection data type of the service interface, and if so, proceeds to step (225), if not, proceeds to step (226); (225)服务组件生成器创建描述复杂类型的Aegis文件放入服务组件中,并进入步骤(226);(225) The service component generator creates an Aegis file describing complex types and puts it into the service component, and enters step (226); (226)服务组件生成器使用模板资源创建服务组件。(226) The service component generator uses template resources to create service components. 11.根据权利要求4所述的企业BPM系统中实现业务流程动态生成Web Service的方法,其特征在于,所述的灾难恢复模块进行系统故障恢复操作,具体包括以下步骤:11. in the enterprise BPM system according to claim 4, realize the method that business process dynamically generates Web Service, it is characterized in that, described disaster recovery module carries out system failure recovery operation, specifically comprises the following steps: (31)所述的灾难恢复模块在系统遇到灾难故障需要重启时作为启动Listener检查服务组件状态,确定是否启动恢复;(31) The disaster recovery module is used as a startup Listener to check the status of the service component when the system encounters a disaster and needs to be restarted, and determines whether to start the recovery; (32)所述的灾难恢复模块确定启动恢复之后,调用所述的动态Web Service构件装配模块器对系统中故障服务重新生成。(32) After the disaster recovery module determines to start the recovery, it calls the dynamic Web Service component assembly module to regenerate the faulty service in the system. 12.根据权利要求4所述的企业BPM系统中实现业务流程动态生成Web Service的方法,其特征在于,所述的安全控制模块进行业务流程服务安全拦截操作,具体为:12. in the enterprise BPM system according to claim 4, realize the method that business process dynamically generates Web Service, it is characterized in that, described security control module carries out business process service security interception operation, specifically: 所述的安全控制模块根据系统配置的用户名和口令对服务请求进行拦截,并禁止未授权用户调用。The security control module intercepts the service request according to the user name and password configured by the system, and prohibits unauthorized users from invoking it. 13.根据权利要求4所述的企业BPM系统中实现业务流程动态生成Web Service的方法,其特征在于,所述的Web Service动态生成模块进行业务流程服务接入操作,具体为:13. in the enterprise BPM system according to claim 4, realize the method that business process dynamically generates Web Service, it is characterized in that, described Web Service dynamic generation module carries out business process service access operation, specifically: 所述的Web Service动态生成模块根据系统配置的用户名和口令对服务请求进行拦截,并禁止未授权用户调用。The described Web Service dynamic generation module intercepts the service request according to the user name and password configured by the system, and prohibits unauthorized users from invoking. 14.根据权利要求4所述的企业BPM系统中实现业务流程动态生成Web Service的方法,其特征在于,所述的动态服务管理模块进行动态服务管理操作,具体为:14. in the enterprise BPM system according to claim 4, realize the method that business process dynamically generates Web Service, it is characterized in that, described dynamic service management module carries out dynamic service management operation, specifically: 所述的动态服务管理模块对系统内所有的服务组件进行管理。The dynamic service management module manages all service components in the system. 15.根据权利要求14所述的企业BPM系统中实现业务流程动态生成Web Service的方法,其特征在于,所述的管理包括查询服务WSDL和统计服务数据。15. The method for realizing business process dynamic generation Web Service in the enterprise BPM system according to claim 14, is characterized in that, described management comprises inquiry service WSDL and statistical service data.
CN2011102512528A 2011-08-29 2011-08-29 System and Method for Dynamically Generating Web Service from Business Process in BPM Expired - Fee Related CN102291464B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2011102512528A CN102291464B (en) 2011-08-29 2011-08-29 System and Method for Dynamically Generating Web Service from Business Process in BPM

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2011102512528A CN102291464B (en) 2011-08-29 2011-08-29 System and Method for Dynamically Generating Web Service from Business Process in BPM

Publications (2)

Publication Number Publication Date
CN102291464A CN102291464A (en) 2011-12-21
CN102291464B true CN102291464B (en) 2013-11-27

Family

ID=45337564

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2011102512528A Expired - Fee Related CN102291464B (en) 2011-08-29 2011-08-29 System and Method for Dynamically Generating Web Service from Business Process in BPM

Country Status (1)

Country Link
CN (1) CN102291464B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104731606A (en) * 2015-04-10 2015-06-24 上海普坤信息科技有限公司 System and method based on identification grasping technology to achieve enterprise application integration management

Families Citing this family (22)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102902577B (en) * 2012-09-28 2015-05-27 方正国际软件有限公司 Cross-system service layering processing system in heterogeneous environment
CN103677913B (en) * 2013-12-06 2017-07-25 华为技术有限公司 Business processing method and device based on business process management BPM
CN103677845B (en) * 2013-12-24 2017-02-15 广联达软件股份有限公司 Website application deployment method
CN104809126B (en) * 2014-01-26 2019-03-05 北京理工大学 Business process engine system
CN104899015A (en) * 2014-03-07 2015-09-09 上海高达星软件系统有限公司 Service component management system and method thereof
CN106649078B (en) * 2015-11-02 2019-06-25 阿里巴巴集团控股有限公司 Application interface test method and device
CN106850546B (en) * 2016-12-15 2020-04-17 武汉滨湖电子有限责任公司 Map module software organization method of radar terminal
CN107632875B (en) * 2017-10-09 2020-07-03 用友网络科技股份有限公司 E-commerce interface integration method, system, computer equipment and readable storage medium
CN108121578B (en) * 2017-12-29 2021-06-25 东软集团股份有限公司 Method and device for generating application program, storage medium and electronic equipment
CN108540321A (en) * 2018-04-06 2018-09-14 南京数脉动力信息技术有限公司 A kind of Internet service interface data processing method that reliability is high
CN108959537B (en) * 2018-06-29 2021-03-26 新华三大数据技术有限公司 Web service interface acquisition method and device
CN111273916B (en) * 2018-12-04 2024-09-20 京东科技控股股份有限公司 Algorithm hot deployment method, device, computer system and medium
CN111522633A (en) * 2019-02-01 2020-08-11 中科星图股份有限公司 Service Deployment Method and Migration Method
CN110308896B (en) * 2019-06-26 2022-08-09 浪潮金融信息技术有限公司 Development method for dynamic arrangement of shipment process in self-service vending machine
CN110673892B (en) * 2019-09-17 2023-01-03 中电万维信息技术有限责任公司 Interface unified calling method based on component configuration
CN110750415B (en) * 2019-09-20 2023-02-07 平安普惠企业管理有限公司 Interface service configuration method, device, medium and computer equipment
CN110837914A (en) * 2019-09-26 2020-02-25 深圳市保臻社区服务科技有限公司 Method and device for promoting management charge payment rate and computer readable storage medium
CN110807542A (en) * 2019-09-26 2020-02-18 深圳市保臻社区服务科技有限公司 Method, apparatus and computer readable storage medium for intelligently orchestrating system business capabilities
CN110865854B (en) * 2019-11-11 2023-03-31 科大国创软件股份有限公司 Interface calling and arranging method supporting hot deployment
CN111651140B (en) * 2020-04-28 2022-05-03 平安医疗健康管理股份有限公司 Service method and device based on workflow
CN113792014B (en) * 2021-08-05 2023-08-25 广东核电合营有限公司 Nuclear power station file management method and device, terminal equipment and storage medium
CN114461421A (en) * 2022-01-24 2022-05-10 北京金山云网络技术有限公司 Method and device for calling client, electronic equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1752928A (en) * 2005-08-25 2006-03-29 复旦大学 A Real-time and Dynamic Synthesis Method of Web Services
CN101272280A (en) * 2008-04-02 2008-09-24 北京邮电大学 Method and system for web service management
CN101957758A (en) * 2010-10-14 2011-01-26 上海普元信息技术股份有限公司 Method for realizing rapid Web Service publishment in service oriented architecture application systems

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1752928A (en) * 2005-08-25 2006-03-29 复旦大学 A Real-time and Dynamic Synthesis Method of Web Services
CN101272280A (en) * 2008-04-02 2008-09-24 北京邮电大学 Method and system for web service management
CN101957758A (en) * 2010-10-14 2011-01-26 上海普元信息技术股份有限公司 Method for realizing rapid Web Service publishment in service oriented architecture application systems

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104731606A (en) * 2015-04-10 2015-06-24 上海普坤信息科技有限公司 System and method based on identification grasping technology to achieve enterprise application integration management
CN104731606B (en) * 2015-04-10 2018-05-18 上海普坤信息科技有限公司 The system and method for Enterprise information integration management is realized based on identification crawl technology

Also Published As

Publication number Publication date
CN102291464A (en) 2011-12-21

Similar Documents

Publication Publication Date Title
CN102291464B (en) System and Method for Dynamically Generating Web Service from Business Process in BPM
US10324690B2 (en) Automated enterprise software development
US9256413B2 (en) Automatic identification of services
US8015541B1 (en) Business process technology for the enterprise
Ferguson et al. Service-oriented architecture: Programming model and product architecture
US7552443B2 (en) System and method for implementing an event adapter
US20190073227A1 (en) Service model-oriented software system and operation method thereof
US7350184B2 (en) System and method for enterprise application interactions
CN101847100B (en) Method for expanding software application and device
CN104317591B (en) A kind of web interface frame system and web method for processing business based on OSGi
WO2007109235A2 (en) Inter domain services manager
US10089084B2 (en) System and method for reusing JavaScript code available in a SOA middleware environment from a process defined by a process execution language
CN117850771A (en) Business application development platform, method and storage medium for web service
Curbera et al. Toward a programming model for service-oriented computing
US10268496B2 (en) System and method for supporting object notation variables in a process defined by a process execution language for execution in a SOA middleware environment
CN100543673C (en) A self-evolution method of reflective architecture based on ontology
Scherp A Framework for Model-Driven Scientific Workflow Engineering
Desair et al. Policy-driven middleware for heterogeneous, hybrid cloud platforms
Srinivasmurthy et al. Web2exchange: A model-based service transformation and integration environment
Sattanathan et al. Ontologies for specifying and reconciling contexts of web services
CN1954587A (en) Distributed computer
US10223142B2 (en) System and method for supporting javascript activities in a process defined by a process execution language for execution in a SOA middleware environment
US20020199032A1 (en) Deferred response component manager
Yahia A language-based approach for web service composition
Vettor et al. EDITION v1. 2

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C53 Correction of patent of invention or patent application
CB02 Change of applicant information

Address after: 201203, Shanghai Zhangjiang hi tech park, Pudong New Area, No. 456 blue wave road, 4F

Applicant after: PRIMETON INFORMATION TECHNOLOGY Co.,Ltd.

Address before: 201203, Shanghai Zhangjiang hi tech park, Pudong New Area, No. 456 blue wave road, 4F

Applicant before: Shanghai Primeton Technologies Co.,Ltd.

COR Change of bibliographic data

Free format text: CORRECT: APPLICANT; FROM: PRIMETON TECHNOLOGIES LTD. TO: PRIMETON INFORMATION TECHNOLOGY CO., LTD.

C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20131127