CN103019695B - Data object and state control logical separation system and method - Google Patents

Data object and state control logical separation system and method Download PDF

Info

Publication number
CN103019695B
CN103019695B CN201210479553.0A CN201210479553A CN103019695B CN 103019695 B CN103019695 B CN 103019695B CN 201210479553 A CN201210479553 A CN 201210479553A CN 103019695 B CN103019695 B CN 103019695B
Authority
CN
China
Prior art keywords
state
data object
activity
status
supervisor
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.)
Active
Application number
CN201210479553.0A
Other languages
Chinese (zh)
Other versions
CN103019695A (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.)
Yonyou Network Technology Co Ltd
Original Assignee
Yonyou Network 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 Yonyou Network Technology Co Ltd filed Critical Yonyou Network Technology Co Ltd
Priority to CN201210479553.0A priority Critical patent/CN103019695B/en
Publication of CN103019695A publication Critical patent/CN103019695A/en
Application granted granted Critical
Publication of CN103019695B publication Critical patent/CN103019695B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Stored Programmes (AREA)

Abstract

The invention provides a kind of data object and state control logical separation system, including: associative cell, being associated by binding with the status data in state supervisor by data object, status data includes Status Type and the control logic corresponding to Status Type;State supervisor, will for data object execution activity time, according to the control logic corresponding with movable current state, judge whether activity allows to be performed, and when receiving the notice of performance element, the previous status of data object is switched to dbjective state, after the state of state supervisor switch data object, the more status attribute of new data-objects;Performance element, when judging that activity allows to be performed, execution activity, and after activity is performed end, send notice to state supervisor.Present invention also offers a kind of data object and state control logic separation method.The data separation corresponding to state control logic can be realized by the present invention, improve design and the motility run.

Description

Data object and state control logical separation system and method
Technical field
The present invention relates to field of computer technology, in particular to a kind of data object and state control logical separation system and a kind of data object and state control logic separation method.
Background technology
When flow chart of data processing and function Rapid Variable Design and Continual Improvement, user expects, when keeping data object constant, to support more rich more flexible control logic realization, and the method that realizes general at present has following common characteristic:
1. use enumeration type to describe state metadata;
2. at the status data that design state definition data object is cited;
3. define the control logical code of every kind of state by designing state, control whether can perform for the activity operations of data object;
4. the Status Change of the data object of the activity-triggered for data object is defined by means such as state machines;
5. data object metadata and state control logic code, and state machine is associated when compiling, data object metadata and state control logic code, and state machine is it is generally required to determine clear and definite corresponding relation.
Although it can be seen that correlation technique achieves the separation of data object and service logic to a certain extent from These characteristics, improve development efficiency and Consumer's Experience.But realizing controlling logic owing to relying on code, these technology still suffer from following some shortcomings:
1. the existence of carrying out parallel of data object and control programming in logic limits.Because the code of the control logic dependent status of data object and activity thereof needs hard code to finish writing at active internal when the activity of data object is developed, cause movable logical code and the state elements close-coupled of data object, when writing data object business logic codes, the control rule of necessary clear state, thus writing logical code;And the change of state control logic, generally also need synchronous vacations code file to realize, it is impossible to be properly arrived at and support that the control logical AND state control logic of data object separates, Parallel Implementation, do not produce interactional purpose.
2. in business management software, often with good grounds different user defines different states, state control logic and conversion logic, and prior art is at run duration, it is impossible to status of support controls the extension of logic well.
Accordingly, it would be desirable to a kind of new data object and state control logic isolation technics, it is not necessary to the logical code of amendment data object and activity thereof, so that it may realize data object and activity and control the purpose that logic is separated.
Summary of the invention
The present invention is based on the problems referred to above, it is proposed that a kind of new data object and state control logic isolation technics, it is not necessary to the logical code of amendment data object and activity thereof, so that it may realizes data object and activity and controls the purpose that logic is separated.
In view of this, according to an aspect of the present invention, provide a kind of data object and state control logical separation system, including: associative cell, described data object is associated by binding with the status data in state supervisor, described status data includes Status Type and the control logic corresponding to described Status Type, state supervisor manage described status data;Described state supervisor, will for described data object execution activity time, read the current state of described data object, according to the control logic corresponding with described current state, judge whether described activity allows to be performed, and when receiving the notice from performance element, based on described status data, the previous status of described data object is switched to dbjective state, after described state supervisor switches the state of described data object, the value of described dbjective state is sent to described data object, to update the status attribute of described data object;Described performance element, when judging that described activity allows to be performed, performs described activity, and after described activity is performed end, sends notice to described state supervisor.
The mutual approach that data syn-chronization is provided between data object and status data is bound by data.Specifying binding source and binding path in data object metadata, after metadata is loaded and is created as data object, control can automatically obtain the data of binding according to BindingContext, and synchronized update binds source when change.
In technique scheme, it is preferred that described performance element is additionally operable to, when performing described activity, obtain the example of described data object, and send the event using described example as parameter, and after described activity is performed end, the activity of sending completes event;Described state supervisor is additionally operable to monitor described event, and calls status check method and judge whether described activity allows to be performed, and monitors described activity and complete event, calls state transition method and performs state conversion process.
In technique scheme, preferably, described state supervisor is additionally operable to according to the plug-in specification corresponding with described activity, the state control logic corresponding with described data object is processed into a plug-in unit, and in the plug-in unit list by described plug-in registration to described activity, described plug-in unit includes verification plug-in unit and state switching plug-in unit;Described performance element, when performing described activity, obtains the example that described data are corresponding, calls described verification plug-in unit and described activity is verified, verification by time, perform described activity, described movable perform to terminate time, call described state switching plug-in unit, perform state switching.
In technique scheme, preferably, described performance element is additionally operable to write the code of status check method and state switching method at described active internal, when performing described activity for described data object, call the status check method of described state supervisor, when verification is passed through, perform described activity, and when described movable execution terminates, call the state switching method of described state supervisor, perform state switching.
Therefore, by technique scheme, on the basis realizing state supervisor, data process by event handling or Plugin Mechanism or service call, and data object and state supervisor are set up logic association.When execution activity, automatically the current state value of data object is obtained, before performing, whether notice state supervisor verification activity can perform, after activity has performed, notice state supervisor switches current state, after state supervisor switching current state, binding mechanism notification data Obj State is changed, and automatically delivers last state value, then the status attribute of refresh data object.
In any of the above-described technical scheme, it is preferred that described condition managing is additionally operable to when receiving more newly requested, according to described more newly requested extension, amendment and/or newly-built managed status data.
State set in state supervisor, state control item set and State Transferring control item set support operationally dynamic expansion and amendment or newly-built according to actual needs, to support that actual flow process is for the flexible configuration of state.
According to a further aspect in the invention, additionally provide a kind of data object and state control logic separation method, including: step 802, described data object and status data are associated by binding, described status data includes Status Type and the control logic corresponding to described Status Type, state supervisor manage described status data;Step 804, will for described data object execution activity time, described state supervisor management read described data object current state, according to the control logic corresponding with described current state, it is judged that whether described activity allows is performed;Step 806, when judging that described activity allows to be performed, performs described activity, and after described activity is performed end, notifies that the previous status of described data object is switched to dbjective state based on described status data by described state supervisor;Step 808, after described state supervisor switches the state of described data object, is sent to described data object by the value of described dbjective state, to update the status attribute of described data object.
The mutual approach that data syn-chronization is provided between data object and status data is bound by data.Specifying binding source and binding path in data object metadata, after metadata is loaded and is created as data object, control can automatically obtain the data of binding according to BindingContext, and synchronized update binds source when change.
In technique scheme, preferably, described step 804 specifically includes: when performing described activity, obtain the example of described data object, and send the event using described example as parameter, described state supervisor monitors described event, and calls status check method and judge whether described activity allows to be performed;Described step 806 specifically includes: after described activity is performed end, and the activity of sending completes event, and described state supervisor is monitored described activity and completed event, calls state transition method and performs state conversion process.
In technique scheme, preferably, described step 804 specifically includes: the state control logic corresponding with described data object, according to the plug-in specification corresponding with described activity, is processed into a plug-in unit by described state supervisor, and in the plug-in unit list by described plug-in registration to described activity, described plug-in unit includes verification plug-in unit and state switching plug-in unit, when described activity will be performed, obtain the example that described data are corresponding, call described verification plug-in unit, verification by time, perform described activity;Described step 806 specifically includes: when described movable execution terminates, calls described state switching plug-in unit, performs state switching.
In technique scheme, preferably, described step 804 specifically includes: write the code of status check method and state switching method at described active internal, when performing described activity for described data object, call the status check method of described state supervisor, verification by time, perform described activity;Described step 808 specifically includes: when described movable execution terminates, calls the state switching method of described state supervisor, performs state switching.
Therefore, by technique scheme, on the basis realizing state supervisor, data process by event handling or Plugin Mechanism or service call, and data object and state supervisor are set up logic association.When execution activity, automatically the current state value of data object is obtained, before performing, whether notice state supervisor verification activity can perform, after activity has performed, notice state supervisor switches current state, after state supervisor switching current state, binding mechanism notification data Obj State is changed, and automatically delivers last state value, then the status attribute of refresh data object.
In any of the above-described technical scheme, it is preferred that when receiving more newly requested, described state supervisor is according to described more newly requested extension, amendment and/or newly-built managed status data.
State set in state supervisor, state control item set and State Transferring control item set support operationally dynamic expansion and amendment or newly-built according to actual needs, to support that actual flow process is for the flexible configuration of state.
Use data binding, state processing, data processing technique when design according to technical scheme and the time of operation has all split the dependence coupled relation between data object and state control logic, support to extend according to actual needs in design state and run mode, amendment or newly-built state and control logic, logical code without amendment data object and activity thereof, it is achieved that data object and the movable purpose being separated with control logic.
Accompanying drawing explanation
Figure 1A illustrates the principle schematic of data objects processing in correlation technique;
Figure 1B illustrates the design of correlation technique Program module and run duration performance schematic diagram;
Fig. 2 illustrates the block diagram of data object and state control logical separation system according to an embodiment of the invention;
What Fig. 3 illustrated data object according to the present invention and state control logical separation system realizes schematic diagram;
What Fig. 4 illustrated state supervisor according to an embodiment of the invention realizes block diagram;
Fig. 5 illustrates the event processing mechanism schematic diagram that data process according to an embodiment of the invention;
Fig. 6 illustrates the Plugin Mechanism schematic diagram that data process according to an embodiment of the invention;
Fig. 7 illustrates the method call mechanism principle figure that data process according to an embodiment of the invention;
Fig. 8 illustrates the flow chart of data object and state control logic separation method according to an embodiment of the invention.
Detailed description of the invention
In order to be more clearly understood that the above-mentioned purpose of the present invention, feature and advantage, below in conjunction with the drawings and specific embodiments, the present invention is further described in detail.
Elaborate a lot of detail in the following description so that fully understanding the present invention, but, the present invention can also adopt other to be different from other modes described here to implement, and therefore, the present invention is not limited to the restriction of following public specific embodiment.
Before the data object illustrated according to the present invention and state control logic separation principle, first in conjunction with Figure 1A and Figure 1B, correlation technique is described.
Figure 1A illustrates the principle schematic of data objects processing in correlation technique, and Figure 1B illustrates the design of correlation technique Program module and run duration performance schematic diagram.
Under normal circumstances, certain functional module of software includes this business datum, logical operation, and user interface (UI).Wherein, business datum is the data object that functional module to process or to generate, and logical operation is the processing procedure to business datum and method, and user interface presents business datum to user, and be responsible for the operation of user to be mapped as logical operation, and the result of operation is fed back to user.
As shown in Figure 1A, when user performs specific activity, when such as amendment or deletion data object, corresponding active reception data object to be processed, reads data object, including the state of data, the hard code of logic that execution state controls, it is verified, performs other logic, thus completing user operation instruction is made corresponding business logical operation.
It is mutual that prior art has processed between the active process of data object and business datum (including status data) processing module typically via data, and the hard written in code of logic that the state that wherein processes controls is in the active process of data object realizes.
Characteristic according to prior art, program module design and run duration show as shown in Figure 1B, when design and operation, logic and state control logic that data object is movable are packaged in the program object of same active process, this program object had both comprised the logic that data object is movable, comprised again state control logic.Whether when design still operationally, logic and state control logic that data object is movable have complete coupled relation, concurrent development when also making design, dynamic expansion and replace the demands such as state control logic and be difficult to when running.
Explanation of nouns: movable: one group in order to realize the set of the data manipulation of specific purpose, wherein for operating the complete process logic of self, it is logically independent between operation, there is the syntagmatic of the execution sequence in logic of complexity, the relation such as including sequencing execution, executed in parallel, selection execution between the operation of active internal.
Fig. 2 illustrates the block diagram of data object and state control logical separation system according to an embodiment of the invention.
As shown in Figure 2, data object and state control logical separation system 200 according to an embodiment of the invention, including: associative cell 202, described data object is associated by binding with the status data in state supervisor, described status data includes Status Type and the control logic corresponding to described Status Type, state supervisor 204 manage described status data;Described state supervisor 204, will for described data object execution activity time, read the current state of described data object, according to the control logic corresponding with described current state, judge whether described activity allows to be performed, and when receiving the notice from performance element 206, based on described status data, the previous status of described data object is switched to dbjective state, after described state supervisor 204 switches the state of described data object, the value of described dbjective state is sent to described data object, to update the status attribute of described data object;Described performance element 206, when judging that described activity allows to be performed, performs described activity, and after described activity is performed end, sends notice to described state supervisor 204.
The mutual approach that data syn-chronization is provided between data object and status data is bound by data.Specifying binding source and binding path in data object metadata, after metadata is loaded and is created as data object, control can automatically obtain the data of binding according to BindingContext, and synchronized update binds source when change.
In technique scheme, it is preferred that described performance element 206 is additionally operable to when performing described activity, obtain the example of described data object, and send the event using described example as parameter, and after described activity is performed end, the activity of sending completes event;Described state supervisor 204 is additionally operable to monitor described event, and calls status check method and judge whether described activity allows to be performed, and monitors described activity and complete event, calls state transition method and performs state conversion process.
In technique scheme, preferably, described state supervisor 204 is additionally operable to according to the plug-in specification corresponding with described activity, the state control logic corresponding with described data object is processed into a plug-in unit, and in the plug-in unit list by described plug-in registration to described activity, described plug-in unit includes verification plug-in unit and state switching plug-in unit;Described performance element 206, when performing described activity, obtains the example that described data are corresponding, calls described verification plug-in unit and described activity is verified, verification by time, perform described activity, described movable perform to terminate time, call described state switching plug-in unit, perform state switching.
In technique scheme, preferably, described performance element 206 is additionally operable to write the code of status check method and state switching method at described active internal, when performing described activity for described data object, call the status check method of described state supervisor 204, when verification is passed through, perform described activity, and when described movable execution terminates, call the state switching method of described state supervisor 204, perform state switching.
Therefore, by technique scheme, realizing on the basis of state supervisor 204, data process by event handling or Plugin Mechanism or service call, and data object and state supervisor 204 are set up logic association.When execution activity, automatically the current state value of data object is obtained, before performing, whether notice state supervisor 204 verification activity can perform, after activity has performed, notice state supervisor 204 switches current state, after state supervisor 204 switches current state, binding mechanism notification data Obj State is changed, and automatically delivers last state value, then the status attribute of refresh data object.
In any of the above-described technical scheme, it is preferred that described condition managing is additionally operable to when receiving more newly requested, according to described more newly requested extension, amendment and/or newly-built managed status data.
State set in state supervisor 204, state control item set and State Transferring control item set support operationally dynamic expansion and amendment or newly-built according to actual needs, to support that actual flow process is for the flexible configuration of state.
Therefore, the dependence coupled relation that the present invention uses data binding, state processing, data processing technique when design and the time of operation has all split between data object and state control logic, support to extend according to actual needs in design state and run mode, amendment or newly-built state and control logic, logical code without amendment data object and activity thereof, it is achieved that data object and the movable purpose being separated with control logic.
What Fig. 3 illustrated data object according to the present invention and state control logical separation system realizes schematic diagram.
As it is shown on figure 3, more thoroughly separate for realizing data object and state control logic, the present invention proposes a kind of separation method realized by data binding, state processing and data process, wherein,
Data binding realizes the data object mapping to status data, makes the data object can be independent from state logic, and keeps the synchronization of state between status data and data object;
Data have processed the activity of data object to be affected the change of data object, carries out verification and the conversion process of state simultaneously, and data process mainly following three kinds of implementations:
1, event processing mechanism, release the dependence between the active process of data object and state control logic code, the event that state control logic is sent by the activity of interception data object, trigger state control logic and process;
2, Plugin Mechanism, it it is the method for dependence between the another kind of active process releasing data object and state control logic code, state control logic is according to the movable specific plug-in specification of data object, state control logic is processed the movable plug-in unit list entering data object as a plug-in registration, the plug-in unit of registration is read in data object activity, thus completing the state control logic of data object;
3, method call, it is that the state control logic method that the active process of data object provides by calling state supervisor completes the state control logic of data object, under this mechanism, data object active process only depends on the signature of the state control logic method that state supervisor provides, do not rely on its internal logic, functionally data activity and state logic are separated and come.
It should be understood that, above-mentioned three kinds of implementations can combine between two or three kinds of combinations are applied, when event processing mechanism can not complete data process, Plugin Mechanism or method call is adopted to carry out data process, or when Plugin Mechanism can not complete data process, adopt method call or event processing mechanism to complete data and process.
The each several part shown in Fig. 3 is described in detail below in conjunction with other accompanying drawings.
1. data binding
Data binding simplifies application development.Data binding technology is to realize data object and movable and state logic separation method basis.Data object and status data object are through bound path direct correlation, and notice of change mechanism is responsible for the state that notification data object is up-to-date when state occurs to change, and synchronization of data objects records up-to-date state.So, it is to avoid by inactive logic resume module state logic the operation being converted to data object data.Meanwhile, binding mechanism dynamically changes BindingContext, and same state can process different data objects without the change making code.
Such as, in project management module, the state of project has different state numbers according to different item types.As shown in the table, define item types and status data:
State classification
State classification Item types
Proprietor Proprietor's capital construction
General General data
Proprietor Proprietor's property
State defines
State State classification
Newly-built Proprietor
Issue
Check and accept
Completion
Transfer
Close
Newly-built General data
Issue
Complete
Close
Project
Item number Item types State
Proj01 Proprietor's capital construction Newly-built
Pass through binding mechanism, when grassroot project Proj01 specifies item types for after " proprietor's capital construction " performing " preservation " operation, project Proj01 is tied to the state definition data of correspondence by the preservation activity of native system automatically, by triggering state control logic automatically by the status set " newly-built " of Proj01 object;When user performs after " issue " activity, binding mechanism automatically updates the state of Proj01 object to " issue ";Within the system, the program code of item objects does not need be concerned about the content how obtaining state and arrange in the status attribute of item objects.
Realizing in method at this, data bind the mutual approach providing data syn-chronization between data object and status data object.Specifying binding source and binding path in data object metadata, after metadata is loaded and is created as data object, control can automatically obtain the data of binding according to BindingContext, and synchronized update binds source when change.
2. state processing
In management software, business datum generally has different states, and when different, the performed business operation of data object has difference.When arranging certain activity and making service data object state change, the status attribute of data object can change.Such as project is likely to be at the states such as newly-built, issue, completion, closedown.Under different conditions, project allows to perform different movable control logic, such as whether can change, whether can cancel issues, the situation such as whether can close, this requires also to reflect project status while of project data, determine which to perform movable, it is not possible to it is movable which performs.
In generally exploitation, state control logic needs business logic modules to realize at active internal coding according to business datum state, it is necessary to more condition adjudgement operation, and logical code needs specific reference solidification to realize the control logic of state.This control mode is loaded down with trivial details and the degree of coupling is higher.State processing technology described herein can control to provide simple scheme for data object state.
State processing mechanism referent includes state supervisor, stateful example, state control item, State Transferring control item, the status object hierarchical structure in the state supervisor 204 that order is example, as shown in Figure 4.
1) set of state supervisor controlled state, and to have a state in this set be current state, keeps Tong Bu with the current state of data object;State set allows to arrange in design state, supports to extend according to actual needs at run mode, amendment or newly-built simultaneously.
2) method that state supervisor provides switching state, in order to program can be switched to another state from a state, and binds, by data, the state that notification data object is new;The method receives data object and activity, first read the current state of data object, then read the State Transferring control item set of this state, it is determined that whether current active triggers State Transferring, if triggered, then perform to be switched to the state of data object the process of dbjective state.
3) method that state supervisor provides status check, in order to program can verify whether current active under current state allows to perform;The method receives data object and activity, first reads the current state of data object, then reads the state control item set of this state, it is determined that whether current active allows perform and return result.
4) in each state, definable comprises the set of multiple state control item, judges whether the activity of each control item self or the activity of other data allow to perform in this condition based on this state control item;This set allows to arrange in design state, supports to extend according to actual needs at run mode, amendment or newly-built simultaneously.
5) in each state, definable comprises the set of multiple State Transferring control item, and in this condition, after this activity performs, the state of data object is switched to that state in the activity of each State Transferring control data object self;This set allows to arrange in design state, supports to extend according to actual needs at run mode, amendment or newly-built simultaneously.
6) state set of state supervisor, state control item set and State Transferring control item set support operationally dynamic expansion and amendment or newly-built according to actual needs, to support that actual flow process is for the flexible configuration of state.
3. data process
On the basis realizing state supervisor, data process by event handling or Plugin Mechanism or service call, and data object and state supervisor are set up logic association.When execution activity, automatically the current state value of data object is obtained, before performing, whether notice state supervisor verification activity can perform, after activity has performed, notice state supervisor switches current state, after state supervisor switching current state, binding mechanism notification data Obj State is changed, and automatically delivers last state value to data object, the then status attribute of refresh data object.
Data process mainly following three kinds of modes:
1, event processing mechanism (with reference to Fig. 5), release the dependence between the active process of data object and state control logic code, the event that state control logic is sent by the activity of interception data object, trigger state control logic and process;
The processing procedure of event processing mechanism is as follows:
1) when performing certain activity for data object, the example of this activity acquisition data object, and it can be used as the parameter of event, send the beginning event of this activity;
2) state supervisor intercepts the beginning event of this activity, calls status check method, back-checking result;
3) if verification is not passed through, state supervisor returns the abnormal results not passed through;
4) this abnormal results of this active reception, and by this abnormal results's return activity caller;
5), after activity has performed, what send this activity completes event;
6) what state supervisor intercepted this activity completes event, calls state transition method, performs State Transferring.
2, Plugin Mechanism (with reference to Fig. 6), it it is the method for dependence between the another kind of active process releasing data object and state control logic code, state control logic is according to the movable specific plug-in specification of data object, state control logic is processed the movable plug-in unit list entering data object as a plug-in registration, the plug-in unit of registration is read in data object activity, thus completing the state control logic of data object;
The processing procedure of board processing machine is as follows:
1) design state, before the process that state supervisor is announced for activity with complete plug-in unit standard, write satisfactory status check and State Transferring plug-in code, inside this plug-in code, call status check method and the state transition method of state supervisor respectively;
2) when performing certain activity for data object, this activity obtains the example of data object, calls and processes the plug-in unit of registration in anterior plug-in, calls the verification plug-in unit of state supervisor;
3) the verification plug-in unit of state supervisor calls status check method, back-checking result;
4) if verification is not passed through, state supervisor returns the abnormal results not passed through;
5) abnormal results that this active reception does not pass through, return activity caller;
6) after activity has performed, having called the plug-in unit of registration in plug-in unit, that calls state supervisor completes plug-in unit;
7) the verification plug-in unit of state supervisor calls state transition method, performs State Transferring.
3, method call (with reference to Fig. 7), it it is the active process of data object, the state control logic method provided by calling state supervisor completes the state control logic of data object, under this mechanism, data object active process only depends on the signature of the state control logic method that state supervisor provides, do not rely on its internal logic, functionally data activity and state logic are separated and come.
The treatment mechanism process of method call is as follows:
1) design state, the movable status check method according to state supervisor announcement and state transition method, the code writing status check method and the state transition method calling state supervisor at active internal respectively realizes;
2), when running, when performing certain activity for data object, this activity obtains the example of data object, actively calls the method for calibration of state supervisor;
2) if verification is not passed through, state supervisor returns the abnormal results not passed through;
3) abnormal results that this active reception does not pass through, return activity caller.
4) verification is passed through, execution activity.
5) when activity has performed, call the state transition method of state supervisor, perform State Transferring.
Use data binding, state processing, data processing technique when design according to technical scheme and the time of operation has all split the dependence coupled relation between data object and state control logic, support to extend according to actual needs in design state and run mode, amendment or newly-built state and control logic, logical code without amendment data object and activity thereof, it is achieved that data object and the movable purpose being separated with control logic.
Fig. 8 illustrates the flow chart of data object and state control logic separation method according to an embodiment of the invention.
As shown in Figure 8, data object and state control logic separation method according to an embodiment of the invention, including: step 802, data object and status data are associated by binding, status data includes Status Type and the control logic corresponding to Status Type, by state supervisor controlled state data;Step 804, will for data object execution activity time, state supervisor management read data object current state, according to the control logic corresponding with current state, it is judged that whether activity allows is performed;Step 806, when judging that activity allows to be performed, execution activity, and after activity is performed end, the previous status of data object is switched to dbjective state based on status data by notice state supervisor;Step 808, after the state of state supervisor switch data object, is sent to data object by the value of dbjective state, with the status attribute of more new data-objects.
The mutual approach that data syn-chronization is provided between data object and status data is bound by data.Specifying binding source and binding path in data object metadata, after metadata is loaded and is created as data object, control can automatically obtain the data of binding according to BindingContext, and synchronized update binds source when change.
In technique scheme, preferably, described step 804 specifically includes: when performing described activity, obtain the example of described data object, and send the event using described example as parameter, described state supervisor monitors described event, and calls status check method and judge whether described activity allows to be performed;Described step 806 specifically includes: after described activity is performed end, and the activity of sending completes event, and described state supervisor is monitored described activity and completed event, calls state transition method and performs state conversion process.
In technique scheme, preferably, described step 804 specifically includes: the state control logic corresponding with described data object, according to the plug-in specification corresponding with described activity, is processed into a plug-in unit by described state supervisor, and in the plug-in unit list by described plug-in registration to described activity, described plug-in unit includes verification plug-in unit and state switching plug-in unit, when described activity will be performed, obtain the example that described data are corresponding, call described verification plug-in unit, verification by time, perform described activity;Described step 806 specifically includes: when described movable execution terminates, calls described state switching plug-in unit, performs state switching.
In technique scheme, preferably, described step 804 specifically includes: write the code of status check method and state switching method at described active internal, when performing described activity for described data object, call the status check method of described state supervisor, verification by time, perform described activity;Described step 808 specifically includes: when described movable execution terminates, calls the state switching method of described state supervisor, performs state switching.
Therefore, by technique scheme, on the basis realizing state supervisor, data process by event handling or Plugin Mechanism or service call, and data object and state supervisor are set up logic association.When execution activity, automatically the current state value of data object is obtained, before performing, whether notice state supervisor verification activity can perform, after activity has performed, notice state supervisor switches current state, after state supervisor switching current state, binding mechanism notification data Obj State is changed, and automatically delivers last state value, then the status attribute of refresh data object.
In any of the above-described technical scheme, it is preferred that when receiving more newly requested, described state supervisor is according to described more newly requested extension, amendment and/or newly-built managed status data.State set in state supervisor, state control item set and State Transferring control item set support operationally dynamic expansion and amendment or newly-built according to actual needs, to support that actual flow process is for the flexible configuration of state.
Data object described in the invention and the separation method of state control logic, bring bigger motility and efficiency improvement when design with when running:
In the development and Design stage, data object and movable programming personnel with control programming in logic personnel can the respective code development of parallel expansion, can't interact, as long as in accordance with identical stipulations, when integrated, data object and activity and control logical code module can be integrated without any change smoothly.The closely-coupled programming mode that the contrast of this development mode is current, is truly realized concurrent development;
Operationally, under conventional technology, data object and activity and control logic module are coupling in an object in the runtime, a usual moving object to be responsible for the logical process of data object moving object functional module simultaneously, also being responsible for the logical process that state controls, this makes dynamical state control logic be difficult to simultaneously.After using isolation technics described herein, run duration, data object is provided by two different objects from state control logic with activity, associated by data binding, the logical process of data object and movable only responsible data object and moving object functional module, corresponding state control logics etc. match with state control logic module automatically by tying up fixed sum data process, so, operationally can extend according to actual needs, amendment or newly-built state and control logic, easily realize dynamically changing the function of service logic.
The foregoing is only the preferred embodiments of the present invention, be not limited to the present invention, for a person skilled in the art, the present invention can have various modifications and variations.All within the spirit and principles in the present invention, any amendment of making, equivalent replacement, improvement etc., should be included within protection scope of the present invention.

Claims (10)

1. a data object and state control logical separation system, it is characterised in that including:
Associative cell, is associated described data object by binding with the status data in state supervisor, and described status data includes Status Type and the control logic corresponding to described Status Type, state supervisor manage described status data;
Described state supervisor, will for described data object execution activity time, read the current state of described data object, according to the control logic corresponding with described current state, judge whether described activity allows to be performed, and when receiving the notice from performance element, based on described status data, the previous status of described data object is switched to dbjective state, after described state supervisor switches the state of described data object, the value of described dbjective state is sent to described data object, to update the status attribute of described data object;
Described performance element, when judging that described activity allows to be performed, performs described activity, and after described activity is performed end, sends notice to described state supervisor;
Described performance element is additionally operable to, when performing described activity, obtain the example of described data object, and send the event using described example as parameter, and after described activity is performed end, the activity of sending completes event.
2. data object according to claim 1 and state control logical separation system, it is characterized in that, described state supervisor is additionally operable to monitor described event, and call status check method and judge whether described activity allows to be performed, and monitor described activity and complete event, call state transition method and perform state conversion process.
3. data object according to claim 1 and state control logical separation system, it is characterized in that, described state supervisor is additionally operable to according to the plug-in specification corresponding with described activity, the state control logic corresponding with described data object is processed into a plug-in unit, and in the plug-in unit list by described plug-in registration to described activity, described plug-in unit includes verification plug-in unit and state switching plug-in unit;
Described performance element, when performing described activity, obtains the example that described data are corresponding, calls described verification plug-in unit and described activity is verified, verification by time, perform described activity, described movable perform to terminate time, call described state switching plug-in unit, perform state switching.
4. data object according to claim 1 and state control logical separation system, it is characterized in that, described performance element is additionally operable to write the code of status check method and state switching method at described active internal, when performing described activity for described data object, call the status check method of described state supervisor, when verification is passed through, perform described activity, and when described movable execution terminates, call the state switching method of described state supervisor, perform state switching.
5. data object according to any one of claim 1 to 4 and state control logical separation system, it is characterized in that, described condition managing is additionally operable to when receiving more newly requested, according to described more newly requested extension, amendment and/or newly-built managed status data.
6. a data object and state control logic separation method, it is characterised in that including:
Step 802, is associated described data object and status data by binding, and described status data includes Status Type and the control logic corresponding to described Status Type, state supervisor manage described status data;
Step 804, will for described data object execution activity time, described state supervisor management read described data object current state, according to the control logic corresponding with described current state, it is judged that whether described activity allows is performed;
Step 806, when judging that described activity allows to be performed, performs described activity, and after described activity is performed end, notifies that the previous status of described data object is switched to dbjective state based on described status data by described state supervisor;
Step 808, after described state supervisor switches the state of described data object, is sent to described data object by the value of described dbjective state, to update the status attribute of described data object;
Described step 804 specifically includes: when performing described activity, obtain the example of described data object, and sending the event using described example as parameter, described state supervisor monitors described event, and calls status check method and judge whether described activity allows to be performed.
7. data object according to claim 6 and state control logic separation method, it is characterized in that, described step 806 specifically includes: after described activity is performed end, the activity of sending completes event, described state supervisor is monitored described activity and is completed event, calls state transition method and performs state conversion process.
8. data object according to claim 6 and state control logic separation method, it is characterized in that, described step 804 specifically includes: described state supervisor is according to the plug-in specification corresponding with described activity, the state control logic corresponding with described data object is processed into a plug-in unit, and in the plug-in unit list by described plug-in registration to described activity, described plug-in unit includes verification plug-in unit and state switching plug-in unit, when described activity will be performed, obtain the example that described data are corresponding, call described verification plug-in unit, verification by time, perform described activity;
Described step 806 specifically includes: when described movable execution terminates, calls described state switching plug-in unit, performs state switching.
9. data object according to claim 6 and state control logic separation method, it is characterized in that, described step 804 specifically includes: write the code of status check method and state switching method at described active internal, when performing described activity for described data object, call the status check method of described state supervisor, verification by time, perform described activity;
Described step 808 specifically includes: when described movable execution terminates, calls the state switching method of described state supervisor, performs state switching.
10. the data object according to any one of claim 6 to 9 and state control logic separation method, it is characterised in that when receiving more newly requested, described state supervisor is according to described more newly requested extension, amendment and/or newly-built managed status data.
CN201210479553.0A 2012-11-22 2012-11-22 Data object and state control logical separation system and method Active CN103019695B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210479553.0A CN103019695B (en) 2012-11-22 2012-11-22 Data object and state control logical separation system and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210479553.0A CN103019695B (en) 2012-11-22 2012-11-22 Data object and state control logical separation system and method

Publications (2)

Publication Number Publication Date
CN103019695A CN103019695A (en) 2013-04-03
CN103019695B true CN103019695B (en) 2016-07-06

Family

ID=47968334

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210479553.0A Active CN103019695B (en) 2012-11-22 2012-11-22 Data object and state control logical separation system and method

Country Status (1)

Country Link
CN (1) CN103019695B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105045603A (en) * 2015-08-24 2015-11-11 北京金山安全软件有限公司 Method and device for constructing finite-state machine model framework and electronic device
CN106547525A (en) * 2015-09-21 2017-03-29 阿里巴巴集团控股有限公司 A kind of method and apparatus of the web app for performing complete state pattern
CN110764932A (en) * 2019-10-22 2020-02-07 网易传媒科技(北京)有限公司 Data processing method, system, medium and computing device
CN111258474B (en) * 2020-01-15 2021-07-06 广东三维家信息科技有限公司 Interaction method and device based on GUI and electronic equipment
CN113419689B (en) * 2021-08-25 2021-12-07 苏州浪潮智能科技有限公司 Method, system, device and storage medium for object management based on state analysis

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1889644A (en) * 2006-01-13 2007-01-03 深圳创维-Rgb电子有限公司 Method for constituting television software system using mode machine
CN101872305A (en) * 2010-06-08 2010-10-27 用友软件股份有限公司 UI (User Interface) performance and service logic separation method and system
CN102103497A (en) * 2009-12-18 2011-06-22 阿尔卡特朗讯 Finite state machine actuating device and method, and method for establishing and using finite state machine

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7464091B2 (en) * 2002-11-27 2008-12-09 Sap Ag Method and software for processing data objects in business applications

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1889644A (en) * 2006-01-13 2007-01-03 深圳创维-Rgb电子有限公司 Method for constituting television software system using mode machine
CN102103497A (en) * 2009-12-18 2011-06-22 阿尔卡特朗讯 Finite state machine actuating device and method, and method for establishing and using finite state machine
CN101872305A (en) * 2010-06-08 2010-10-27 用友软件股份有限公司 UI (User Interface) performance and service logic separation method and system

Also Published As

Publication number Publication date
CN103019695A (en) 2013-04-03

Similar Documents

Publication Publication Date Title
CA3092364C (en) Live migration of clusters in containerized environments
CN103019695B (en) Data object and state control logical separation system and method
CN101853172B (en) Device and method for dynamically upgrading complex programmable logic device (CPLD)
US20130159650A1 (en) Backup method and information processing apparatus
CN107181679A (en) A kind of port binding implementation method and device
CN103428051A (en) System and method for testing communication devices
US8893272B2 (en) Method and device for recombining runtime instruction
CN110532074A (en) A kind of method for scheduling task and system of multi-tenant Mode S aaS service cluster environment
US20060101059A1 (en) Employment method, an employment management system and an employment program for business system
CN102314368A (en) Method and equipment for updating configuration data of server program
CN102169447A (en) Method and corresponding system for registering and deregistering self-defined Shell
US7694182B2 (en) Debugging system and method
CN103036975A (en) Virtual machine control method and control device
CN104598309A (en) Multi-mode OS (operating system) based on OS virtualization and creating and switching method thereof
CN106301877A (en) The upgrade method of a kind of Virtual NE and device
CN112230978A (en) Multi-data-source dynamic switching method, electronic equipment and storage medium
CN101373464B (en) Method, apparatus and system for automatically adopting form setting
US20050086665A1 (en) Autonomous device driver
CN110377298A (en) A kind of distributed type assemblies upgrade method and distributed type assemblies
CN111880905B (en) Method for migrating virtual machines across cells by using openstack
WO2015196524A1 (en) Software upgrade processing method and device, terminal and server
CN108874504A (en) A kind of management method and device of multiple virtualization platform
CN114490015A (en) Method and device for configuring computing mode and computing equipment
JP4034201B2 (en) Computer resource utilization method and computer resource utilization method
CN109684281A (en) A kind of method and system of the file replacement and monitoring of dynamic and configurable

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information

Address after: 100094 Haidian District North Road, Beijing, No. 68

Applicant after: Yonyou Network Technology Co., Ltd.

Address before: 100094 Beijing city Haidian District North Road No. 68, UFIDA Software Park

Applicant before: UFIDA Software Co., Ltd.

COR Change of bibliographic data
C14 Grant of patent or utility model
GR01 Patent grant