CN109634569A - Process implementation method, device, equipment and readable storage medium storing program for executing based on note - Google Patents

Process implementation method, device, equipment and readable storage medium storing program for executing based on note Download PDF

Info

Publication number
CN109634569A
CN109634569A CN201811526367.1A CN201811526367A CN109634569A CN 109634569 A CN109634569 A CN 109634569A CN 201811526367 A CN201811526367 A CN 201811526367A CN 109634569 A CN109634569 A CN 109634569A
Authority
CN
China
Prior art keywords
note
node
circulation
operation flow
attribute
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.)
Granted
Application number
CN201811526367.1A
Other languages
Chinese (zh)
Other versions
CN109634569B (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.)
WeBank Co Ltd
Original Assignee
WeBank 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 WeBank Co Ltd filed Critical WeBank Co Ltd
Priority to CN201811526367.1A priority Critical patent/CN109634569B/en
Publication of CN109634569A publication Critical patent/CN109634569A/en
Application granted granted Critical
Publication of CN109634569B publication Critical patent/CN109634569B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/20Software design
    • G06F8/22Procedural

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The present invention provides a kind of process implementation method based on note, which comprises defines the special object of operation flow;In pre-set business process framework initialization, the special object for the operation flow for being added to note is initialized;Sequence is executed according to explain that content constructs the operation flow.The present invention also provides a kind of process realization device, equipment and readable storage medium storing program for executing based on note.The lightweight frame that the present invention solves existing business workflow management does not support the workflow for according to condition carrying out state, and needs a large amount of the technical issues of operation system code is transformed.

Description

Process implementation method, device, equipment and readable storage medium storing program for executing based on note
Technical field
The present invention relates to intelligent terminal technical field more particularly to a kind of process implementation method based on note, device, set Standby and readable storage medium storing program for executing.
Background technique
Currently, tool relatively advanced in terms of Business Process Management is mainly JBPM frame.JBPM(Java Business Process Management, Business Process Management) frame be a kind of framework it is complex, it is multiple functional can Execute process language frames;The frame during using and integrating due to needing to expend biggish workload, for common Seem excessively complicated for operation system process, and integrated difficulty is big.
In addition, also there is the lightweight frame similar to Spring Statemachine.Spring Statemachine phase There is apparent lightweight advantage compared with JBPM frame, the control of state is carried out in the form of the triggering of direct event.Such as Fig. 1 Shown, Fig. 1 is a state machine diagram of Spring Statemachine, and state machine therein includes two states: state 1, shape State 2;Switching between different conditions is carried out by event 1, event 2.Such lightweight frame is not supported according to condition to carry out shape The workflow of state, it is therefore desirable to which a large amount of transformation operation system codes just adapt to specific Business Process Management.
Above content is only used to facilitate the understanding of the technical scheme, and is not represented and is recognized that above content is existing skill Art.
Summary of the invention
It the process implementation method that the main purpose of the present invention is to provide a kind of based on note, device, equipment and readable deposits Storage media, it is intended to the lightweight frame for solving existing business workflow management does not support the workflow for according to condition carrying out state, and Need the technical issues of operation system code largely is transformed.
To achieve the above object, the present invention provides a kind of process implementation method based on note, which is characterized in that the side Method includes:
Define the special object of operation flow;
In pre-set business process framework initialization, the special object for the operation flow for being added to note is carried out initial Change;
Sequence is executed according to explain that content constructs the operation flow.
Preferably, the special object of the operation flow includes: the process inlet node of the operation flow, the business The execution code of circulation condition and each process step between the process step of process, each process step.
Preferably, described according to the step of content constructs the execution sequence of the operation flow is explained, it specifically includes:
The class in the business process frame is traversed, and obtains the method set for having added the class of note;
The method set of the class is traversed, and is extracted containing the method for explaining content;
Based on extracted method, detect whether the class contains process inlet node and process termination condition simultaneously;
Contain process inlet node and process termination condition when if described similar, according to the note of the process inlet node The note content for solving content and each process step determines the circulation sequence of each process step node of the operation flow.
Preferably, after described the step of extracting containing the method for explaining content, further includes: cache extracted method Into key assignments container map;
It is described according to the note content of the process inlet node and the note content of each process step, determine the business It the step of circulation sequence of each process step node of process, specifically includes:
Process inlet node is obtained, from key assignments container map to check whether the process inlet node contains circulation item Part COMMENTS attribute;
If the process inlet node contains circulation condition annotations attribute, determined according to the circulation condition annotations attribute Corresponding next circulation node, and check whether next circulation node contains circulation condition annotations attribute;
If next circulation node contains circulation condition annotations attribute, continues the determination of circulation node, lay equal stress on Resurgent turns the checking step of condition circulation attribute, until determining the last one circulation node, and the last one circulation node is set It is set to the process end node;
If next circulation node sets institute for next circulation node without containing circulation condition annotations attribute State process end node.
Preferably, after described the step of constructing the execution sequence of the operation flow according to note content, further include;
When detecting the execution signal of pre-set business process frame, according to the special object and the operation flow Execution sequence carries out the circulation control of the operation flow;
Wherein, the mode that the parameter between each process step of the operation flow passes through context carries out.
In addition, to achieve the above object, the present invention also provides a kind of process realization device based on note, described device packet It includes:
Definition module, for defining the special object of operation flow;
Module is explained, is used in pre-set business process framework initialization, to the specific of the operation flow for being added to note Object is initialized;
Sequential build module is executed, for executing sequence according to explain that content constructs the operation flow.
Preferably, the special object of the operation flow includes: the process inlet node of the operation flow, the business The execution code of circulation condition and each process step between the process step of process, each process step.
Preferably, the execution sequential build module specifically includes:
Traversal Unit for traversing the class in the business process frame, and obtains the method collection for having added the class of note It closes;
Extraction unit for traversing the method set of the class, and is extracted containing the method for explaining content;
Detection unit detects whether the class contains process inlet node and stream simultaneously for being based on extracted method Journey termination condition;
Circulate determination unit, if for it is described similar when contain process inlet node and process termination condition, according to institute The note content of process inlet node and the note content of each process step are stated, determines each process step section of the operation flow The circulation sequence of point.
Preferably, the extraction unit is also used to cache extracted method into key assignments container map;
Circulate determination unit, is specifically used for obtaining process inlet node from key assignments container map, to check that the process enters Whether mouth node contains circulation condition annotations attribute;If the process inlet node contains circulation condition annotations attribute, basis The circulation condition annotations attribute determines corresponding next circulation node, and checks whether next circulation node contains circulation Condition annotations attribute;If next circulation node contains circulation condition annotations attribute, continue the determination of circulation node, And repetitive stream turns the checking step of condition circulation attribute, until determining the last one circulation node, and the last one circulation is saved Point is set as the process end node;If next circulation node is without containing circulation condition annotations attribute, under described First-class trochanterion is set as the process end node.
Preferably, described device further includes circulation control module;
The circulation control module, for when detecting the execution signal of pre-set business process frame, according to the spy The execution sequence for determining object and the operation flow carries out the circulation control of the operation flow;
Wherein, the mode that the parameter between each process step of the operation flow passes through context carries out.
In addition, to achieve the above object, the process based on note that the present invention also provides a kind of realizes equipment, described based on note The process of solution realizes that equipment includes: memory, processor and is stored on the memory and can run on the processor Process based on note realize that program, the process based on note are realized and realized as above when program is executed by the processor The step of described in any item process implementation methods based on note.
In addition, to achieve the above object, the present invention also provides a kind of readable storage medium storing program for executing, being deposited on the readable storage medium storing program for executing It contains the workflow based on note and realizes program, the workflow based on note is realized real when program is executed by processor Now the step of process implementation method described in any one as above based on note.
The embodiment of the present invention proposes a kind of process implementation method, device, equipment and readable storage medium storing program for executing based on note, leads to The special object for defining operation flow is crossed, and the special object of operation flow is added in pre-set business process framework initialization It appends notes to, and executes sequence according to explain that content constructs the operation flow.In this way, avoiding using excessively complicated and integrated hardly possible Big frame is spent, the lightweight of business process frame is helped to realize;The definition of the special object to operation flow is utilized simultaneously And addition is explained, and constructs the sequence that executes of operation flow, and support basis in the detailed process implementation procedure of operation flow Condition circulation process facilitates code maintenance so that code is consistent with operation flow;It is not necessary that operation system generation is largely transformed Code, invades code small, and slightly transformation can be used on existing code, namely with using simple and high flexibility ratio spy Point.
Detailed description of the invention
Fig. 1 is a state machine diagram of Spring Statemachine;
Fig. 2 is that the present invention is based on the flow diagrams of the process implementation method first embodiment of note;
Fig. 3 is a kind of life cycle figure of operation flow;
Fig. 4 is that the present invention is based on the refinement step schematic diagrames of the step S30 of the process implementation method first embodiment of note;
Fig. 5 is the refinement step schematic diagram of the step S34 in Fig. 4;
Fig. 6 is that the present invention is based on the flow diagrams of the process implementation method second embodiment of note;
Fig. 7 is that the present invention is based on the schematic diagrames of a certain operation flow of the process implementation method of note;
Fig. 8 is that the present invention is based on the functional block diagrams of the process realization device of note;
Fig. 9 is that the present invention is based on the refinement schematic diagrames of the execution sequential build module 30 of the process realization device of note;
Figure 10 is that the present invention is based on another the functional block diagrams of the process realization device of note.
The object of the invention is realized, the embodiments will be further described with reference to the accompanying drawings for functional characteristics and advantage.
Specific embodiment
It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not intended to limit the present invention.
The present invention provides a kind of process implementation method based on note.
Fig. 2 is referred to, Fig. 2 is that the present invention is based on the flow diagrams of the first embodiment of the process implementation method of note. Wherein, which comprises
Step S10 defines the special object of operation flow;
In the present invention, the complete lifecycle of an operation flow contains process design, flow definition, process structure Build, process executes, process such as terminates at the main process, as shown in Figure 3.Wherein, process design process is specifically that developer will be pre- If operation flow is split, to obtain the circulation to circulate between several corresponding process steps, and each step of design Condition;Pre-set business process is specifically to have formulated operation flow (Business Process);The operation flow can be logical Cross the related procedure formulated after a certain business item demand is interpreted and analyzed.By taking process of withholing as an example, process of withholing It is refined and is split, split into following steps: 1, verifying required parameter;2, parameter verification fails, and directly terminates process, returns to ginseng Number verification failure;3, parameter verification passes through, storage;4, it withholds, more new state;5, terminate process, return the result.
Specifically, developer carries out the tissue of pre-set business process according to process design content to realize operation flow The definition of special object, such as logic-based relationship carry out the arrangement of each process step, and it is each to can specifically include determination The circulation condition to circulate between the execution content of process step, each step.In the present embodiment, it is defined by programming The special object of operation flow.The special object of the pre-set business process specifically includes: the process inlet node of operation flow (Entry), the circulation condition (Condition) and each process between the process step (Step), each process step of operation flow The execution code of step.What needs to be explained here is that the process step of operation flow includes all kinds of nodes, such as step A, B can To separately include N number of node, M node.
Step S20, in pre-set business process framework initialization, to the special object of the operation flow for being added to note into Row initialization;
In system starting, preset business process frame is initialized, including initializing all kinds of ginsengs in the frame Number;At this point, being initialized to the special object for the operation flow for being added to note.
In various embodiments of the present invention, step S20 includes carrying out just to the special object for the operation flow for being added to note Specifically a kind of grammer metadata skill that can be added in programming language (such as Java) source code is explained in the operation of beginningization, addition Art.Note can be added on class, method, the parameter of method and local variable.It is added after explaining in a program, compiler, Developing instrument and other programs can obtain the note content of addition by reflection mechanism, and execute relevant to content is explained dynamic Work or process.
Shown in the as follows and its corresponding table of the note content specifically added.
@BusinessProcess
@Entry
@Step
@End
Attribute Value Whether must fill out Explanation
name String It is no Slightly
@Route
Attribute Value Whether must fill out Explanation
exp String It is Conditional expression
next String It is Step title
Wherein ,@BusinessProcess is for identifying an operation flow, corresponding a certain specific operation flow.It is explained Content includes at least operation flow title and used thread pool (executor).
@Entry is for identifying process inlet, the process inlet node of corresponding a certain specific operation flow.It explains content Including at least the title of process inlet node, next attribute (for specifying the next node of Entry) and the default that mistake occurs Exit criteria.
@Step is for identifying process step, the related content of corresponding each process step.It includes process step that it, which explains content, Title, next/nexts attribute (for specifying next circulation node of present node) and current process step execute front and back Call-by mechanism etc..
@End is for identifying process end step.
For@Route for identifying flow chart branches routing, explaining content includes the item that different process steps circulates Part.
Step S30 executes sequence according to explain that content constructs the operation flow.
In a specific implementation, as shown in figure 4, step S30 includes:
Step S31 traverses the class in the business process frame, and obtains the method set for having added the class of note;
If there are any form of note contents in certain one kind, it can be considered as to exist on such and explain content.Judging When in class with the presence or absence of content is explained, the identifier that whether there is "@" in class can be searched.Exist when detecting in current class Content is explained, then each method of current class wrapper is extracted into (or label), and then get the method set of current class.
Content is explained if being not detected and existing on such, skips such, and continues to execute judgement to next class, up to Complete the judgement of all classes.
Step S32 traverses the method set of the class, and extracts containing the method for explaining content;
By traversing the method set in current class, whether judge in a certain method containing note content;If so, extracting This method, and so on.
Preferably, it after extracting containing the method for explaining content, directly executes and " is based on extracted method, detects institute Class is stated whether simultaneously containing process inlet node and process termination condition, if process inlet node and process are contained when described similar Termination condition determines the business then according to the note content of the process inlet node and the note content of each process step The circulation sequence of each process step node of process ".
Further, it in order to improve the flexibility that the process based on note is realized, is extracting containing the method for explaining content Later, it will cache containing the method for explaining content into key assignments container map." key assignments container map " designated herein can be considered as number It is that a kind of key-value pair of key-value (key assignments) by taking Java as an example, has in the concrete realization according to the key assignments container in structure Map interface, hashmap, treemap, hashtable succession map interface.In Linux, there is mmap () function, uses Mmap substitutes read, it is possible to reduce CPU copies number, while system context switching times being reduced to 2 times, thus larger amplitude Spend Promoting Layered Buffer and reading speed performance
Step S33 is based on extracted method, detects whether the class terminates containing process inlet node and process simultaneously Condition;
Process inlet node and process termination condition respectively correspond the beginning of operation flow and terminate mechanism, in necessity Hold.Specifically, the note content whether caching contains@Entry above and@End into the method for key assignments container map is searched, really Recognize whether the class contains process inlet node and process termination condition wherein simultaneously, process termination condition, which corresponds to process, to be terminated to walk Suddenly.If containing the note content of@Entry above and@End in extracted method simultaneously, stream is contained when determining described similar Journey Ingress node and process termination condition.Otherwise, it is determined that the class does not contain process inlet node and process termination condition simultaneously, Outputting alarm at this time, to remind programming personnel to supply the project of gaps and omissions, to guarantee the subsequent normal execution of operation flow.
Step S34 contains process inlet node and process termination condition, according to the process inlet when if described similar The note content of node and the note content of each process step determine that the circulation of each process step node of the operation flow is suitable Sequence.
In a specific implementation, as shown in figure 5, step S34 includes: that a1. obtains process inlet section from key assignments container map Point (Entry), to check whether the process inlet node contains circulation condition annotations attribute;
If a2. the process inlet node contains circulation condition annotations attribute, according to the circulation condition annotations attribute It determines corresponding next circulation node, and checks whether next circulation node contains circulation condition annotations attribute;
If a3. next circulation node contains circulation condition annotations attribute, continue the determination of circulation node, and Repeat circulation condition circulation attribute checking step, until determine the last one circulation node, and by the last one circulate node It is set as the process end node;
If a4. next circulation node is arranged without containing circulation condition annotations attribute for next circulation node For the process end node.
The note content Entry of process Ingress node is read out, and whether detect wherein includes next attribute. If it is not, then directly setting process end node (End) for next node.If so, the next section that will be specified in next attribute Point is determined as " next circulation node ".Further, to the note of the process step where fixed " next circulation node " Content@Step is read out, and whether detect wherein includes next/nexts attribute.If it is not, then " next circulation saves by described in Point " is set as process end node (End).If so, continuing the determination of circulation node, until determining the last one stream Trochanterion, and then process end node (End) is set by the last one circulation node.It should be noted that different step it Between conditionity circulation also need according in@Route note circulation condition realize.The specific implementation citing of step S34 may be used also Referring to illustration hereafter.
In the present embodiment, by the special object of definition operation flow, and in pre-set business process framework initialization When the special object of operation flow added explain, and execute sequence according to explain that content constructs the operation flow.In this way, The frame big using excessively complicated and integrated difficulty is avoided, the lightweight of business process frame is helped to realize;Utilization pair simultaneously The definition and addition of the special object of operation flow are explained, and construct the sequence that executes of operation flow, and in the tool of operation flow It supports to facilitate code maintenance so that code is consistent with operation flow according to condition circulation process in body process implementation procedure; It is not necessary that operation system code is largely transformed, to code invade it is small, on existing code slightly transformation i.e. can be used, namely have make With simple and high flexibility ratio feature.
Further, on the basis of the present invention is based on the first embodiment of the process implementation method of note, second is proposed Embodiment.As shown in fig. 6, Fig. 6 is the flow diagram of second embodiment.Wherein, after step S30, further include;
Step S40, when detecting the execution signal of pre-set business process frame, according to the special object and the industry The execution sequence for process of being engaged in carries out the circulation control of the operation flow;
Wherein, the mode that the parameter between each process step of the operation flow passes through context carries out.
After completing process building described above, after system is called to operation flow Ingress node (Entry), in advance If business process frame is automatically into execution process.At this point, the execution signal of triggering pre-set business process frame.Based on defined Each special object and according to explain content building execute sequence, after getting the business datum of continuous renewal, dynamically It determines next circulation node, and carries out node-flow and turn, to realize the circulation control of operation flow.
In the following, being illustrated.As shown in fig. 7, a certain operation flow specifically includes process step 1~4, realized Journey is designed to: pre-set business process frame enters from process inlet node (Entry) executes process step 1 (Step1), if real Border circulation condition meets condition 1, then executes process step 2 (Step2), then circulation to process end node (End), Business Stream Journey terminates;If practical circulation condition meets condition 2, process step 3 (Step3) is executed.
After executing process step 3 (Step3), if practical circulation condition meets condition 3, circulation to process end node (End), operation flow terminates;If practical circulation condition meets condition 4, process step 4 (Step4) is executed, is then circulated extremely Process end node (End), operation flow terminates.
Circulation item between the process inlet node (Entry), process step 1~4 and each step for defining operation flow After the specific execution code of part (i.e. condition 1~4) and each process step, to process Ingress node (Entry), process step 1 Circulation condition (i.e. condition 1~4) between~4 and each step, which is added, to be explained.Wherein, process step 4 (Step4) terminates for process Step, the note to step addition are@End.
Then, sequence is executed according to explain that content constructs the operation flow.Wherein, judging pre-set business flow chart element The class of frame includes acquisition process inlet node (Entry) after process inlet node (Entry) and process end step (Step4), Content@Entry, which is explained, based on it determines that next circulation node, i.e. next circulation node correspond to process step 2 (Step2).So Afterwards, the next/nexts attribute in the note content@Step2 based on process step 2 (Step2), determines next circulation node, It is remaining and so on.When from process step 2 (Step2) circulation to downstream step, in the note for the condition that circulated by step Hold the determination that Route carries out next circulation node, remaining and so on.When a certain process step note content do not contain with When the current corresponding next/nexts attribute of node that circulates (such as next/nexts attribute is null value), by the note of the process step Solving the next/nexts attribute modification in content is process end node (End), so that current circulation node is determined as business The process end node of process.
When entering the process execution stage, system is called to after operation flow Ingress node (Entry), pre-set business process Frame is automatically into execution process.By above by special object note content determine circulation node determination and The dynamic service data obtained in real time dynamically determines next circulation node, and carries out node-flow and turn, until circulation is true to dynamic Fixed process end node (End), and then process end step (i.e. process step 4) is executed, operation flow terminates.
In addition, the present invention also provides a kind of process realization device based on note.As shown in figure 8, described device includes:
Definition module 10, for defining the special object of operation flow;
Specifically, developer carries out the tissue of pre-set business process according to process design content to realize operation flow The definition of special object, such as logic-based relationship carry out the arrangement of each process step, and it is each to can specifically include determination The circulation condition to circulate between the execution content of process step, each step.In the present embodiment, passed through by programming Definition module 10 defines the special object of operation flow.The special object of the pre-set business process specifically includes: operation flow Process inlet node (Entry), the process step (Step) of operation flow, the circulation condition between each process step (Condition) and the execution code of each process step.What needs to be explained here is that the process step of operation flow includes all kinds of Node, such as step A, B can separately include N number of node, M node.
Module 20 is explained, for the spy in pre-set business process framework initialization, to the operation flow for being added to note Determine object to be initialized;
In system starting, preset business process frame is initialized, including initializing all kinds of ginsengs in the frame Number;It is explained at this point, being added to the special object of operation flow.
In various embodiments of the present invention, behaviour that first special object for the operation flow for being added to note is initialized Make, specifically a kind of grammer metadata technique that can be added in programming language (such as Java) source code is explained in addition.It explains It can be added on class, method, the parameter of method and local variable.It is added after explaining in a program, compiler, developing instrument The note content of addition can be obtained by reflection mechanism with other programs, and execute movement relevant to content is explained or mistake Journey.
The note content specifically added refers to above.
Wherein ,@BusinessProcess is for identifying an operation flow, corresponding a certain specific operation flow.It is explained Content includes at least operation flow title and used thread pool (executor).
@Entry is for identifying process inlet, the process inlet node of corresponding a certain specific operation flow.It explains content Including at least the title of process inlet node, next attribute (for specifying the next node of Entry) and the default that mistake occurs Exit criteria.
@Step is for identifying process step, the related content of corresponding each process step.It includes process step that it, which explains content, Title, next/nexts attribute (for specifying next circulation node of present node) and current process step execute front and back Call-by mechanism etc..
@End is for identifying process end step.
For@Route for identifying flow chart branches routing, explaining content includes the item that different process steps circulates Part.
Sequential build module 30 is executed, for executing sequence according to explain that content constructs the operation flow.
In a specific implementation, as shown in figure 9, the execution sequential build module 30 specifically includes:
Traversal Unit 310 for traversing the class in the business process frame, and obtains the method for having added the class of note Set;
If there are any form of note contents in certain one kind, it can be considered as to exist on such and explain content.Judging When in class with the presence or absence of content is explained, the identifier that whether there is "@" in class can be searched.Exist when detecting in current class Content is explained, then each method of current class wrapper is extracted into (or label), and then get the method set of current class.
Content is explained if being not detected and existing on such, skips such, and continues to execute judgement to next class, up to Complete the judgement of all classes.
Extraction unit 320 for traversing the method set of the class, and is extracted containing the method for explaining content;
By traversing the method set in current class, whether judge in a certain method containing note content;If so, extracting This method, and so on.
Preferably, extraction unit 320 directly executes after extracting containing the method for explaining content " based on extracted Whether method detects the class simultaneously containing process inlet node and process termination condition, if process is contained when described similar and is entered Mouthful node and process termination condition, then according to the note content of the process inlet node and the note content of each process step, Determine the circulation sequence of each process step node of the operation flow ".
Further, it in order to improve the flexibility that the process based on note is realized, extracts in extraction unit 320 containing note After the method for content, extraction unit 320 is also used to cache containing the method for explaining content into key assignments container map.Here Alleged " key assignments container map " can be considered as the key assignments container in data structure, be a kind of key-value pair of key-value (key assignments), In the concrete realization, by taking Java as an example, there is the map interface of Map interface, hashmap, treemap, hashtable succession.? In Linux, there is mmap () function, substitutes read using mmap, it is possible to reduce CPU copies number, while system context being cut It changes number to be reduced to 2 times, thus Promoting Layered Buffer and reading speed performance by a relatively large margin.
Detection unit 330, for being based on extracted method, detect the class whether simultaneously containing process inlet node and Process termination condition;
Process inlet node and process termination condition respectively correspond the beginning of operation flow and terminate mechanism, in necessity Hold.Specifically, the note content whether caching contains@Entry above and@End into the method for key assignments container map is searched, really Recognize whether the class contains process inlet node and process termination condition wherein simultaneously, process termination condition, which corresponds to process, to be terminated to walk Suddenly.If containing the note content of@Entry above and@End in extracted method simultaneously, stream is contained when determining described similar Journey Ingress node and process termination condition.Otherwise, it is determined that the class does not contain process inlet node and process termination condition simultaneously, Outputting alarm at this time, to remind programming personnel to supply the project of gaps and omissions, to guarantee the subsequent normal execution of operation flow.
Circulate determination unit 340, if for it is described similar when contain process inlet node and process termination condition, basis The note content of the process inlet node and the note content of each process step, determine each process step of the operation flow The circulation sequence of node.
In a specific implementation, circulation determination unit 340 is used for: a1. obtains process inlet node from key assignments container map (Entry), to check whether the process inlet node contains circulation condition annotations attribute;
If a2. the process inlet node contains circulation condition annotations attribute, according to the circulation condition annotations attribute It determines corresponding next circulation node, and checks whether next circulation node contains circulation condition annotations attribute;
If a3. next circulation node contains circulation condition annotations attribute, continue the determination of circulation node, and Repeat circulation condition circulation attribute checking step, until determine the last one circulation node, and by the last one circulate node It is set as the process end node;
If a4. next circulation node is arranged without containing circulation condition annotations attribute for next circulation node For the process end node.
The note content Entry of process Ingress node is read out, and whether detect wherein includes next attribute. If it is not, then directly setting process end node (End) for next node.If so, the next section that will be specified in next attribute Point is determined as " next circulation node ".Further, to the note of the process step where fixed " next circulation node " Content@Step is read out, and whether detect wherein includes next/nexts attribute.If it is not, then " next circulation saves by described in Point " is set as process end node (End).If so, continuing the determination of circulation node, until determining the last one stream Trochanterion, and then process end node (End) is set by the last one circulation node.It should be noted that different step it Between conditionity circulation also need according in@Route note circulation condition realize.
In the present apparatus, the special object of operation flow is defined by definition module 10, and in pre-set business flow chart element Module 20 is explained when frame initializes, note is added to the special object of operation flow, and by execution sequential build module 30 according to note What solution content constructed the operation flow executes sequence.In this way, avoiding the frame big using excessively complicated and integrated difficulty, help In the lightweight for realizing business process frame;It is explained simultaneously using the definition of the special object to operation flow and addition, building Operation flow executes sequence out, and the process that circulates according to condition is supported in the detailed process implementation procedure of operation flow, makes It obtains code to be consistent with operation flow, facilitates code maintenance;It is small to code intrusion it is not necessary that operation system code is largely transformed, Slightly transformation can be used on existing code, namely have the characteristics that use simple and flexibility ratio high.
Further, as shown in Figure 10, on the basis of process realization device of the aforementioned present invention based on note, the dress Setting further includes circulation control module 40.
The circulation control module 40, for when detecting the execution signal of pre-set business process frame, according to described The execution sequence of special object and the operation flow carries out the circulation control of the operation flow;
Wherein, the mode that the parameter between each process step of the operation flow passes through context carries out.
After completing process building described above, after system is called to operation flow Ingress node (Entry), in advance If business process frame is automatically into execution process.At this point, the execution signal of triggering pre-set business process frame.Based on defined Each special object and according to explain content building execute sequence, after getting the business datum of continuous renewal, dynamically It determines next circulation node, and carries out node-flow and turn, to realize the circulation control of operation flow.
In addition, the present invention also provides a kind of, the process based on note realizes equipment, and the process realization based on note is set It is standby to include: memory, processor and be stored in the stream based on note that run on the memory and on the processor Cheng Shixian program, the process based on note, which is realized, realizes as above described in any item bases when program is executed by the processor In the process implementation method of note the step of.
The embodiment of the present invention realizes that equipment can be PC machine or server based on the workflow of note.
The equipment may include: processor, such as CPU, network interface, user interface, memory, communication bus.Wherein, Communication bus is for realizing the connection communication between these components.User interface may include display screen (Display), input list First such as keyboard (Keyboard), optional user interface can also include standard wireline interface and wireless interface.Network interface can Choosing may include standard wireline interface and wireless interface (such as WI-FI interface).Memory can be high speed RAM memory, It can be stable memory (non-volatile memory), such as magnetic disk storage.Memory optionally can also be only Stand on the storage device of aforementioned processor.
It may include operating system, network communication module, Yong Hujie in a kind of memory as computer storage medium Mouth mold block and workflow based on note realize program.
Network interface is mainly used for connecting background server, carries out data communication with background server;User interface is main For connecting client (user terminal), data communication is carried out with client;And processor can be used for calling in memory and store Workflow based on note realize program, and execute the behaviour in following workflow implementation method embodiments based on note Make.
Based on above-mentioned hardware configuration, propose that the present invention is based on the workflow implementation method embodiments of note.
In addition, the present invention also provides a kind of read/write memory mediums.
It is stored with the workflow based on note on the readable storage medium storing program for executing and realizes program, the process based on note The step of as above described in any item process implementation methods based on note are realized when program is executed by processor, is realized in circulation.
The specific embodiment of readable storage medium storing program for executing of the present invention and each embodiment base of the above-mentioned process implementation method based on note This is identical, and therefore not to repeat here.
It should be noted that, in this document, the terms "include", "comprise" or its any other variant are intended to non-row His property includes, so that the process, method, article or the device that include a series of elements not only include those elements, and And further include other elements that are not explicitly listed, or further include for this process, method, article or device institute it is intrinsic Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including being somebody's turn to do There is also other identical elements in the process, method of element, article or device.
The serial number of the above embodiments of the invention is only for description, does not represent the advantages or disadvantages of the embodiments.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side Method can be realized by means of software and necessary general hardware platform, naturally it is also possible to by hardware, but in many cases The former is more preferably embodiment.Based on this understanding, technical solution of the present invention substantially in other words does the prior art The part contributed out can be embodied in the form of software products, which is stored in a storage medium In (such as ROM/RAM, magnetic disk, CD), including some instructions are used so that a terminal (can be mobile phone, computer, service Device or the network equipment etc.) execute method described in each embodiment of the present invention.
The embodiment of the present invention is described with above attached drawing, but the invention is not limited to above-mentioned specific Embodiment, the above mentioned embodiment is only schematical, rather than restrictive, those skilled in the art Under the inspiration of the present invention, without breaking away from the scope protected by the purposes and claims of the present invention, it can also make very much Form, all of these belong to the protection of the present invention.

Claims (12)

1. a kind of process implementation method based on note, which is characterized in that the described method includes:
Define the special object of operation flow;
In pre-set business process framework initialization, the special object for the operation flow for being added to note is initialized;
Sequence is executed according to explain that content constructs the operation flow.
2. the process implementation method based on note as described in claim 1, which is characterized in that the operation flow it is specific right As including: the process inlet node of the operation flow, the process step of the operation flow, the circulation between each process step The execution code of condition and each process step.
3. the process implementation method based on note as claimed in claim 2, which is characterized in that described according to note content building It the step of execution sequence of the operation flow, specifically includes:
The class in the business process frame is traversed, and obtains the method set for having added the class of note;
The method set of the class is traversed, and is extracted containing the method for explaining content;
Based on extracted method, detect whether the class contains process inlet node and process termination condition simultaneously;
Contain process inlet node and process termination condition when if described similar, according in the note of the process inlet node The note content of appearance and each process step determines the circulation sequence of each process step node of the operation flow.
4. the process implementation method based on note as claimed in claim 3, which is characterized in that described to extract containing note content Method the step of after, further includes: extracted method is cached into key assignments container map;
It is described according to the note content of the process inlet node and the note content of each process step, determine the operation flow Each process step node circulation sequence the step of, specifically include:
Process inlet node is obtained, from key assignments container map to check whether the process inlet node contains circulation condition note Solve attribute;
If the process inlet node contains circulation condition annotations attribute, is determined and corresponded to according to the circulation condition annotations attribute Next circulation node, and check next circulation node whether contain circulation condition annotations attribute;
If next circulation node contains circulation condition annotations attribute, continue the determination of circulation node, and repetitive stream Turn the checking step of condition circulation attribute, until determining the last one circulation node, and sets the last one circulation node to The process end node;
If next circulation node sets the stream for next circulation node without containing circulation condition annotations attribute Journey end node.
5. the process implementation method based on note as described in claim 1, which is characterized in that described according to note content building After the step of execution sequence of the operation flow, further include;
When detecting the execution signal of pre-set business process frame, according to the execution of the special object and the operation flow Sequence carries out the circulation control of the operation flow;
Wherein, the mode that the parameter between each process step of the operation flow passes through context carries out.
6. a kind of process realization device based on note, which is characterized in that described device includes:
Definition module, for defining the special object of operation flow;
Module is explained, for the special object in pre-set business process framework initialization, to the operation flow for being added to note It is initialized;
Sequential build module is executed, for executing sequence according to explain that content constructs the operation flow.
7. the process realization device based on note as claimed in claim 6, which is characterized in that the operation flow it is specific right As including: the process inlet node of the operation flow, the process step of the operation flow, the circulation between each process step The execution code of condition and each process step.
8. the process realization device based on note as claimed in claim 7, which is characterized in that the execution sequential build module It specifically includes:
Traversal Unit for traversing the class in the business process frame, and obtains the method set for having added the class of note;
Extraction unit for traversing the method set of the class, and is extracted containing the method for explaining content;
Detection unit detects whether the class contains process inlet node and process knot simultaneously for being based on extracted method Beam condition;
Circulate determination unit, if for it is described similar when contain process inlet node and process termination condition, according to the stream The note content of journey Ingress node and the note content of each process step determine each process step node of the operation flow Circulation sequence.
9. the process realization device based on note as claimed in claim 8, which is characterized in that the extraction unit is also used to Extracted method is cached into key assignments container map;
Circulate determination unit, is specifically used for obtaining process inlet node from key assignments container map, to check the process inlet section Whether point contains circulation condition annotations attribute;If the process inlet node contains circulation condition annotations attribute, according to Circulation condition annotations attribute determines corresponding next circulation node, and checks whether next circulation node contains circulation condition COMMENTS attribute;If next circulation node contains circulation condition annotations attribute, continues the determination of circulation node, lay equal stress on Resurgent turns the checking step of condition circulation attribute, until determining the last one circulation node, and the last one circulation node is set It is set to the process end node;If next circulation node is without containing circulation condition annotations attribute, by the lower one stream Trochanterion is set as the process end node.
10. the process realization device based on note as claimed in claim 6, which is characterized in that described device further includes circulation Control module;
The circulation control module, for when detecting the execution signal of pre-set business process frame, according to described specific right As and the operation flow execution sequence carry out the operation flow circulation control;
Wherein, the mode that the parameter between each process step of the operation flow passes through context carries out.
11. a kind of process based on note realizes equipment, which is characterized in that the process based on note realizes that equipment includes: Memory, processor and the process realization journey based on note that is stored on the memory and can run on the processor Sequence, the process based on note are realized and are realized as described in any one of claims 1 to 5 when program is executed by the processor The process implementation method based on note the step of.
12. a kind of readable storage medium storing program for executing, which is characterized in that be stored with the workflow based on note on the readable storage medium storing program for executing Realize program, the workflow based on note, which is realized, to be realized when program is executed by processor as any in claim 1-5 The step of process implementation method based on note.
CN201811526367.1A 2018-12-13 2018-12-13 Method, device and equipment for realizing flow based on annotation and readable storage medium Active CN109634569B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811526367.1A CN109634569B (en) 2018-12-13 2018-12-13 Method, device and equipment for realizing flow based on annotation and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811526367.1A CN109634569B (en) 2018-12-13 2018-12-13 Method, device and equipment for realizing flow based on annotation and readable storage medium

Publications (2)

Publication Number Publication Date
CN109634569A true CN109634569A (en) 2019-04-16
CN109634569B CN109634569B (en) 2022-01-25

Family

ID=66073644

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811526367.1A Active CN109634569B (en) 2018-12-13 2018-12-13 Method, device and equipment for realizing flow based on annotation and readable storage medium

Country Status (1)

Country Link
CN (1) CN109634569B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110650211A (en) * 2019-10-15 2020-01-03 河北幸福消费金融股份有限公司 Agent technology-based process control method, system, device and storage medium
CN110908644A (en) * 2019-10-16 2020-03-24 浙江大搜车软件技术有限公司 Configuration method and device of state node, computer equipment and storage medium
CN113326026A (en) * 2021-05-11 2021-08-31 福建天泉教育科技有限公司 Method and terminal for generating micro-service business process interface
CN114647416A (en) * 2022-03-28 2022-06-21 杭州博盾习言科技有限公司 Method and device for realizing service flow based on annotation, storage medium and electronic equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070226038A1 (en) * 2005-05-05 2007-09-27 Manoj Das Modeling of business process data
CN106059796A (en) * 2016-05-17 2016-10-26 中国建设银行股份有限公司 Business extension system and method
CN107704386A (en) * 2017-09-25 2018-02-16 金蝶软件(中国)有限公司 Unit test method, device, computer equipment and the storage medium of operation flow
CN108053144A (en) * 2017-12-29 2018-05-18 厦门市美亚柏科信息股份有限公司 Open operation flow implementation method and workflow engine
CN108363566A (en) * 2018-01-30 2018-08-03 中国平安人寿保险股份有限公司 File configuration method, intelligent terminal and storage medium in a kind of project development process

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070226038A1 (en) * 2005-05-05 2007-09-27 Manoj Das Modeling of business process data
CN106059796A (en) * 2016-05-17 2016-10-26 中国建设银行股份有限公司 Business extension system and method
CN107704386A (en) * 2017-09-25 2018-02-16 金蝶软件(中国)有限公司 Unit test method, device, computer equipment and the storage medium of operation flow
CN108053144A (en) * 2017-12-29 2018-05-18 厦门市美亚柏科信息股份有限公司 Open operation flow implementation method and workflow engine
CN108363566A (en) * 2018-01-30 2018-08-03 中国平安人寿保险股份有限公司 File configuration method, intelligent terminal and storage medium in a kind of project development process

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110650211A (en) * 2019-10-15 2020-01-03 河北幸福消费金融股份有限公司 Agent technology-based process control method, system, device and storage medium
CN110650211B (en) * 2019-10-15 2022-04-01 河北幸福消费金融股份有限公司 Agent technology-based process control method, system, device and storage medium
CN110908644A (en) * 2019-10-16 2020-03-24 浙江大搜车软件技术有限公司 Configuration method and device of state node, computer equipment and storage medium
CN110908644B (en) * 2019-10-16 2023-12-12 浙江大搜车软件技术有限公司 Configuration method and device of state node, computer equipment and storage medium
CN113326026A (en) * 2021-05-11 2021-08-31 福建天泉教育科技有限公司 Method and terminal for generating micro-service business process interface
CN113326026B (en) * 2021-05-11 2023-09-08 福建天泉教育科技有限公司 Method and terminal for generating micro-service business process interface
CN114647416A (en) * 2022-03-28 2022-06-21 杭州博盾习言科技有限公司 Method and device for realizing service flow based on annotation, storage medium and electronic equipment

Also Published As

Publication number Publication date
CN109634569B (en) 2022-01-25

Similar Documents

Publication Publication Date Title
US10901709B2 (en) Partitioning based migration of systems to container and microservice based platforms
CA3008844C (en) Automatic generation of microservices based on technical description of legacy code
TWI729472B (en) Method, device and server for determining feature words
CN109634569A (en) Process implementation method, device, equipment and readable storage medium storing program for executing based on note
CN112262390A (en) Regular expression generation based on positive and negative pattern matching examples
US8370808B2 (en) Apparatus and a method for generating a test case
CN105683924B (en) For debugging the method and system of native code
CN111858371A (en) Software testing method, system, storage medium and computer equipment
CN110287097A (en) Batch testing method, device and computer readable storage medium
US20120266131A1 (en) Automatic program generation device, method, and computer program
CN105556569A (en) Animation editing
CN109298882A (en) Management method, computer readable storage medium and the terminal device of interface
WO2002103517A1 (en) Synthesis of verification languages
CN105446952B (en) For handling the method and system of semantic segment
US20180232299A1 (en) Composing future tests
CN105094941B (en) It is a kind of to realize multilingual method and device
CN109491884A (en) Code method for testing performance, device, computer equipment and medium
CN114185874A (en) Big data based modeling method and device, development framework and equipment
WO2022140650A2 (en) Systems and methods for building and deploying machine learning applications
US11119899B2 (en) Determining potential test actions
WO2014142876A1 (en) Kernel functionality checker
EP1646940A2 (en) Designing computer programs
US9189249B2 (en) Method for automatically defining icons
CN109299004A (en) Key element difference analysis method and system
Yuan et al. Automatic enhanced CDFG generation based on runtime instrumentation

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant