TWI579782B - Service management method - Google Patents

Service management method Download PDF

Info

Publication number
TWI579782B
TWI579782B TW101122425A TW101122425A TWI579782B TW I579782 B TWI579782 B TW I579782B TW 101122425 A TW101122425 A TW 101122425A TW 101122425 A TW101122425 A TW 101122425A TW I579782 B TWI579782 B TW I579782B
Authority
TW
Taiwan
Prior art keywords
service
creator
provider
type
projection
Prior art date
Application number
TW101122425A
Other languages
Chinese (zh)
Other versions
TW201327437A (en
Inventor
孫海林
Original Assignee
鼎捷軟件股份有限公司
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 鼎捷軟件股份有限公司 filed Critical 鼎捷軟件股份有限公司
Publication of TW201327437A publication Critical patent/TW201327437A/en
Application granted granted Critical
Publication of TWI579782B publication Critical patent/TWI579782B/en

Links

Description

一種服務管理的方法 A method of service management

本發明係有關於一種企業資源規劃系統領域,特別是有關於一種服務管理的方法。 The present invention relates to the field of enterprise resource planning systems, and in particular to a method of service management.

服務導向(service oriented)是一種架構軟體系統的方法。服務導向的架構中功能是由伺服器載入,藉由介面(interface)對外提供功能。 Service oriented is a method of architecting software systems. The functionality of the service-oriented architecture is loaded by the server and provides external functionality through an interface.

服務導向架構使得公用基礎功能可以在服務(service)中進行定義,使得功能的實施更易於管理、維護和擴展,使得軟體系統可以快速回應變化的需求與應對不同的應用環境。 The service-oriented architecture enables common infrastructure functions to be defined in services, making the implementation of functions easier to manage, maintain, and extend, enabling software systems to quickly respond to changing needs and respond to different application environments.

將服務分級為服務層次是非常重要的,反映了服務的複合或者不規則的本質,如果劃分方式不佳,將會導致越來越多的小粒度的服務被定義、設計和部署,卻缺乏可控制性,導致了主要的性能、可彈性運用和管理問題。 It is very important to classify services into service levels, reflecting the composite or irregular nature of services. If the partitioning method is not good, more and more small-grained services will be defined, designed and deployed, but there is no shortage. Controllability leads to major performance, flexible application and management issues.

在傳統方式中,獲取一服務一般是藉由服務介面。介面是對服務功能實施(implement)的約定,服務實施藉由介面對外公開一些方法以提供功能。獲取服務是藉由指定服務介面類型從而獲得服務介面對應的服務實施。服務的定義過程與業務無直接關聯,例如保存服務(save service),在訂單中以一種方式實施,在售貨單中以另一種方式實施,在入貨單中又以其他方式實施。因此為了實施業務邏輯不同的同一功能,需要建立不同的服務介面,使得服務介面數量龐大難以管理。例如,(參見第1圖所示),保存服務的功能需有一保存服務實施。在傳統方式中可能需要定義三個不 同介面(依次是服務介面M、服務介面N、服務介面O)進而在服務實施M和服務實施O中實施服務,才能在調用服務時指定不同介面以獲取對應的服務實施。 In the traditional way, obtaining a service is generally through a service interface. The interface is an implementation of the implementation of the service function, and the service implementation provides functionality by disclosing some methods. The service is obtained by specifying the service interface type to obtain the service implementation corresponding to the service interface. The service definition process is not directly related to the business, such as a save service, which is implemented in one way in the order, in another way in the sales order, and in other ways in the purchase order. Therefore, in order to implement the same function with different business logics, different service interfaces need to be established, making the number of service interfaces large and difficult to manage. For example, (see Figure 1), the function of saving the service needs to have a save service implementation. In the traditional way it may be necessary to define three not The same interface (in turn, the service interface M, the service interface N, the service interface O) and then the service implementation in the service implementation M and the service implementation O can specify different interfaces when the service is invoked to obtain the corresponding service implementation.

本發明的目的在於解決上述問題,提供一種服務管理的方法,該方法不僅藉由業務領域(business domain)細分服務,使得服務的請求者僅需關心業務領域和服務介面類型即可,而且藉由服務提供者及服務創建器儲存及管理服務,根據服務的應用範圍將服務添加到服務提供者中。同時該方法提供向上定址的服務提供者鏈路,保證了服務可以被正確定位及儲存。此外,該方法還提供不同的服務生命週期類型。 The object of the present invention is to solve the above problems and provide a method for service management, which not only subdivides a service by a business domain, but also makes the requester of the service only need to care about the service domain and the service interface type, and Service providers and service creators store and manage services, adding services to service providers based on the scope of application of the services. At the same time, the method provides an upwardly addressed service provider link, ensuring that the service can be properly located and stored. In addition, the method provides different service lifecycle types.

為實施上述的目的,本發明採用下述管理方法:一種服務管理的方法,所述服務管理的方法應用於一軟體系統中,包括以下步驟:(a)藉由複數業務領域細分一服務,每一業務領域具有一業務領域標識;(b)根據細分結果將所述服務在所述業務領域上的一投影(projection)添加至至少一服務提供者中,所述投影包括所述業務領域標識、一服務類型以及一服務創建器;以及(c)在請求所述服務時,根據所述業務領域標識和所述服務類型,取得所述投影的服務創建器(service creator),由所述的服務創建器返回(return)一服務實例(service instance)。 In order to achieve the above object, the present invention adopts the following management method: a service management method, which is applied to a software system, and includes the following steps: (a) subdividing a service by a plurality of service areas, each a business domain having a business domain identifier; (b) adding a projection of the service on the business domain to at least one service provider based on the segmentation result, the projection including the business domain identifier, a service type and a service creator; and (c) when requesting the service, obtaining the service creator of the projection according to the service domain identifier and the service type, by the service The creator returns a service instance.

進一步,所述至少一服務提供者為多個相鏈結的服務提供者。 Further, the at least one service provider is a plurality of phased service providers.

進一步,在所述步驟(b)中,依據所述投影的應用範圍將所述投影添加至多個所述服務提供者中。 Further, in the step (b), the projection is added to a plurality of the service providers according to the application range of the projection.

進一步,所述步驟(c)中,進一步包括以下步驟:在請求所述服務時,藉由所述至少一服務提供者提供的服務調用(GetService)方法請求服務,從所述至少一服務提供者開始逐一檢索至其他服務提供者,查找所述投影的服務創建器;以及當檢索到所述投影的服務創建器時,由所述服務創建器返回所述服務實例。 Further, in the step (c), the method further includes the following steps: when requesting the service, requesting a service from the at least one service provider by using a service call (GetService) method provided by the at least one service provider Starting to retrieve one by one to other service providers, looking up the service creator of the projection; and returning the service instance by the service creator when the projected service creator is retrieved.

進一步,在返回所述服務實例的步驟中,當檢索不到所述投影時,引發異常。 Further, in the step of returning to the service instance, an exception is thrown when the projection is not retrieved.

進一步,在檢索所述投影的服務創建器的步驟中,進一步包括當發現所述服務類型具有中斷標記時,則停止檢索。 Further, in the step of retrieving the projected service creator, further comprising, when the service type is found to have an interrupt flag, stopping the retrieval.

進一步,在藉由業務領域細分所述服務的步驟之後,進一步包括:按照業務領域標識,分為不同的檔目錄,將所述服務配置於所述所有檔目錄中。 Further, after the step of subdividing the service by the service domain, the method further includes: dividing the service directory into the different file directories according to the service domain identifier, and configuring the service in the all file directories.

進一步,所述軟體系統是一企業資源規劃系統。 Further, the software system is an enterprise resource planning system.

此外,本發明還提供一種服務管理的方法,應用於一軟體系統中,包括如下步驟:在軟體系統中識別通用功能並且定義服務介面;根據所述服務介面,為每個業務領域提供服務介面對應的具體的服務實例;為每一服務設置生命週期類型,根據所述生命週期類型指定一服務創 建器;按照服務應用範圍,將所述服務介面的類型、業務領域標識以及所述服務創建器一起作為服務投影放入服務提供者中;當接收服務請求,藉由所述業務領域標識和服務類型,從多層服務提供者的其中一服務提供者開始檢索對應的服務創建器;藉由所述多層服務提供者的服務鏈路逐層向上檢索對應的服務創建器;以及當檢索到所述對應的服務創建器時,所述服務創建器依據所述服務的生命週期類型返回所述服務實例。 In addition, the present invention further provides a method for service management, which is applied to a software system, comprising the steps of: identifying a common function in a software system and defining a service interface; and providing a service interface corresponding to each service domain according to the service interface. Specific service instances; set a lifecycle type for each service, specifying a service creation based on the lifecycle type Constructing, according to the service application scope, the type of the service interface, the service domain identifier, and the service creator together as a service projection into the service provider; when receiving the service request, by using the service domain identifier and service Type, retrieving a corresponding service creator from one of the service providers of the multi-layer service provider; retrieving the corresponding service creator layer by layer by the service link of the multi-layer service provider; and when retrieving the correspondence The service creator returns the service instance according to the lifecycle type of the service.

本發明的優點在於:(1)藉由業務領域細分服務,服務的請求者僅需關心業務領域和服務介面類型即可,同時保持服務實施的多樣性,更易於開發;(2)將彼此緊密相關的服務與服務提供者組織在一起,服務提供者對外提供統一的服務調用方法(GetService),更易於系統的開發和設計;(3)提供向上定址的服務提供者鏈路,保證了服務可以被正確定位及儲存,完美支援系統對客戶端-伺服器模式的複雜應用和需求;以及(4)提供不同的服務生命週期類型,滿足軟體系統中複雜的業務需求。 The advantages of the present invention are as follows: (1) By subdividing services in the service domain, the requester of the service only needs to care about the service domain and the service interface type, while maintaining the diversity of service implementation and being easier to develop; (2) being close to each other The related services are organized together with the service provider. The service provider provides a unified service invocation method (GetService) to facilitate system development and design. (3) Provides an upwardly addressed service provider link to ensure that the service can be serviced. It is correctly located and stored, perfectly supporting the complex application and requirements of the client-server model; and (4) providing different service lifecycle types to meet the complex business requirements of the software system.

下面結合附圖對本發明服務管理的方法的具體實施方式做詳細說明。 The specific implementation manner of the method for service management of the present invention will be described in detail below with reference to the accompanying drawings.

參見第2圖是一種依據本發明的服務管理方法的步驟流程圖,所述服務管理方法應用於一軟體系統中,包括以下步驟: 2 is a flow chart of steps of a service management method according to the present invention. The service management method is applied to a software system, and includes the following steps:

S101:藉由業務領域細分一服務,每一業務領域具有一業務領域標識 (例如在第3圖中,M12表示所述業務領域細分服務)。所述服務在軟體系統中為一功能點(function point)的類別,所述功能點用於完成一需求的功能。本發明是依照業務領域劃分服務,藉由一穩定的通用介面約定服務實施,並藉由業務領域標識(例如:以TypeKey稱之)將具體服務實施與業務領域進行關聯,其中TypeKey是一種業務標識,藉由通用介面加上業務領域標識(TypeKey),在業務領域內獲取正確的服務實施。以下舉一個例子來說明按照業務領域細分服務,參見第3圖:服務實施A(M122)和服務實施C(M124)是保存服務通用介面ISaveService在業務領域標識TypekeyA和業務領域標識TypekeyC的兩個投影。在獲取服務時,若在業務領域A,則可找到業務領域A對應的具體服務實施A,若在業務領域C時,則可找到業務領域C對應的具體服務實施C。因此,不需要告知服務提供者需要哪一業務領域對應的服務介面,也不需要額外介面就能使訪問(visit)伺服端提供的服務。 S101: Subdivide a service by a service domain, where each service domain has a service domain identifier (For example, in Fig. 3, M12 represents the service area subdivision service). The service is a category of function points in the software system that is used to perform a required function. The invention is based on the service domain division service, is implemented by a stable universal interface agreement service, and associates a specific service implementation with a service domain by using a service domain identifier (for example, called by TypeKey), wherein the TypeKey is a service identifier. , through the common interface plus the business domain identifier (TypeKey), to obtain the correct service implementation in the business domain. The following is an example to illustrate the breakdown of services by business domain. See Figure 3: Service Implementation A (M122) and Service Implementation C (M124) are two projections of the service service common interface ISaveService in the service domain identifier TypekeyA and the service domain identifier TypekeyC. . When acquiring the service, if in the service area A, the specific service implementation A corresponding to the service area A can be found, and in the service area C, the specific service implementation C corresponding to the service area C can be found. Therefore, there is no need to inform the service provider which service area corresponds to the service interface, and no additional interface is required to enable the service provided by the server.

S102:根據每一業務領域中的業務需求,為每一業務領域的每一服務介面藉由編寫程式碼提供服務實施,對同一功能業務需求相同的不同業務領域可以重複使用同一服務實施。 S102: According to the business requirement in each business domain, each service interface of each business domain provides a service implementation by writing a code, and the same service implementation may be reused for different service areas with the same functional business requirement.

S103:按照業務領域標識,分為不同的檔目錄,將所述服務配置於所述檔目錄中。 S103: Dividing into different file directories according to the service domain identifier, and configuring the service in the file directory.

在此,根據業務領域標識區分不同的檔目錄,因為當系統根據配置(configuration)載入服務時,係按照配置檔所處的檔夾確定該服務應該應用於哪個應用領域。每個檔目錄對應一個業務領域標識(TypeKey),也即對應於一個業務領域。特別地,並不是所有服務都需要配置在業務領域標 識的檔目錄中,還有不需要指定TypeKey的公用服務,可以配置在根目錄下或者在程式碼中直接註冊服務。 Here, different file directories are distinguished according to the service domain identifier, because when the system loads the service according to the configuration, the file folder in which the profile is located determines which application domain the service should be applied to. Each file directory corresponds to a service domain identifier (TypeKey), that is, corresponds to a service domain. In particular, not all services need to be configured in the business domain In the directory of the file, there is a public service that does not need to specify the TypeKey. You can configure it in the root directory or register the service directly in the code.

S104:根據細分結果將所述服務在所述業務領域上的一投影(projection)添加至多層相鏈結的服務提供者中,所述投影包括所述業務領域標識(TypeKey)、一服務介面類型(ISaveService)和一服務創建器。所述投影是指在不同業務領域中對於業務介面有不同的業務實施方式。當所述多層相鏈結的服務提供者的其中一服務提供者接收到服務請求時,參見第4圖的服務提供者M11內部置有一字典M111,所述的字典M111包括多個鍵值對,例如鍵M112和值M113,所述鍵值對即為上述投影的內容,所述的鍵M112(key)為業務領域標識和服務介面類型,所述的值M113(value)為一個內部的服務創建器。所述的鍵M112和值M113是一一對應的關係。以下再舉一個例子,用於說明服務投影和服務提供者關係,在第4圖中,服務介面ISaveService在不同的業務領域A、B、C具有不同的投影,即服務實施A(M122)、服務實施B(M123)和服務實施C(M124),此處三個鍵分別設置為ISaveService+A,ISaveService+B,ISaveService+C。由於服務類型已提供,服務實施已寫入程式碼中,對於服務提供者而言,當軟體系統執行時,所述的服務會產生相應的服務實例,所述服務實例是藉由服務創建器來完成。服務創建器用於依照服務的生命週期的不同類型以創建服務實例。服務有不同的生命週期類型,所述的生命週期類型包括SingleGet、Singleton、Callback和WeakReference。其中SingleGet為當每次被調用時產生新的一服務實例;Singleton為重複使用同一個服務實例,即服務首先被調用時會產生一服務實例,之後所述服務被調用時使用同一服 務實例以完成功能;Callback為服務實例創建的過程,允許傳入創建邏輯以決定如何創建一服務實例,WeakReference為返回指向服務實例的微弱引用。此外,SingleGet、Singleton和WeakReference為固定的創建邏輯,而Callback可自定義創建邏輯,增加了靈活度。Singleton和WeakReference均會檢查是否已創建一服務實例,若有,則不創建,若無,則創建一新服務實例,但Singleton的服務實例不允許銷毀,WeakReference的服務實例在不使用時會被釋放,被釋放後需重新創建。 S104: Add a projection of the service on the service domain to a service provider of a multi-layer phase link according to a subdivision result, where the projection includes the service domain identifier (TypeKey) and a service interface type. (ISaveService) and a service creator. The projection refers to different service implementations for the service interface in different service areas. When one of the service providers of the multi-layer phase link service provider receives the service request, the service provider M11 of FIG. 4 internally has a dictionary M111, and the dictionary M111 includes a plurality of key-value pairs. For example, the key M112 and the value M113, the key value pair is the content of the above projection, the key M112 (key) is the business domain identifier and the service interface type, and the value M113 (value) is an internal service creation. Device. The key M112 and the value M113 are in a one-to-one correspondence. The following is another example to illustrate the service projection and service provider relationship. In Figure 4, the service interface ISaveService has different projections in different service areas A, B, and C, that is, service implementation A (M122), service. Implementation B (M123) and service implementation C (M124), where the three keys are set to ISaveService+A, ISaveService+B, ISaveService+C. Since the service type has been provided, the service implementation has been written into the code. For the service provider, when the software system executes, the service generates a corresponding service instance, and the service instance is provided by the service creator. carry out. The service creator is used to create service instances according to different types of service lifecycles. Services have different lifecycle types, including SingleGet, Singleton, Callback, and WeakReference. Where SingleGet is to generate a new service instance each time it is called; Singleton is to reuse the same service instance, that is, when the service is first called, a service instance is generated, and then the service is called when the same service is used. The instance is done to complete the function; Callback is the process created by the service instance, allowing incoming logic to determine how to create a service instance, and WeakReference to return a weak reference to the service instance. In addition, SingleGet, Singleton, and WeakReference are fixed creation logic, while Callback can customize the creation logic for added flexibility. Both Singleton and WeakReference will check if a service instance has been created. If there is, then it will not be created. If not, a new service instance will be created, but the service instance of Singleton will not be destroyed. WeakReference service instance will be released when not in use. After being released, it needs to be recreated.

S105:在所述多層相鏈結的服務提供者的其中一服務提供者被請求該服務時,根據指定所述業務領域標識和所述服務介面類型,從所述的其中一服務提供者開始檢索該投影的服務創建器。服務提供者又稱服務容器,在服務提供者中使用鍵值對,所述鍵值對存放服務創建器。當任一個服務提供者在接收到服務請求時,將返回所需的服務實例,服務實例由服務創建器提供。將一個服務與服務環境進行動態掛接連結,包括2種方式。一種方式是直接與服務提供者有關聯。在運行時,藉由設置服務物件關聯的服務提供者,可將服務物件動態連接到服務環境中,或從一服務環境中斷開。另一方式是與另一服務進行掛接,不直接與服務提供者關聯,藉由該另一服務獲取服務提供者。例如,服務A與另一服務B進行掛接,服務B是處於用戶端服務環境中,則服務A也能共用到用戶端服務環境中的服務。 S105: When one of the service providers of the multi-layered link service is requested by the service provider, start searching from one of the service providers according to the specified service domain identifier and the service interface type. The service creator of this projection. A service provider, also known as a service container, uses key-value pairs in a service provider that store the service creator. When any service provider receives a service request, it will return the required service instance, which is provided by the service creator. There are two ways to dynamically link a service to a service environment. One way is to be directly related to the service provider. At runtime, the service object can be dynamically connected to or disconnected from a service environment by setting up a service provider associated with the service object. Another way is to attach to another service, not directly associated with the service provider, by which the service provider is obtained. For example, if service A is connected to another service B, and service B is in the client service environment, service A can also share the service in the client service environment.

S106:若未找到所述投影的服務創建器,從被請求的服務提供者逐層向上檢索至其他的服務提供者。如在第5圖中,底層首先調用服務,用戶控制項(UserControl)(例如打開服務表單)打開視窗即包含一服務容器(服務提供者M11),其中包含一些與此控制項相關的控制服務。例如格式控 制、某一欄位顯示顏色的服務,這些服務都註冊在用戶控制項的服務提供者內,直接獲取即可。又如,點擊保存工具欄按鈕,調用用戶端合法性檢查,由於合法性檢查服務是直接註冊在此表單之內,因此可以直接在表單的服務提供者獲取。例如若要執行保存服務,而保存服務是註冊在伺服端,於是,藉由所述多層相鏈結的服務提供者的服務鏈路逐層向上檢索。首先在用戶控制項的服務提供者中,即在服務提供者M11的內部字典中進行查找,若沒有找到,則此請求轉發至上一層的服務提供者M20,若在所述的上一層的服務提供者M20(亦即表格服務提供者(Form Service Provider))中也沒有找到,則再一次轉發至用戶端服務提供者M30,在用戶端服務提供者M30內部查找有無該鍵,若有則返回服務實例,若無則繼續向上查找(即在伺服端服務提供者M40的內部字典中查找)。若在伺服端(在伺服器或appdomain機器上)查找,需要跨越網路邊界。 S106: If the projected service creator is not found, the requested service provider searches up to other service providers layer by layer. As shown in Figure 5, the underlying layer first invokes the service, and the UserControl (for example, opening the service form) opens a window containing a service container (service provider M11) containing some control services associated with this control. Format control A service that displays colors in a certain field. These services are registered in the service provider of the user control item and can be directly obtained. For another example, click the Save Toolbar button to invoke the client's legality check. Since the legality check service is directly registered in this form, it can be obtained directly from the form's service provider. For example, if the save service is to be executed and the save service is registered on the server, then the service link of the service provider of the multi-layer chain is searched up by layer. First, in the service provider of the user control item, that is, in the internal dictionary of the service provider M11, if not found, the request is forwarded to the service provider M20 of the upper layer, if the service provider of the upper layer is provided If the M20 (that is, the Form Service Provider) is not found, it is forwarded again to the client service provider M30, and the client service provider M30 searches for the presence or absence of the button, and if so, returns to the service. Instance, if not, continue to look up (ie, look up in the internal dictionary of the server service provider M40). If you look up on the server (on the server or appdomain machine), you need to cross the network boundary.

S107:當檢索到所述投影的服務創建器時,返回所述服務實例。伺服端服務提供者M40接收到保存服務的調用後,在字典中檢索並找到所述鍵,從對應的值中獲取業務領域中的保存服務對應的服務創建器,根據生命週期類型的設置,創建一保存服務實例,並予以返回。在每一服務提供者中設置有一標記(欄位),用於標識當前等級的服務提供者的上級服務提供者。在逐層向上檢索所述投影步驟中,當需要跨越網路邊界時,若發現所述服務類型具有中斷標記,則停止逐層向上檢索該投影的服務創建器。也就是說,只在本地的服務提供者的字典中進行查找,不進行跨越網路。如果在整個檢索過程中檢索不到所述投影的服務創建器(檢索過程結束包括檢索完最上層的服務提供者以及在跨越網路邊界時中斷檢索)時,會引 發異常,即找不到服務。 S107: Return the service instance when the projected service creator is retrieved. After receiving the call to save the service, the server service provider M40 retrieves and finds the key in the dictionary, and obtains the service creator corresponding to the save service in the service domain from the corresponding value, and creates according to the setting of the life cycle type. Save the service instance and return it. A flag (field) is set in each service provider to identify the superior service provider of the current level of service provider. In the step of searching up the layer by layer, when it is required to cross the network boundary, if the service type is found to have an interrupt flag, the service creator that searches for the projection is stopped up layer by layer. That is to say, the search is only done in the dictionary of the local service provider, and does not cross the network. If the service creator of the projection is not retrieved during the entire retrieval process (the retrieval process ends by retrieving the top-level service provider and interrupting the retrieval when crossing the network boundary), An exception was raised, ie the service could not be found.

參見第6圖,本發明提出一具體實施例的方法,其具體步驟如下: Referring to Figure 6, the present invention proposes a method of a specific embodiment, the specific steps of which are as follows:

步驟S601:首先在軟體系統中定義一些通用功能和通用介面,例如ISaveService,IApproveService,IDeleteService等通用介面。然後在一業務領域,比如為了實施訂單的業務邏輯,訂單業務邏輯中需運用一保存的服務實施。若發現沒有所述保存訂單的服務實施,需為訂單服務創建所述保存的服務實施,即實施ISaveService介面。 Step S601: First, define some common functions and common interfaces in the software system, such as ISaveService, IApproveService, IDeleteService and other common interfaces. Then in a business area, such as the business logic for order fulfillment, a stored service implementation is required in the order business logic. If it is found that there is no service implementation of the save order, the saved service implementation needs to be created for the order service, ie the ISaveService interface is implemented.

步驟S602:在定義服務時,設置一功能點(function point)類別標記(服務類型)。當功能包(function package)應用時,所述服務功能點被實施。 Step S602: When defining the service, set a function point category tag (service type). The service function point is implemented when a function package is applied.

步驟S603:在定義服務(實施服務)時,根據服務介面中的方法約定及業務領域中的業務需求來進行實施。在服務介面ISaveService中聲明了Save方法,在實施保存服務時,實施ISaveService介面,需提供Save方法的具體實施方式。 Step S603: When defining the service (implementing the service), the implementation is performed according to the method agreement in the service interface and the business requirement in the service area. The Save method is declared in the service interface ISaveService. When the save service is implemented, the ISaveService interface is implemented. The implementation method of the Save method is required.

步驟S604:服務的功能點和服務的功能點解釋器預先設定。功能點解釋器在接收功能點集合之後,依據功能點類別標記,將所述功能點對應的服務投影置於相應的服務提供者的服務容器中,功能點的應用方法也存放於解釋器中。 Step S604: The function point of the service and the function point interpreter of the service are preset. After receiving the function point set, the function point interpreter places the service projection corresponding to the function point in the service container of the corresponding service provider according to the function point category mark, and the application method of the function point is also stored in the interpreter.

步驟S605:所述保存服務,在保存服務的功能點上標註為服務類型。在軟體系統載入的時候,將保存服務置於服務提供者容器中。同時需要對保存服務的生命週期類型進行定義設置(例如,所述保存服務生命週期類型為Singleton)。至此,保存服務定義完畢。 Step S605: The save service is marked as a service type on a function point of the save service. The save service is placed in the service provider container when the software system is loaded. At the same time, the lifecycle type of the save service needs to be defined (for example, the save service lifecycle type is Singleton). At this point, the save service is defined.

步驟S606:將所述的保存服務配置於一功能包中,例如將所述保存服務置於訂單的功能包中。訂單的業務領域標識為A,在訂單載入過程中,系統將保存服務註冊至伺服端服務提供者,在伺服端服務提供者的內部字典中,鍵為ISaveService+A,值為保存服務對應的服務創建器。至此,完成系統對訂單中保存服務的載入過程。 Step S606: Configuring the save service in a function package, for example, placing the save service in a function package of the order. The business domain identifier of the order is A. During the order loading process, the system registers the save service with the server service provider. In the internal dictionary of the server service provider, the key is ISaveService+A, and the value is the corresponding service of the save service. Service creator. At this point, the system completes the loading process for saving the service in the order.

步驟S607:在軟體系統執行時,用戶端前端介面對業務領域A的單據進行保存操作,後端即向當前控制項的服務提供者請求保存服務,採用通用的方法入口GetService,以ISaveService作為服務介面類型,以A為業務領域標識。當前用戶控制項的服務提供者接收到保存服務的調用後,在用戶控制項的服務提供者的字典中檢索(ISaveService+A)的鍵。 Step S607: When the software system is executed, the front end of the client side performs a save operation on the document of the service area A, and the back end requests the service provider of the current control item to save the service, adopts a common method to enter GetService, and uses ISaveService as a service interface. Type, with A as the business domain identifier. After receiving the call to save the service, the service provider of the current user control retrieves the key of (ISaveService+A) in the dictionary of the service provider of the user control item.

步驟S608:當用戶控制項的服務提供者發現在字典中沒有找到,根據服務鏈路,找到上層表單服務提供者。當表單服務提供者接收到保存服務的調用後,在表單服務提供者的字典中檢索(ISaveService+A)的鍵。當表單服務提供者發現在字典中沒有找到,根據服務鏈路,找到用戶端服務提供者。當用戶端服務提供者接收到保存服務的調用後,在用戶端服務提供者的字典中檢索(ISaveService+A)的鍵。如果用戶端服提供者發現在字典中沒有找到,根據服務鏈路,跨越網路邊界至伺服端服務提供者。 Step S608: When the service provider of the user control item finds that it is not found in the dictionary, the upper form service provider is found according to the service link. When the form service provider receives a call to save the service, it retrieves the key (ISaveService+A) in the form service provider's dictionary. When the form service provider finds that it is not found in the dictionary, the client service provider is found based on the service link. When the client service provider receives the call to save the service, the key of (ISaveService+A) is retrieved in the dictionary of the client service provider. If the client service provider finds that it is not found in the dictionary, it crosses the network boundary to the server service provider according to the service link.

步驟S609:當伺服端服務提供者接收到保存服務的調用後,在伺服端服務提供者的字典中檢索(ISaveService+A)的鍵。如果伺服端服務提供者找到該鍵,從對應的值中獲取業務領域A中的保存服務對應的服務創建器,由於所述保存服務的生命週期類型為Singleton,所以進行判斷是否已有的SaveService服務實例,若有,則不創建,若無,則所述服務創建器創 建一個新的保存服務(SaveService)實例。 Step S609: After the server service provider receives the call to save the service, the key of (ISaveService+A) is retrieved in the dictionary of the server service provider. If the server service provider finds the key, the service creator corresponding to the save service in the service domain A is obtained from the corresponding value. Since the lifecycle type of the save service is Singleton, it is determined whether the SaveService service is available. Instance, if not, not created, if not, then the service creator Create a new saveService (SaveService) instance.

步驟S610:調用所述保存服務的服務實例業務實施方法,執行單據A的保存邏輯。 Step S610: Calling the service instance service implementation method of the save service, and executing the save logic of the document A.

本發明有益效果在於,藉由業務領域細分服務,使得服務請求者可以利用業務領域和服務介面類型組合方式,以及向上定址的服務提供者鏈路,正確執行定位及儲存服務,完成開發需求。 The invention has the beneficial effects that the service requester can use the business domain and the service interface type combination manner, and the upwardly addressed service provider link to correctly perform the positioning and storage service, and complete the development requirement.

雖然本發明已用較佳實施例揭露如上,然其並非用以限定本發明,本發明所屬技術領域中具有通常知識者,在不脫離本發明之精神和範圍內,當可作各種之更動與潤飾,因此本發明之保護範圍當視後附之申請專利範圍所界定者為準。 While the invention has been described above in terms of the preferred embodiments, the invention is not intended to limit the invention, and the invention may be practiced without departing from the spirit and scope of the invention. The scope of protection of the present invention is therefore defined by the scope of the appended claims.

S101~S107‧‧‧步驟 S101~S107‧‧‧Steps

M10‧‧‧服務投影和服務提供者關係 M10‧‧‧Service projection and service provider relationship

M12‧‧‧業務領域細分服務 M12‧‧‧Business area segmentation services

M121‧‧‧保存服務介面 M121‧‧‧Save service interface

M122‧‧‧服務實施A M122‧‧‧Service Implementation A

M123‧‧‧服務實施B M123‧‧‧Service Implementation B

M124‧‧‧服務實施C M124‧‧‧ Service Implementation C

M11‧‧‧服務提供者 M11‧‧‧ service provider

M111‧‧‧字典 M111‧‧‧ dictionary

M112‧‧‧鍵 M112‧‧‧ key

M113‧‧‧值 M113‧‧ value

M20‧‧‧窗體服務提供者 M20‧‧‧ Form Service Provider

M30‧‧‧用戶端服務提供者 M30‧‧‧Customer Service Provider

M40‧‧‧伺服端服務提供者 M40‧‧‧Server Service Provider

S601~S610‧‧‧步驟 S601~S610‧‧‧Steps

第1圖是傳統方式利用不同介面完成服務實施的示意圖;第2圖是本發明所述服務管理方法的步驟流程圖;第3圖是本發明所述業務領域細分服務的示意圖;第4圖是本發明所述服務投影和服務提供者關係的示意圖;第5圖是本發明所述服務提供者逐層向上檢索所述投影的服務創建器過程的示意圖;以及第6圖是本發明一實施例所述服務管理方法的具體實施步驟示意圖。 1 is a schematic diagram of a conventional manner of performing service implementation using different interfaces; FIG. 2 is a flow chart of steps of the service management method of the present invention; FIG. 3 is a schematic diagram of a service domain subdivision service according to the present invention; Schematic diagram of the relationship between the service projection and the service provider of the present invention; FIG. 5 is a schematic diagram of the process of the service creator of the present invention for retrieving the projection from the service provider layer by layer; and FIG. 6 is an embodiment of the present invention A schematic diagram of specific implementation steps of the service management method.

S101~S107‧‧‧步驟 S101~S107‧‧‧Steps

Claims (9)

一種服務管理的方法,所述服務管理的方法應用於一軟體系統中,所述服務管理的方法包括以下步驟:(a)藉由複數業務領域細分一服務,每一該些業務領域具有一業務領域標識;(b)根據細分結果將所述服務在所述業務領域上的一投影添加至至少一服務提供者中,所述投影包括所述業務領域標識、一服務類型以及一服務創建器,該服務創建器依照服務類型創建一服務實例;以及(c)當所述至少一服務提供者的其中一服務提供者接收到服務請求時,根據所述業務領域標識與所述服務類型,從所述的其中一服務提供者開始檢索該投影的服務創建器,若未找到所述投影的服務創建器,從被請求的服務提供者逐層向上檢索至其他的服務提供者直到取得所述投影的服務創建器,由所述服務創建器返回一服務實例。 A method for service management, the method for service management being applied to a software system, the method for service management comprising the steps of: (a) subdividing a service by a plurality of service areas, each of the service areas having a service a domain identifier; (b) adding a projection of the service on the service domain to at least one service provider based on the segmentation result, the projection including the service domain identifier, a service type, and a service creator, The service creator creates a service instance according to the service type; and (c) when one of the service providers of the at least one service provider receives the service request, according to the service domain identifier and the service type, One of the service providers begins to retrieve the projected service creator, and if the projected service creator is not found, retrieves from the requested service provider layer by layer to other service providers until the projection is obtained A service creator that returns a service instance by the service creator. 如申請專利範圍第1項所述的服務管理的方法,其中所述至少一服務提供者係為多個相鏈結的服務提供者。 The method of service management according to claim 1, wherein the at least one service provider is a plurality of phased service providers. 如申請專利範圍第2項所述的服務管理的方法,其中在步驟(b)中,依據所述投影的應用範圍添加至所述多個服務提供者中。 The method of service management according to claim 2, wherein in the step (b), the application range according to the projection is added to the plurality of service providers. 如申請專利範圍第1項所述的服務管理的方法,其中在步驟(c)中,從被請求的服務提供者逐層向上檢索至其他的服務提供者係根據服務鏈路之服務調用方法請求服務,先查找用戶端服務提供者,如果在用戶端服提供者未找到所述投影的服務創建器時,再跨越網路邊界至伺服端服務提供 者以檢索所述投影的服務創建器。 The method of service management according to claim 1, wherein in the step (c), the requested service provider is searched up to the other service provider to the other service provider according to the service call method of the service link. Service, first find the client service provider, if the user service provider does not find the projected service creator, then cross the network boundary to the server service To retrieve the service creator of the projection. 如申請專利範圍第1項所述的服務管理的方法,其中如果在整個檢索過程中檢索不到所述投影的服務創建器時,引發找不到服務的訊息。 The method of service management according to claim 1, wherein if the projected service creator is not retrieved during the entire retrieval process, a message that the service cannot be found is triggered. 如申請專利範圍第1項所述的服務管理的方法,其中在檢索所述投影的服務創建器的步驟中,進一步包括當發現所述服務類型具有中斷標記時,則停止檢索。 The method of service management according to claim 1, wherein in the step of retrieving the projected service creator, further comprising, when the service type is found to have an interrupt flag, stopping the retrieval. 如申請專利範圍第1項所述的服務管理的方法,其中在步驟(a)之後,還包括:按照業務領域標識,分為不同的檔目錄,將所述服務定義於所述所有檔目錄中。 The method of service management according to claim 1, wherein after the step (a), the method further comprises: dividing the service directory identifier into different file directories, and defining the service in the file directory. . 如申請專利範圍第1項所述的服務管理的方法,其中所述軟體系統係為一企業資源規劃系統。 The method of service management according to claim 1, wherein the software system is an enterprise resource planning system. 一種服務管理的方法,包括以下步驟:在一軟體系統中識別通用功能並且定義一服務介面;根據所述服務介面,為每個業務領域提供所述服務介面對應的具體的服務實例;為每一服務設置一生命週期類型,根據所述生命週期類型指定一服務創建器;按照所述服務的應用範圍,將所述服務介面的類型、業務領域標識以及所述服務創建器一起作為服務投影放入服務提供者中;當接收服務請求,藉由所述業務領域標識和服務類型,從多層服務提供者的其中一服務提供者開始檢索對應的服務創建器; 藉由所述多層服務提供者的服務鏈路逐層向上檢索對應的一服務創建器;以及當檢索到所述對應的服務創建器時,所述服務創建器依據所述服務的生命週期類型返回所述創建的一服務實例。 A method for service management, comprising the steps of: identifying a general function in a software system and defining a service interface; providing, according to the service interface, a specific service instance corresponding to the service interface for each service domain; The service sets a lifecycle type, and specifies a service creator according to the lifecycle type; according to the application scope of the service, the service interface type, the business domain identifier, and the service creator are put together as a service projection In the service provider; when receiving the service request, the corresponding service creator is retrieved from one of the multi-layer service providers by the service domain identifier and the service type; Retrieving a corresponding service creator layer by layer by the service link of the multi-layer service provider; and when retrieving the corresponding service creator, the service creator returns according to the life cycle type of the service The created service instance.
TW101122425A 2011-12-30 2012-06-22 Service management method TWI579782B (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110454481.XA CN103186417B (en) 2011-12-30 2011-12-30 A kind of method of Service Management

Publications (2)

Publication Number Publication Date
TW201327437A TW201327437A (en) 2013-07-01
TWI579782B true TWI579782B (en) 2017-04-21

Family

ID=48677595

Family Applications (1)

Application Number Title Priority Date Filing Date
TW101122425A TWI579782B (en) 2011-12-30 2012-06-22 Service management method

Country Status (2)

Country Link
CN (1) CN103186417B (en)
TW (1) TWI579782B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106656536B (en) * 2015-11-03 2020-02-18 阿里巴巴集团控股有限公司 Method and equipment for processing service calling information
CN105357316B (en) * 2015-12-04 2018-07-03 航天科工智慧产业发展有限公司 A kind of method and system of quick realization service broker
CN111988400B (en) * 2020-08-20 2023-08-22 广州探途网络技术有限公司 Access processing method, application server and electronic equipment

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW200538977A (en) * 2004-02-27 2005-12-01 Eplus Capital Inc System and method for user creation and direction of a rich-content life-cycle
CN101719933A (en) * 2009-11-25 2010-06-02 北京航空航天大学 Combination method of manufacturing grid resource services orienting whole life cycle and supporting semantemes
CN102054017A (en) * 2009-10-30 2011-05-11 达索系统艾诺维亚公司 Computer method and system providing access to data of a target system

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20090124514A (en) * 2008-05-30 2009-12-03 포항공과대학교 산학협력단 A product lifecycle information management system using ubiquitous technology
CN101655795B (en) * 2009-09-25 2012-10-10 金蝶软件(中国)有限公司 Method for creating service embodiment and system thereof
CN101702216A (en) * 2009-11-23 2010-05-05 浪潮集团山东通用软件有限公司 Method for supporting configuration of various stock services

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW200538977A (en) * 2004-02-27 2005-12-01 Eplus Capital Inc System and method for user creation and direction of a rich-content life-cycle
CN102054017A (en) * 2009-10-30 2011-05-11 达索系统艾诺维亚公司 Computer method and system providing access to data of a target system
CN101719933A (en) * 2009-11-25 2010-06-02 北京航空航天大学 Combination method of manufacturing grid resource services orienting whole life cycle and supporting semantemes

Also Published As

Publication number Publication date
TW201327437A (en) 2013-07-01
CN103186417B (en) 2016-04-06
CN103186417A (en) 2013-07-03

Similar Documents

Publication Publication Date Title
US10481903B2 (en) On-demand database service system, method, and computer program product for validating a developed application
US9930129B2 (en) System and method for java EE and java SE proxy data sources in a multitenant application server environment
KR102313476B1 (en) System and method for providing an end-to-end lifecycle in a multitenant application server environment
US9785687B2 (en) System and method for transparent multi key-value weighted attributed connection using uni-tag connection pools
EP3198435A1 (en) System and method for use of a global runtime in a multitenant application server environment
US8335773B2 (en) Stable linking and patchability of business processes through hierarchical versioning
US20160358354A1 (en) System and method for graphically displaying recommended mappings in an integration cloud service design time
US9053134B2 (en) View variants in database schema mapping
KR20130050205A (en) Platform for software as a service and method for provisioning service for supporting multi tenent using its
CN112136112A (en) System and method for building idempotent configuration management modules for cloud infrastructure services
TWI579782B (en) Service management method
US20090049105A1 (en) Extensible dependency management framework and method
US11755546B2 (en) Attribute aware relationship-based access control on row and field levels in a relational database
US11500893B2 (en) System and method for dynamically finding database nodes and replication state
US8812678B2 (en) Integration of an application server and data grid
US20100299652A1 (en) Apparatus and method for managing components in sca system
US20120030680A1 (en) System and Method of General Service Management
US20160357826A1 (en) System and method for providing recommended mappings for use by a mapper in an integration cloud service design time
JP5791558B2 (en) Framework, computer system, and system construction method
US10324691B2 (en) Factory identification system