CN106971293A - A kind of business event based on activiti and flow separation method and system - Google Patents

A kind of business event based on activiti and flow separation method and system Download PDF

Info

Publication number
CN106971293A
CN106971293A CN201710178569.0A CN201710178569A CN106971293A CN 106971293 A CN106971293 A CN 106971293A CN 201710178569 A CN201710178569 A CN 201710178569A CN 106971293 A CN106971293 A CN 106971293A
Authority
CN
China
Prior art keywords
flow
data
activiti
business
module
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201710178569.0A
Other languages
Chinese (zh)
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.)
Guangdong Eshore Technology Co Ltd
Original Assignee
Guangdong Eshore 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 Guangdong Eshore Technology Co Ltd filed Critical Guangdong Eshore Technology Co Ltd
Priority to CN201710178569.0A priority Critical patent/CN106971293A/en
Publication of CN106971293A publication Critical patent/CN106971293A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q10/00Administration; Management
    • G06Q10/10Office automation; Time management
    • G06Q10/103Workflow collaboration or project management

Abstract

The invention discloses a kind of business event based on activiti and flow separation method, this method includes:By activiti running node data structureds, and it is configured in database to generate different lists;The XML data of operation flow is parsed, and the configuration data parsed is write in the list of above-mentioned steps generation.Compared with prior art, the structuring of the invention in database by running node data, specific list is constituted by the data for reading structuring, and will be written to after the XML data parsing of operation flow in the list of above-mentioned generation, business processing can be achieved to separate with flow, the flow line for making business depart from the self-defined XML of parsing activiti in processing procedure, business per treatment is avoided all to parse XML data, to solve the problems, such as the data corruption because of caused by parsing XML, also can avoid because flow cause business transaction processing failure extremely the problem of, and by change configuration data can implementation process renewal.Meanwhile, disclose a kind of business event based on activiti and flow piece-rate system.

Description

A kind of business event based on activiti and flow separation method and system
Technical field
The present invention relates to workflow technology, relate more specifically to a kind of business event based on activiti and separated with flow Method and system.
Background technology
Activiti is the Java workflow Open-Source Tools for issuing first version in May, 2010 by TomBaeyens, and its is main It is directed to the management to flow, the task torsional flow with certain function that workflow is made up of some active tasks, therefore its It is named as Activity plural Activities abbreviations and obtains.Applicable business mainly includes:The systems such as OA, CRM, ERP.
At present, activiti flow instance is generated simultaneously with business work order, i.e. list submit the total amount evidence, is generated simultaneously Flow instance.Activiti flow parsing and business are bound together with flow so that the degree of coupling of business and flow It is too high, then the XML data of whole flow process need to be parsed during process of analysis task node, this will cause parsing slow, and easily error. The degree of coupling of business and flow is too high may also to be there are data and updates not in time, because flow and work order are handled in same affairs, Flow will cause work order to submit unsuccessful problem extremely, and in the case where network delay or request amount are larger, due to Work order business and flow there are not separation, the response time can be caused to increase, and processing time-out failure easily occur, this turns into work order business Handle bottleneck.And with the increase of work order portfolio, the problem of activiti engine is integrated with work order business integration is more next It is more, it even can cause large batch of work order abnormal data in peak period sometimes, all be brought to system and operation very big Puzzlement.
In consideration of it, being necessary to provide a kind of business event based on activiti for realizing that business separates with flow and flow Separation method and system are to solve drawbacks described above.
The content of the invention
The technical problems to be solved by the invention be to provide it is a kind of realize that business separates with flow based on activiti's Business event and flow separation method are to solve drawbacks described above.
Another technical problem to be solved by this invention be to provide it is a kind of realize that business separates with flow based on Activiti business event is with flow piece-rate system to solve drawbacks described above.
In order to solve the above technical problems, there is provided a kind of business thing based on activiti according to an aspect of the present invention Part and flow separation method, this method include:
S101, by activiti running node data structureds, and be configured in database to generate different lists;
S102, the XML data for parsing operation flow, and the configuration data parsed is write into the list that above-mentioned steps are generated In.
Its further technical scheme is:The business event based on activiti also includes with flow separation method:
After S103, input work order business datum according to the business event reading and saving of submission being parsed in database Configuration data;
S104, the configuration data read is inserted into flow instruction task list;
S105, flow timer read flow instruction task list data, when reading the data newly inserted, call flow Engine execute instruction, and product process data.
Its further technical scheme is:The step S105 also includes:If flow during call flow engine execute instruction There is exception, then re-execute flow instruction.
In order to solve the above technical problems, there is provided a kind of business based on activiti according to another aspect of the present invention Event and flow piece-rate system, the system include:One data structured module and data parsing writing module.Wherein, institute Data structured module is stated, for by activiti running node data structureds, and is configured in database to generate difference List;The data parse writing module, the XML data for parsing operation flow, and the configuration data parsed is write In the list for entering the data structured module generation.
Its further technical scheme is:The business event based on activiti also includes with flow piece-rate system:One Data read module, a Data insertion module and a flow executing modules.Wherein, the data read module, for inputting After work order business datum according to the business event reading and saving of submission matching somebody with somebody in the list that the data structured module is generated Put data;The Data insertion module, for the configuration data read to be inserted into flow instruction task list;The flow Performing module, for when flow timer reads the data newly inserted in flow instruction task list, call flow engine to be held Row instruction, and product process data.
Its further technical scheme is:The flow executing modules are additionally operable to:If being flowed during call flow engine execute instruction There is exception in journey, then re-executes flow instruction.
Compared with prior art, the structuring of the invention in database by flow operations node data, by reading structure The data of change constitute specific list, and will be written to after the XML data parsing of operation flow in the list of above-mentioned generation, can be real Existing business processing is separated with flow so that business can directly read the configuration number called in database list in processing procedure According to, depart from parsing activiti self-defined XML flow line, it is to avoid business per treatment all parses XML data, with solve because Parse XML caused by data corruption problem, can also avoid because flow cause business transaction processing failure extremely the problem of, and stream The renewal and issue of journey become simpler, by change configuration data in database can implementation process renewal.
By following description and with reference to accompanying drawing, the present invention will become more fully apparent, and these accompanying drawings are used to explain the present invention Embodiment.
Brief description of the drawings
Fig. 1 is business event of the present invention based on activiti and the flow chart of the embodiment of flow separation method one.
Fig. 2 is the structured flowchart that business event of the present invention based on activiti unifies embodiment with flow segregative line.
Embodiment
To make one of ordinary skill in the art be more clearly understood from the object, technical solutions and advantages of the present invention, with Under the present invention is further elaborated in conjunction with the accompanying drawings and embodiments.
Fig. 1 illustrates the business event based on activiti of the present invention and the flow of the embodiment of flow separation method one Figure.As shown in figure 1, this method includes:
S101, by activiti running node data structureds, and be configured in database to generate different lists.
In the step, to running node data structured, it is configured in database, can group by the data for reading structuring Into specific list, the data according to configuration when list is loaded can show different form templats.
S102, the XML data for parsing operation flow, and the configuration data parsed is write into the list that above-mentioned steps are generated In.
During existing workflow processing mode process of analysis task node, it is necessary to parse the XML data of whole flow process, with Obtain the configuration data of node flow direction.And in the step, XML data is first parsed, and by the configuration data parsed according to difference Node write-in above-mentioned steps generation different lists in, directly read and call in the database list when performing flow instruction Configuration data, be not required to parse XML data again again, it is to avoid business per treatment all parses XML data, with solve because solution Analyse data corruption problem caused by XML.
After S103, input work order business datum according to the business event reading and saving of submission being parsed in database Configuration data.
In the step, when user list input corresponding work order business datum after trigger flow instruct, you can according to The business event (such as submitting work order, examination & approval work order, revocation work order) that family is submitted is solved come the XML data read according to flow The configuration data being stored in the corresponding list of database separated out.
S104, the configuration data read is inserted into flow instruction task list.
S105, flow timer read flow instruction task list data, when reading the data newly inserted, call flow Engine execute instruction, and product process data.
In the step, the data in flow instruction task list are read in the timing of flow timer, when reading new data Just start call flow engine and perform flow instruction (flow execution route), and product process data, by the industry after being finished Business event is removed in historical record.
If user needs to send short message and notified after flow is finished in this method, flow engine is by the business thing Part removes to after historical record the plug-in event of short message that can also carry out configuration.
Above-mentioned steps S105 also includes:If exception occurs in flow during call flow engine execute instruction, this is re-executed Flow is instructed.Flow engine can re-execute the instruction of this flow when flow occurs abnormal in this method, and work order, which is submitted, not to be flowed Journey influences, and realizes that business processing is separated with flow.
Understandably, the present embodiment carries out the binding mode of flow parsing traditional activiti and business and flow Change, make it that the degree of coupling of business and flow is extremely low by reseting meter, i.e., by by activiti running node data structureds, The data for reading structuring constitute specific list, and first parse the XML data of operation flow, and the configuration number after parsing According to being written in the list of above-mentioned generation, to realize that business processing is separated with flow.Afterwards, if there is the input of work order business datum to carry During friendship, the configuration data parsed according to XML that can be according to the business event reading and saving of submission in database, and by institute The configuration data of reading is inserted into flow tasks table, and now flow is not performed synchronously with business event, in the present embodiment Task list is instructed by flow timer scanning process to determine the need for performing flow, when scanning to flow instructs task list In when having the data newly inserted, ability call flow engine, the route for making flow engine be configured according to flow performs corresponding flow Instruction.In this course of work, work order business is merely responsible for forms traffic when user handles work order, and flow is scanned by timer Task list performs corresponding instruction so that business and flow can be handled with asynchronous, and can be with for flow abnormal conditions Rollback issued transaction is carried out, that is, re-executes the instruction of this flow, has no effect on the submission of work order business.And it is because all The configuration data of node flow direction is all structured, so can be performed by the execution record sheet for inquiring about database to flow Cheng Jinhang is monitored in real time.
Fig. 2 illustrates the business event based on activiti of the present invention and the structure of the embodiment of flow piece-rate system 11 1 Block diagram.As shown in Fig. 2 the system 11 includes:One data structured module 110, data parsing writing module 111, a data Read module 112, a Data insertion module 113 and a flow executing modules 114.
Wherein, the data structured module 110 is used for activiti running node data structureds, and is configured to number According in storehouse to generate different lists;In the present embodiment, specific list can be constituted by the data for reading structuring, in list Different form templats can be shown when loading according to the data of configuration.The data parsing writing module 111 is used to parse The XML data of operation flow, and the configuration data parsed is write in the list that the data structured module 110 is generated; The configuration data in the list for calling the data structured module 110 to generate is directly read when performing flow instruction, no Need to parse XML data again again, business per treatment can be avoided all to parse XML data, to solve the number because of caused by parsing XML According to chaotic problem.The data read module 112, which is used to input to be read according to the business event of submission after work order business datum, to be protected There is the configuration data in the list that the data structured module 110 is generated;When user is in the corresponding work order industry of list input Trigger flow is instructed after data of being engaged in, you can the business event submitted according to user (for example submits work order, examination & approval work order, revocation work It is single etc.) it is stored in the respective table that the data structured module 110 is generated come what the XML data that reads according to flow was parsed Configuration data in list.The configuration data that the Data insertion module 113 is used to read the data read module 112 is inserted Into flow instruction task list.The flow executing modules 114 are used for when flow timer is read in flow instruction task list During the data newly inserted, call flow engine execute instruction, and product process data;In the present embodiment, the timing of flow timer Read the business event after the data in flow instruction task list, and call flow engine execute instruction, product process data Remove in historical record, if user needs to send short message and notified after flow is finished, flow engine is by the business Event removes to after historical record the plug-in event of short message that can also carry out configuration.
In some embodiments, such as the present embodiment, the flow executing modules 114 are additionally operable to:If call flow engine There is exception in flow during execute instruction, then re-executes flow instruction.In the present embodiment, flow engine when flow occurs abnormal The instruction of this flow can be re-executed, work order is submitted not to be influenceed by flow, realizes that business processing is separated with flow.
In summary, the structuring of the invention in database by flow operations node data, by the number for reading structuring It according to the specific list of composition, and will be written to after the XML data parsing of operation flow in the list of above-mentioned generation, business can be achieved Processing is separated with flow so that business can directly read the configuration data called in database list in processing procedure, is departed from The self-defined XML of activiti flow line is parsed, it is to avoid business per treatment all parses XML data, to solve because of parsing XML Caused by data corruption problem, can also avoid because flow cause business transaction processing failure extremely the problem of, and flow is more New and issue becomes simpler, by change configuration data in database can implementation process renewal.
The preferred embodiments of the present invention are the foregoing is only, rather than any formal limitation is done to the present invention.This area Technical staff various equivalent changes and improvement, all institutes within the scope of the claims can be imposed on the basis of above-described embodiment The equivalent variations done or modification, all should fall under the scope of the present invention.

Claims (6)

1. a kind of business event based on activiti and flow separation method, it is characterised in that described based on activiti's Business event includes with flow separation method:
S101, by activiti running node data structureds, and be configured in database to generate different lists;
S102, the XML data for parsing operation flow, and the configuration data parsed is write in the list of above-mentioned steps generation.
2. the business event as claimed in claim 1 based on activiti and flow separation method, it is characterised in that described point Also include from method:
The configuration parsed after S103, input work order business datum according to the business event reading and saving of submission in database Data;
S104, the configuration data read is inserted into flow instruction task list;
S105, flow timer read flow instruction task list data, when reading the data newly inserted, call flow engine Execute instruction, and product process data.
3. the business event as claimed in claim 2 based on activiti and flow separation method, it is characterised in that the step Rapid S105 also includes:If exception occurs in flow during call flow engine execute instruction, flow instruction is re-executed.
4. a kind of business event based on activiti and flow piece-rate system, it is characterised in that the system includes:One data knot Structure module and data parsing writing module;Wherein,
The data structured module, for by activiti running node data structureds, and is configured in database with life Into different lists;
The data parse writing module, the XML data for parsing operation flow, and the configuration data parsed is write into institute In the list for stating the generation of data structured module.
5. the business event as claimed in claim 4 based on activiti and flow piece-rate system, it is characterised in that described point Also include from system:One data read module, a Data insertion module and a flow executing modules;Wherein,
The data read module, for inputting after work order business datum according to the business event reading and saving of submission in the number Configuration data in the list generated according to structurized module;
The Data insertion module, for the configuration data read to be inserted into flow instruction task list;
The flow executing modules, for when flow timer reads the data newly inserted in flow instruction task list, adjusting Use flow engine execute instruction, and product process data.
6. the business event as claimed in claim 5 based on activiti and flow piece-rate system, it is characterised in that the stream Journey performing module is additionally operable to:If exception occurs in flow during call flow engine execute instruction, flow instruction is re-executed.
CN201710178569.0A 2017-03-23 2017-03-23 A kind of business event based on activiti and flow separation method and system Pending CN106971293A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710178569.0A CN106971293A (en) 2017-03-23 2017-03-23 A kind of business event based on activiti and flow separation method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710178569.0A CN106971293A (en) 2017-03-23 2017-03-23 A kind of business event based on activiti and flow separation method and system

Publications (1)

Publication Number Publication Date
CN106971293A true CN106971293A (en) 2017-07-21

Family

ID=59329868

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710178569.0A Pending CN106971293A (en) 2017-03-23 2017-03-23 A kind of business event based on activiti and flow separation method and system

Country Status (1)

Country Link
CN (1) CN106971293A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109472442A (en) * 2018-09-27 2019-03-15 深圳供电局有限公司 A kind of automated programming system and method for work order
CN109615323A (en) * 2018-12-04 2019-04-12 厦门市美亚柏科信息股份有限公司 A kind of separation method and system of Activiti process and business
CN113535684A (en) * 2021-07-26 2021-10-22 北京计算机技术及应用研究所 Activiti-based autonomous command control method

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1983313A (en) * 2006-04-07 2007-06-20 华为技术有限公司 Workflow data processor and processing method
CN101840335A (en) * 2010-04-16 2010-09-22 广州白云国际机场股份有限公司 J2EE web application system capable of configuring service module
CN103455325A (en) * 2013-07-24 2013-12-18 北京起步科技有限公司 Business-model-based architecture platform
CN104850665A (en) * 2015-06-12 2015-08-19 江苏中威科技软件系统有限公司 Method and system for realizing flow circulation based on flow embedding
CN104978622A (en) * 2014-04-11 2015-10-14 携程计算机技术(上海)有限公司 Business process management system and method
CN105046408A (en) * 2015-06-25 2015-11-11 国网山东省电力公司 Configurable workflow realization method and system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1983313A (en) * 2006-04-07 2007-06-20 华为技术有限公司 Workflow data processor and processing method
CN101840335A (en) * 2010-04-16 2010-09-22 广州白云国际机场股份有限公司 J2EE web application system capable of configuring service module
CN103455325A (en) * 2013-07-24 2013-12-18 北京起步科技有限公司 Business-model-based architecture platform
CN104978622A (en) * 2014-04-11 2015-10-14 携程计算机技术(上海)有限公司 Business process management system and method
CN104850665A (en) * 2015-06-12 2015-08-19 江苏中威科技软件系统有限公司 Method and system for realizing flow circulation based on flow embedding
CN105046408A (en) * 2015-06-25 2015-11-11 国网山东省电力公司 Configurable workflow realization method and system

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109472442A (en) * 2018-09-27 2019-03-15 深圳供电局有限公司 A kind of automated programming system and method for work order
CN109472442B (en) * 2018-09-27 2022-03-04 深圳供电局有限公司 Automatic processing system and method for work order
CN109615323A (en) * 2018-12-04 2019-04-12 厦门市美亚柏科信息股份有限公司 A kind of separation method and system of Activiti process and business
CN113535684A (en) * 2021-07-26 2021-10-22 北京计算机技术及应用研究所 Activiti-based autonomous command control method
CN113535684B (en) * 2021-07-26 2024-02-27 北京计算机技术及应用研究所 Autonomous command control method based on Activiti

Similar Documents

Publication Publication Date Title
US8938421B2 (en) Method and a system for synchronizing data
CN104021043B (en) The interruption re-access method and system of batch application program
CN102929585B (en) A kind of batch processing method and system supporting the distributed data processing of many main frames
US8020044B2 (en) Distributed batch runner
CN111400011B (en) Real-time task scheduling method, system, equipment and readable storage medium
CN102637214A (en) Method and system for synchronizing general data among database services
CN106971293A (en) A kind of business event based on activiti and flow separation method and system
US8538793B2 (en) System and method for managing real-time batch workflows
CN110727539A (en) Method and system for processing exception in batch processing task and electronic equipment
WO2010031302A1 (en) Method and system for clearing log files of service system
CN109298962A (en) Monitoring method, computer readable storage medium and the terminal device of timed task
CN111125106B (en) Batch running task execution method, device, server and storage medium
CN109445800A (en) A kind of version automatic deployment method and system based on distributed system
CN113094362A (en) Method and device for reliably delivering and processing asynchronous message
CN116467085A (en) Task processing method, system, electronic device and storage medium
WO2022253165A1 (en) Scheduling method, system, server and computer readable storage medium
CN110765148B (en) Service data processing method and device
CN115185787A (en) Method and device for processing transaction log
CN111741080B (en) Network file distribution method and device
CN108460078B (en) Auxiliary function execution method and device, storage medium and terminal
CN111488335A (en) Rule-based data automatic restoration method and system
US20180341521A1 (en) Managing job schedules
CN115640102B (en) Distributed task based re-executable computing method, system and medium
CN115878593A (en) Method for realizing universal compatibility data type frame
CN116303361A (en) Service data migration method, device and system

Legal Events

Date Code Title Description
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20170721