CN112445629A - Lightweight low-coupling working state change collecting and notifying method - Google Patents

Lightweight low-coupling working state change collecting and notifying method Download PDF

Info

Publication number
CN112445629A
CN112445629A CN201910837872.6A CN201910837872A CN112445629A CN 112445629 A CN112445629 A CN 112445629A CN 201910837872 A CN201910837872 A CN 201910837872A CN 112445629 A CN112445629 A CN 112445629A
Authority
CN
China
Prior art keywords
state
metadata
notification
annotation
state change
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
CN201910837872.6A
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 Huafeng Ocean Information System Service Co ltd
Original Assignee
Guangdong Huafeng Ocean Information System Service 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 Huafeng Ocean Information System Service Co ltd filed Critical Guangdong Huafeng Ocean Information System Service Co ltd
Priority to CN201910837872.6A priority Critical patent/CN112445629A/en
Publication of CN112445629A publication Critical patent/CN112445629A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/542Event management; Broadcasting; Multicasting; Notifications
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/546Message passing systems or structures, e.g. queues

Abstract

The invention discloses a lightweight low-coupling working state change collecting and notifying method, which comprises the following steps: annotations, which contain two attributes, the attribute name of the object state and a notification event group; a configuration file containing two configuration items, a general method of user information and metadata in a session; a message queue for receiving changes and distribution of workflow status; 1) comparing the attribute names of the object states of the notification event groups in the annotations according to the user information in the configuration file, and triggering collection if the attribute names are the same; 2) and determining the operation of the annotation method according to the general method of the metadata in the configuration file, determining the object state and the notification event group in the parameter extraction as the state addition or the state subtraction, and pushing the object state and the notification event group into a message queue. The invention comprises the following steps: 1. a part of the workflow guidance system is separated out, so that the workflow guidance system is more flexible, free and time-saving, and the whole workflow system is not required to be introduced; 2. and annotation and section programming are adopted to reduce the invasion of band codes, reduce coupling and facilitate development and maintenance.

Description

Lightweight low-coupling working state change collecting and notifying method
Technical Field
The invention relates to a lightweight low-coupling working state change collecting and notifying method.
Background
The workflow system as a technology for managing and integrating the conventional affairs comprises a building function, an operation control function and an operation interaction function, is a heavyweight system, and can bring the following benefits: the business process is improved and optimized, and the business working efficiency is improved; better business process control is realized, and the service quality of customers is improved; and the flexibility of the business process is improved.
The workflow is used as an integrated system, so that the workflow is very intrusive to codes; for a simple and relatively fixed-flow system, development, maintenance, and deployment costs are high. How to simplify a workflow system, make the workflow system light-weighted and fragmented, as a plug-in software, there is no effective and mature solution at present. Through investigation, most workflow systems in the industry are integrated, modules cannot exist independently and are coupled with each other, the workflow systems exist as a whole, and no software for collecting and notifying messages of object state changes in workflows exists.
The existing workflow engine technology is integrated, so that the workflow engine becomes heavy, the development, maintenance and deployment costs become high, and the workflow engine is not suitable for small and medium-sized systems with relatively simple and fixed processes. In order to solve the technical problems, a new technical scheme is especially provided.
Disclosure of Invention
The present invention is directed to a lightweight low-coupling operation state change collection and notification method, so as to solve the problems of the background art.
In order to achieve the purpose, the invention provides the following technical scheme: a lightweight low-coupling working state change collection notification method comprises the following steps:
annotations, which contain two attributes, the attribute name of the object state and a notification event group;
a configuration file containing two configuration items, user information in a session and a general method of metadata;
a message queue for receiving changes and distribution of workflow status;
the workflow state change collection notification method based on the annotation plug-in mode comprises the following steps:
1) comparing the attribute names of the object states of the notification event groups in the annotations according to the user information in the configuration file, and triggering collection if the attribute names are the same;
2) and according to the general method of the metadata in the configuration file, determining the operation of the annotation method, determining the object state and the notification event group in the parameter extraction as the state addition or the state subtraction, and pushing the object state and the notification event group into a message queue.
Preferably, the attribute name of the object state is used to specify the state name of the metadata.
Preferably, the common methods of metadata include add, delete, modify, and query.
Preferably, the method of determining what the annotation is includes obtaining the state stored in the database by a query method of metadata, and if the database state is the same as the state passed in the parameter, it is unchanged; the method for determining what operation the annotation method is further comprises obtaining a state addition and a state subtraction in the annotated notification event group, wherein if the state addition is the same as the state of parameter transmission, the state addition is addition, and if the state subtraction is the same as the state of parameter transmission, the state subtraction is subtraction.
Preferably, the parameter extraction aop using spring comprises a section programming technology, and parameters are extracted and delivered to the logic processing unit for processing before the method is executed.
Preferably, the notification event group contains an operation object, an event, a notification object, a status and 5 attributes minus the status.
Preferably, the parameter extraction will extract two parameters of the object state and the notification object.
Preferably, the notification event group is used to describe to whom a person needs to be notified or revoked after doing something.
Preferably, the attribute name of the object state specifies a state of the metadata, and whether to collect the object state is determined according to a change in the state of the metadata.
Preferably, the notification event may be two or more.
Compared with the prior art, the invention has the beneficial effects that:
1. and (3) lightening: a part of the workflow guidance system is separated out, so that the workflow guidance system is more flexible, free and time-saving, and the whole workflow system is not required to be introduced;
2. low coupling: and annotation and section programming are adopted to reduce the invasion of band codes, reduce coupling and facilitate development and maintenance.
3. Distributed: the collected information and notifications can be developed and deployed independently using message queue middleware.
Drawings
FIG. 1 is a schematic flow chart of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to the attached drawings of the specification, the invention provides a technical scheme that: a lightweight low-coupling working state change collection notification method comprises the following steps:
annotations, which contain two attributes, the attribute name of the object state and a notification event group;
a configuration file containing two configuration items, user information in a session and a general method of metadata;
a message queue for receiving changes and distribution of workflow status;
the workflow state change collection notification method based on the annotation plug-in mode comprises the following steps:
1) comparing the attribute names of the object states of the notification event groups in the annotations according to the user information in the configuration file, and triggering collection if the attribute names are the same;
2) and according to the general method of the metadata in the configuration file, determining the operation of the annotation method, determining the object state and the notification event group in the parameter extraction as the state addition or the state subtraction, and pushing the object state and the notification event group into a message queue.
The invention takes the collection/notification of the state change of the object in the workflow as an independent function outside the workflow engine, thereby being lighter and meeting different scenes; the information collection of the state change uses the tangent plane programming technique, reduce the invasion of the belt code, reduce and couple; and distributing the notice in a message queue mode for consumption of various channels (databases).
The invention is composed of 6 units of annotation, configuration file, parameter extraction, logic processing, exception capture and message queue.
And annotating: annotating the need to mark on the method (add, delete, or modify) that operates on the metadata to clarify the workflow object; the annotation has two attributes: attribute names of object states and notification event groups. The attribute name of the object state specifies the state of the metadata (namely the name of the parameter state transmitted by the metadata method), and whether to collect the metadata is determined according to the change of the state; the notification event contains 5 attributes: the operation object, the event, the notification object, the state addition and the state subtraction are summarized into a sentence, namely, a person needs to be notified to whom or withdraw from notification after the person does the event, and specific attributes such as limited time can be added to the notification event according to actual requirements. Wherein the operation object and the notification object can be in the form of a user, a role or an organization. Collecting
Configuration files: the configuration file is in the form of a key-value pair, and has a configuration item: a general method of metadata; common methods of metadata include add, delete, modify, and query methods.
Parameter extraction: the parameter extraction adopts the spring aop containing (@ Around) section programming technology, and the parameters are extracted and delivered to the logic processing unit for processing before the method is executed. The parameter extraction will extract two parameters: object status, notify object.
Logic processing: and extracting data in the three units from the annotation, the configuration file and the parameter for logic processing. The method comprises the following specific steps: 1) according to a general method of metadata in a configuration file, determining which operation (adding, deleting or modifying) is the annotation method, wherein the adding is status adding, the deleting is status subtracting, and the modifying has three conditions, namely status unchanged, status adding and status subtracting; 2) determine which case the state under modification is (constant, plus, minus): keeping the following steps: acquiring the state stored in the database by a metadata query method, wherein the state is unchanged if the state of the database is the same as the state transmitted in the parameters; adding: acquiring state addition and state subtraction in the annotated notification event group, wherein if the state addition is the same as the state of parameter transmission, the state addition is addition, and if the state subtraction is the same as the state of parameter transmission, the state subtraction is subtraction; 3) adding and subtracting the states obtained in the step (1) and the step (2), and pushing the states to a message queue, wherein the state adding is who the message is pushed to; a notification to whom the status was reduced to revocation; and if the state is not changed, pushing is not carried out.
Abnormal capture: and canceling the pushing to the message queue if an exception occurs after the metadata method marked by the annotation is executed.
Message queue: the message queue is responsible for receiving and distributing information.
Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that changes, modifications, substitutions and alterations can be made in these embodiments without departing from the principles and spirit of the invention, the scope of which is defined in the appended claims and their equivalents.

Claims (10)

1. A lightweight low-coupling working state change collection notification method is characterized by comprising the following steps:
annotations, which contain two attributes, the attribute name of the object state and a notification event group;
a configuration file containing two configuration items, user information in a session and a general method of metadata;
a message queue for receiving changes and distribution of workflow status;
the workflow state change collection notification method based on the annotation plug-in mode comprises the following steps:
1) comparing the attribute names of the object states of the notification event groups in the annotations according to the user information in the configuration file, and triggering collection if the attribute names are the same;
2) and according to the general method of the metadata in the configuration file, determining the operation of the annotation method, determining the object state and the notification event group in the parameter extraction as the state addition or the state subtraction, and pushing the object state and the notification event group into a message queue.
2. The annotation plug-in based workflow state change collection notification method according to claim 1, wherein: the attribute name of the object state is used to specify the state name of the metadata.
3. The annotation plug-in based workflow state change collection notification method according to claim 1, wherein: the common methods of metadata include add, delete, modify, and query.
4. The annotation plug-in based workflow state change collection notification method according to claim 1, wherein: the method for determining what operation the annotation method is includes acquiring a state stored in a database by a query method of metadata, and if the state of the database is the same as the state transmitted in the parameter, the state is unchanged; the method for determining what operation the annotation method is further comprises obtaining a state addition and a state subtraction in the annotated notification event group, wherein if the state addition is the same as the state of parameter transmission, the state addition is addition, and if the state subtraction is the same as the state of parameter transmission, the state subtraction is subtraction.
5. The annotation plug-in based workflow state change collection notification method according to claim 1, wherein: the parameter extraction adopts spring aop including tangent plane programming technology, and parameters are extracted and delivered to a logic processing unit for processing before the method is executed.
6. The annotation plug-in based workflow state change collection notification method according to claim 1, wherein: the notification event group contains an operation object, an event, a notification object, a state and 5 attributes minus the state.
7. The annotation plug-in based workflow state change collection notification method according to claim 1, wherein: the parameter extraction extracts two parameters of the object state and the notification object.
8. The annotation plug-in based workflow state change collection notification method according to claim 1, wherein: the notification event group is used to describe to whom a person needs to be notified or revoked after doing something.
9. The annotation plug-in based workflow state change collection notification method according to claim 1, wherein: the attribute name of the object state specifies the state of the metadata, and whether to collect the metadata is determined according to the state change of the metadata.
10. The annotation plug-in based workflow state change collection notification method according to claim 1, wherein: the notification event may be two or more.
CN201910837872.6A 2019-09-05 2019-09-05 Lightweight low-coupling working state change collecting and notifying method Pending CN112445629A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910837872.6A CN112445629A (en) 2019-09-05 2019-09-05 Lightweight low-coupling working state change collecting and notifying method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910837872.6A CN112445629A (en) 2019-09-05 2019-09-05 Lightweight low-coupling working state change collecting and notifying method

Publications (1)

Publication Number Publication Date
CN112445629A true CN112445629A (en) 2021-03-05

Family

ID=74733156

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910837872.6A Pending CN112445629A (en) 2019-09-05 2019-09-05 Lightweight low-coupling working state change collecting and notifying method

Country Status (1)

Country Link
CN (1) CN112445629A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114154944A (en) * 2021-11-03 2022-03-08 广州市玄武无线科技股份有限公司 Business auditing method, equipment and computer readable storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114154944A (en) * 2021-11-03 2022-03-08 广州市玄武无线科技股份有限公司 Business auditing method, equipment and computer readable storage medium
CN114154944B (en) * 2021-11-03 2023-04-07 广州市玄武无线科技股份有限公司 Business auditing method, equipment and computer readable storage medium

Similar Documents

Publication Publication Date Title
CN110765337B (en) Service providing method based on internet big data
CN109542733A (en) A kind of highly reliable real-time logs collection and visual m odeling technique method
CN105183860B (en) Method of data synchronization and system
CN112685433B (en) Metadata updating method and device, electronic equipment and computer-readable storage medium
CN106104533A (en) Process the data set in large data storage vault
CN109284312A (en) A kind of heterogeneous database change real-time informing method
US20110040805A1 (en) Techniques for parallel business intelligence evaluation and management
CN110544164A (en) Full link account checking method and system
CN111046000B (en) Government data exchange sharing oriented security supervision metadata organization method
CN101632076A (en) Realtime unification management information data conversion and monitoring apparatus and method for thereof
CN103092866A (en) Data monitoring method and monitoring device
CN106528688A (en) Analysis evidence-taking method for Twitter
US20080301084A1 (en) Systems and methods for dynamically creating metadata in electronic evidence management
CN112445629A (en) Lightweight low-coupling working state change collecting and notifying method
US20080301284A1 (en) Systems and methods for capture of electronic evidence
CN104636211A (en) Information interaction method among software systems, and middleware system
CN113434742A (en) Account screening method and device, storage medium and electronic device
CN105187490B (en) A kind of transfer processing method of internet of things data
CN107247715A (en) The synchronous method of WMS systems and ERP system
CN116089431A (en) Data processing method and device of data warehouse, electronic equipment and storage medium
US20080301172A1 (en) Systems and methods in electronic evidence management for autonomic metadata scaling
CN109886318A (en) A kind of information processing method, device and computer readable storage medium
CN115237989A (en) Mine data acquisition system
CN100550009C (en) Asynchronous information sharing system
CN113627810A (en) Thread processing method, thread processing device and storage medium

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