CN111142933B - Workflow generation method and device, computer equipment and storage medium - Google Patents

Workflow generation method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN111142933B
CN111142933B CN201910455976.0A CN201910455976A CN111142933B CN 111142933 B CN111142933 B CN 111142933B CN 201910455976 A CN201910455976 A CN 201910455976A CN 111142933 B CN111142933 B CN 111142933B
Authority
CN
China
Prior art keywords
workflow
configuration file
execution
file
target configuration
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910455976.0A
Other languages
Chinese (zh)
Other versions
CN111142933A (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.)
Zhejiang Dasou Vehicle Software Technology Co Ltd
Original Assignee
Zhejiang Dasou Vehicle Software 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 Zhejiang Dasou Vehicle Software Technology Co Ltd filed Critical Zhejiang Dasou Vehicle Software Technology Co Ltd
Priority to CN201910455976.0A priority Critical patent/CN111142933B/en
Publication of CN111142933A publication Critical patent/CN111142933A/en
Application granted granted Critical
Publication of CN111142933B publication Critical patent/CN111142933B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/74Reverse engineering; Extracting design information from source code
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Landscapes

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

Abstract

The application relates to a workflow generation method, a workflow generation device, computer equipment and a storage medium. The method comprises the following steps: acquiring a workflow configuration diagram, and extracting workflow elements in the workflow configuration diagram; extracting node information corresponding to workflow nodes from the workflow elements, storing the node information in a correlation manner to generate an initial configuration file corresponding to the workflow elements, and generating element configuration files according to the initial configuration file; acquiring an execution code associated with the initial configuration file, and generating an execution file according to the execution code; and associating the execution file with the element configuration file to generate a target configuration file, loading the target configuration file into a workflow generation container, and generating the workflow. By adopting the method, the workflow or the business flow can be realized through the workflow established on line, and the realization efficiency of different workflows can be improved.

Description

Workflow generation method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for generating a workflow, a computer device, and a storage medium.
Background
In the process of enterprise management or business management and the like, a preset work flow exists, namely a work link of a preset business or work items exists, so that the whole work is divided into different tasks, the different tasks are executed according to certain steps and monitored, and the different tasks are involved and the completion condition of the tasks is monitored in the process of online vehicle purchasing and the like.
Conventionally, when a workflow is developed on line, related workflow node codes and execution codes need to be configured separately in a main code segment corresponding to a service or a working link, so that the workflow node codes and the execution codes have strong coupling, and the generation efficiency of the workflow is not high.
Disclosure of Invention
In view of the above, it is necessary to provide a workflow generation method, a workflow generation apparatus, a computer device, and a storage medium, which can improve the generation efficiency of a workflow.
A workflow generation method, the method comprising:
acquiring a workflow configuration diagram, and extracting workflow elements in the workflow configuration diagram;
extracting node information corresponding to workflow nodes from the workflow elements, storing the node information in a correlation manner to generate an initial configuration file corresponding to the workflow elements, and generating element configuration files according to the initial configuration file;
acquiring an execution code associated with the initial configuration file, and generating an execution file according to the execution code;
and associating the execution file with the element configuration file to generate a target configuration file, loading the target configuration file into a workflow generation container, and generating the workflow.
In one embodiment, loading the target configuration file into the workflow generation container comprises:
inquiring an initialization code segment corresponding to the workflow generation container, and monitoring whether the initialization code segment is triggered;
when the initialization code segment is triggered, analyzing the initial configuration file in the target configuration file through the workflow generation container, and analyzing the execution code in the target configuration file;
and associating the analyzed initial configuration file with the analyzed execution code to serve as a frame code corresponding to the workflow generation container, and completing the loading of the target configuration file.
In one embodiment, before parsing an initial configuration file in a target configuration file through a workflow generation container and parsing execution code in the target configuration file, the method includes;
when the file format of the target configuration file is detected to be the lightweight language format, acquiring a pre-stored language analysis file;
the analyzing the initial configuration file in the target configuration file and the executing code in the target configuration file by the workflow generation container includes:
and generating a container calling language analysis file through the workflow, analyzing an initial configuration file in the target configuration file, and analyzing an execution code in the target configuration file.
In one embodiment, obtaining the execution code associated with the initial configuration file and generating the execution file according to the execution code includes:
inquiring an execution mode corresponding to the workflow element in the initial configuration file;
generating an execution code corresponding to the workflow element according to the execution mode;
and acquiring an execution sequence corresponding to the workflow elements, and associating the execution codes according to the execution sequence to generate an execution file.
In one embodiment, associating the execution file with the element configuration file to generate a target configuration file comprises:
acquiring a storage path corresponding to each initial configuration file contained in the element configuration file;
and associating the execution codes corresponding to different initial configuration files with the storage path from the execution files to generate a target configuration file.
In one embodiment, the method comprises the steps of associating an execution file with an element configuration file to generate a target configuration file, loading the target configuration file into a workflow generation container, and establishing a workflow according to the workflow generation container in which the target configuration file is loaded;
receiving a workflow execution instruction and calling a driving interface packaged in a workflow frame; calling a configuration interface in a workflow frame to acquire a target configuration file from a workflow generation container through a driving interface according to a workflow execution instruction;
inquiring a target configuration file acquired from a configuration interface through an execution interface in a workflow frame, inquiring a frame code corresponding to the target configuration file, and executing the frame code to finish the execution of the workflow;
and feeding back the execution state of the execution interface to the terminal.
In one embodiment, before loading the target configuration file into the workflow generation container, including;
when the target configuration file is detected to carry the type conversion identifier, acquiring a pre-stored conversion logic;
and acquiring the file format of the target configuration file, and performing format conversion on the file format of the target configuration file according to the conversion logic.
A workflow generation apparatus, the apparatus comprising;
the acquisition module is used for acquiring the workflow configuration diagram and extracting workflow elements in the workflow configuration diagram;
the extraction module is used for extracting node information corresponding to the workflow nodes from the workflow elements, storing the node information in a correlation mode to generate an initial configuration file corresponding to the workflow elements, and generating element configuration files according to the initial configuration file;
the generating module is used for acquiring the execution code associated with the initial configuration file and generating an execution file according to the execution code;
and the establishing module is used for associating the execution file with the element configuration file to generate a target configuration file, loading the target configuration file into the workflow generating container, and establishing the workflow according to the workflow generating container in which the target configuration file is loaded.
In one embodiment, the establishing module includes:
the system comprises a code segment query unit, a storage unit and a processing unit, wherein the code segment query unit is used for querying an initialization code segment corresponding to a workflow generation container and monitoring whether the initialization code segment is triggered;
the analysis unit is used for analyzing the initial configuration file in the target configuration file through the workflow generation container and analyzing the execution code in the target configuration file when the initialization code segment is triggered;
and the establishing unit is used for associating the analyzed initial configuration file with the analyzed execution code, and the initial configuration file is used as a frame code corresponding to the workflow generation container to finish the loading of the target configuration file.
In one embodiment, the establishing module includes;
the file query unit is used for acquiring a pre-stored language analysis file when the file format of the target configuration file is detected to be a lightweight language format;
the analysis unit includes:
and the analysis subunit is used for calling the language analysis file through the workflow generation container, analyzing the initial configuration file in the target configuration file, and analyzing the execution code in the target configuration file.
In one embodiment, the generating module includes:
the execution mode query unit is used for querying the execution mode corresponding to the workflow element in the initial configuration file;
the generating unit is used for generating an execution code corresponding to the workflow element according to the execution mode;
and the first association unit is used for acquiring the execution sequence corresponding to the workflow element, and associating the execution codes according to the execution sequence to generate an execution file.
In one embodiment, the establishing module includes:
an obtaining unit, configured to obtain a storage path corresponding to each initial configuration file included in the element configuration file;
and the second association unit is used for associating the execution code corresponding to each initial configuration file with the storage path from the execution file to generate a target configuration file.
In one embodiment, the workflow generation apparatus comprises;
the receiving module is used for receiving the workflow execution instruction and calling a driving interface packaged in the workflow frame;
the calling module is used for calling a configuration interface in the workflow frame to acquire the target configuration file from the workflow generation container according to the workflow execution instruction through the driving interface;
the execution module is used for inquiring the target configuration file acquired from the configuration interface through an execution interface in the workflow frame, inquiring a frame code corresponding to the target configuration file, and executing the frame code to finish the execution of the workflow;
and the feedback module is used for feeding back the execution state of the execution interface to the terminal.
In one embodiment, the workflow generation apparatus comprises;
a second obtaining module, configured to obtain a pre-stored conversion logic when it is detected that the target configuration file carries the type conversion identifier;
and the conversion module is used for acquiring the file format of the target configuration file and converting the file format of the target configuration file according to the conversion logic.
A computer device comprising a memory and a processor, the memory storing a computer program, the processor implementing the following steps when executing the computer program:
acquiring a workflow configuration diagram, and extracting workflow elements in the workflow configuration diagram;
extracting node information corresponding to workflow nodes from the workflow elements, storing the node information in a correlation manner to generate an initial configuration file corresponding to the workflow elements, and generating element configuration files according to the initial configuration file;
acquiring an execution code associated with the initial configuration file, and generating an execution file according to the execution code;
and associating the execution file with the element configuration file to generate a target configuration file, loading the target configuration file into a workflow generation container, and generating the workflow.
A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, carries out the steps of:
acquiring a workflow configuration diagram, and extracting workflow elements in the workflow configuration diagram;
extracting node information corresponding to workflow nodes from the workflow elements, storing the node information in a correlation manner to generate an initial configuration file corresponding to the workflow elements, and generating element configuration files according to the initial configuration file;
acquiring an execution code associated with the initial configuration file, and generating an execution file according to the execution code;
and associating the execution file with the element configuration file to generate a target configuration file, loading the target configuration file into a workflow generation container, and generating the workflow.
The workflow generating method, the device, the computer equipment and the storage medium do not need to complete the workflow offline, but establish the related workflow through the computer, namely, obtain the workflow configuration diagram, further generate the corresponding initial configuration file from the workflow elements in the workflow configuration diagram, generate the element configuration file according to the initial configuration file, further obtain the execution codes associated with the initial configuration file according to the workflow configuration diagram, generate the execution file according to the execution codes, further associate the execution file with the element configuration file to generate the target configuration file, load the target configuration file into the workflow generating container to automatically generate the workflow, therefore, in the workflow establishing process, the related workflow node codes and the execution codes do not need to be separately configured in the main codes corresponding to the services respectively, thereby avoiding strong coupling between codes and improving the generation efficiency of the workflow.
Drawings
FIG. 1 is a diagram illustrating an example of an application scenario for a workflow generation method;
FIG. 2 is a flow diagram that illustrates a method for workflow generation in one embodiment;
FIG. 3 is a flowchart illustrating the file loading step in one embodiment;
FIG. 4 is a schematic flow chart of workflow generation in another embodiment;
FIG. 5 is a flowchart showing a file loading step in another embodiment;
FIG. 6 is a block diagram showing the structure of a workflow generation apparatus in one embodiment;
FIG. 7 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The workflow generation method provided by the application can be applied to the application environment shown in fig. 1. Wherein the terminal 102 communicates with the server 104 via a network. The server 104 obtains a workflow configuration diagram sent by the terminal 102, extracts different workflow elements from the workflow configuration diagram, the server 104 generates an initial configuration file corresponding to the workflow elements and generates an element configuration file according to the initial configuration file, the server 104 further obtains execution codes associated with the initial configuration file according to the workflow configuration diagram and generates an execution file according to the execution codes, the server 104 associates the execution files with the element configuration file to generate a target configuration file, and the target configuration file is loaded into a workflow generation container to generate a workflow. The terminal 102 may be, but not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices, and the server 104 may be implemented by an independent server or a server cluster formed by a plurality of servers.
In one embodiment, as shown in fig. 2, a workflow generation method is provided, which is described by taking the method as an example applied to the server in fig. 1, and includes the following steps:
s202: and acquiring a workflow configuration diagram, and extracting workflow elements in the workflow configuration diagram.
Specifically, the workflow configuration diagram refers to a flowchart including different work links in the workflow to be established. It is understood that the workflow configuration diagram includes workflow data corresponding to different work links, and the workflow data may be workflow elements. Workflow elements refer to different components in a workflow configuration diagram. It is to be understood that the workflow element may be a node included in the workflow configuration diagram, that is, a step identifier corresponding to each workflow link, and may also be a terminal identifier of a processing terminal that processes each workflow link, a transfer relationship between different steps included in the workflow configuration diagram, and the like. Specifically, the server acquires a workflow configuration diagram generated by the terminal, identifies workflow data contained in the workflow configuration diagram, and extracts workflow elements from the workflow configuration diagram containing the workflow data. The server may acquire the workflow configuration diagram generated by the terminal, recognize different graph identifiers included in the workflow configuration diagram, query different workflow node identifiers according to the recognized different graph identifiers, extract the workflow node identifiers, further query connection relationships corresponding to different workflow nodes according to the different graph identifiers, and extract the workflow node identifiers and the corresponding connection relationships, that is, extract the workflow elements.
S204: extracting node information corresponding to the workflow nodes from the workflow elements, storing the node information in a correlation mode to generate initial configuration files corresponding to the workflow elements, and generating element configuration files according to the initial configuration files.
Specifically, the initial configuration file is an initial code file containing detailed information of the workflow nodes in different workflow elements, and may be information including node names corresponding to the workflow nodes in different workflow elements, different other nodes associated with the node, and the like. It can be understood that the initial configuration file is an initial code file generated by the server according to the workflow elements extracted from the workflow configuration diagram, the information of the workflow nodes in the workflow elements extracted, and the compiling. Workflow nodes refer to different steps contained in a workflow element. It will be appreciated that the server may extract the workflow node by the step identification contained in the workflow. The node information is attribute information corresponding to the workflow node, and the attribute information may be a node name corresponding to the workflow node, a node name of another workflow node associated with the node, a path stored by the node, and the like. The element configuration file is a code file which is generated by integrating and compiling different initial configuration files and contains different workflow nodes.
Specifically, when the server extracts workflow elements from a workflow configuration diagram according to different graphic identifiers, the workflow nodes are selected according to the pre-stored graphic identifiers of the workflow nodes, the server extracts node information from the selected workflow nodes and stores the extracted node information, and an initial configuration file corresponding to the workflow nodes is generated; and the server integrates the initial configuration files corresponding to different workflow nodes to generate an element configuration file. The workflow may be a wind control flow, the server extracts workflow elements from a workflow configuration diagram of the wind control flow according to different graphic identifiers, such as a diamond, a rectangle and an arrow, the graphic identifier of a workflow node prestored by the server is a rectangle, the workflow node is selected, the server extracts node information from the selected workflow node, such as a name of the workflow node, a storage path of a file or data received during an action to be executed by the workflow node, and other workflow nodes associated with the workflow node, and further stores the node information to generate an initial configuration file corresponding to the workflow element, and the server may use a code segment obtained by compiling the node information as different initial configuration files, and associate and integrate the initial configuration files corresponding to different workflow nodes, an element configuration file is generated.
S206: and acquiring an execution code associated with the initial configuration file, and generating an execution file according to the execution code.
Specifically, the execution code refers to a code segment corresponding to the workflow node and used for executing relevant operations of the workflow node, for example, if the complete workflow is a risk assessment process in a loan process, the workflow node has wind control data audit, and the wind control data audit is automatic audit, the execution code corresponding to the workflow node is used for obtaining the wind control data, and the wind control data is audited according to audit logic. The execution file is a code file generated by integrating different execution codes according to the sequence corresponding to the initial configuration file.
Specifically, when the server generates the initial configuration file, the node information corresponding to the workflow node is included in the initial configuration file, and in order to implement the entire workflow, each workflow node needs to be implemented separately, that is, each step in the workflow is implemented, so that the server obtains the execution code corresponding to the workflow node according to the workflow node, that is, the execution code is the execution code associated with the initial configuration file, and when the server queries the execution codes corresponding to different initial configuration files, the execution codes are associated according to the order of the initial configuration files to generate the execution files. The server compiles and integrates the workflow into an element configuration file, and integrates the execution codes corresponding to the initial configuration file into an execution file according to different services, so that the code file related to the workflow can be separated from the main program segments corresponding to different services, namely the code files corresponding to the workflow nodes do not need to be separately and respectively inserted into the main program segments, and the applicability is enhanced.
S208: and associating the execution file with the element configuration file to generate a target configuration file, loading the target configuration file into a workflow generation container, and generating the workflow.
Specifically, the target configuration file refers to a final file obtained by encapsulating a complete workflow, and it can be understood that the target configuration file may be a code file, and the code file may be in a lightweight data exchange format or an extensible markup language. The workflow generation container refers to an application development framework capable of managing different code segments contained in the workflow, and the server can configure corresponding target configuration files through the application development framework to combine the different code segments contained in the target configuration files, so that combination and management of the different code segments in the workflow are realized.
Specifically, when the server generates an element configuration file and an execution code list, the server extracts node information of different workflow nodes from the element configuration file, queries an execution code contained in the execution file according to the node information, associates the queried execution code with corresponding node information, generates a target configuration file according to the associated element configuration file and execution file, and loads the target configuration file into a workflow generation container, so that the server can combine different code segments contained in the target configuration file through the workflow generation container, and when the server completes a corresponding workflow, the server can acquire a workflow frame, add the combined workflow into the corresponding workflow frame, and complete corresponding packaging of the workflow in the workflow frame, the method comprises the steps that a workflow frame is combined and completed through a workflow generation container, and the combined workflow is packaged through the workflow frame, so that in the implementation process of the workflow, only a driving interface which is packaged and completed by the workflow is required to be directly called, the realization of the workflow can be completed, in addition, in the implementation process of the business, different execution codes and workflow nodes are not required to be respectively called, the simplicity and the practicability in the development process are ensured, and the business development efficiency is improved.
In the workflow generating method, the server extracts the workflow elements from the workflow configuration diagram through the acquired workflow configuration diagram, inquires node information according to the workflow nodes contained in the workflow elements, associates and stores the node information to generate an initial configuration file, generates an element configuration file according to the initial configuration file, acquires the execution codes associated with the initial configuration file, generates an execution file according to the execution codes, associates the execution file with the element configuration file to generate a target configuration file, loads the target configuration file into a workflow generating container, and establishes the workflow according to the loaded workflow generating container, that is, when the server realizes related business processes, the server does not need to separately configure the related workflow node codes and the execution codes in the main code segments corresponding to the business, therefore, only the generated related workflow frame needs to be directly called, the generation efficiency corresponding to the workflow is improved, the service development efficiency can be improved, the refreshing of codes is ensured, the readability is high, the workflow established by the server can directly realize related working links on line, and related files are not required to be transmitted off line by paper, so that the efficiency of completing the workflow can be improved, the completed workflow is established on line, different workflow nodes can be provided with corresponding monitoring operation, and the monitoring of the completion condition of each workflow node in the workflow can be facilitated.
In an embodiment, please refer to fig. 3, which provides a flowchart of a file loading step, where the file loading step, that is, loading the target configuration file into the workflow generation container, includes: s302: inquiring an initialization code segment corresponding to the workflow generation container, and monitoring whether the initialization code segment is triggered; s304: when the initialization code segment is triggered, analyzing the initial configuration file in the target configuration file through the workflow generation container, and analyzing the execution code in the target configuration file; s306: and taking the analyzed initial configuration file and the analyzed execution code as frame codes corresponding to the workflow generation container to finish the loading of the target configuration file.
Specifically, the initial code segment is a trigger code segment for starting parsing by the workflow generation container and loading a corresponding code segment, that is, when the server receives feedback information returned by triggering the initial code segment, the workflow generation container may parse and combine the target configuration file.
Specifically, when the server generates a target configuration file according to the element configuration file and the execution code list, the target configuration file needs to be loaded into a workflow generation container, a frame code corresponding to the workflow generation container is acquired, an initialization code segment is inquired according to a code segment identifier corresponding to the acquired frame code, the server runs the inquired initialization code segment and inquires whether feedback data returned after the initialization code segment is run is received, when the server receives the feedback data returned after the initialization data is run, the initial code segment is triggered, that is, the workflow generation container is successfully started, and then the server runs a file parsing code segment contained in the workflow generation container, and extracts the initial configuration file in the element configuration file from the target configuration file through the file parsing code segment, and extracting the execution codes associated with the initial configuration file from the target file, completing the analysis of the initial configuration file and the execution codes by the server, and combining the analyzed initial configuration file and the analyzed execution codes to generate corresponding frame codes when the server completes the analysis, so that the server completes the loading of the target configuration file, and is convenient for decoupling the relevant code segments for realizing the service logic and the relevant code segments for realizing the workflow in the subsequent service development process.
It should be noted that the target configuration file may be an extensible markup language, or may adopt a lightweight data exchange format, which may reduce the amount of code.
In addition, after S302, when the server does not listen to the initialization code segment being triggered, S308 is executed, that is, the server waits for the initialization code segment to be triggered.
In this embodiment, the server may query the initialization code segment corresponding to the workflow generation container, monitor whether the initialization code segment is triggered, and when the initialization code segment is triggered, parse the target configuration file through the workflow generation container, thereby ensuring that the workflow generation container operates normally, so as to improve the parsing efficiency of the target configuration file, and further generate a framework code according to the parsing of the workflow generation container on the target configuration file, thereby facilitating the decoupling of relevant code segments of business logic and relevant code segments of the workflow.
In an embodiment, please continue to refer to fig. 3, before step S304, that is, before parsing the initial configuration file from the target configuration file and parsing the execution code from the target configuration file, the method includes S303: whether the file format of the query target configuration file is the lightweight language format or not is S305: when the file format of the target configuration file is detected to be the lightweight language format, acquiring a pre-stored language analysis file; s304 may include: s307: and generating a container calling language analysis file through the workflow, analyzing an initial configuration file in the target configuration file, and analyzing an execution code in the target configuration file.
Specifically, the lightweight language format is a code compiling format in which a code file compiled using the format is easy to parse, and may be JSON (JS Object Notation). The language parsing file is pre-stored, and a code segment file capable of parsing the target configuration file in the lightweight language format is stored.
Specifically, before the server parses the target configuration file through the workflow generation container, the server may check a language format adopted by the target configuration file to be parsed, the server queries whether the file format of the target configuration file is a lightweight language format according to code segments included in the target configuration file, when the file format of the target configuration file is the lightweight language format, the server retrieves a pre-stored language parsing file, the server generates workflow code segments corresponding to the container by running the workflow, calls the code segments in the language parsing file, runs the code segments in the language parsing file, queries an initial configuration file included in the target configuration file compiled according to the lightweight language format according to the code segments run in the language parsing file, and executes a code, therefore, the initial configuration file and the execution code are extracted, and the server completes analysis of the target configuration file. In addition, when the server queries that the file format of the target configuration file is the extensible markup language, the server can analyze the target configuration file without running a file analysis code segment in the language analysis file through a workflow code segment. Wherein the extensible markup language may be an XML language.
In addition, after the server executes step S303, when the file format of the server query target configuration is not the lightweight language format, step S304 is directly executed, that is, the element table is directly parsed from the target configuration file by the workflow generation container, and the execution code segment in the target configuration file is parsed.
In this embodiment, when the server queries that the file format of the target configuration file is the lightweight language format, the server may obtain a pre-stored language parsing file, and generate a container parsing target configuration file through a workflow according to the language parsing file, and when it is ensured that the target configuration file formats are different, parse is performed in different manners, so as to ensure the parsing accuracy of the target configuration file.
In one embodiment, acquiring an execution code associated with a query and an initial configuration file according to a workflow configuration diagram, and generating an execution file according to the execution code includes: inquiring an execution mode corresponding to the workflow element in the workflow configuration diagram; generating an execution code corresponding to the workflow element according to the execution mode; and acquiring an execution sequence corresponding to the workflow elements, and associating the execution codes according to the execution sequence to generate an execution file.
Specifically, the execution manner refers to an action to be executed when a working link corresponding to different workflow elements is implemented, and may be that the workflow elements are included workflow nodes, and the execution manner refers to an action to be executed when the workflow nodes are implemented, for example, the workflow elements refer to evaluation of risk data, and the execution manner of the nodes implementing risk data evaluation is to acquire the risk evaluation data from a pre-stored database and then evaluate the risk data by using a corresponding risk evaluation policy. Executing code means converting an execution manner so that the workflow node can be executed by executing the execution code.
Specifically, the server queries an execution mode corresponding to a workflow element, and then queries the workflow element corresponding to the initial configuration file, according to element information corresponding to the workflow element, queries a pre-stored execution mode corresponding to the workflow element, that is, queries an execution action corresponding to the workflow element, and according to the execution action, obtains an execution code corresponding to the execution action, and then according to the target configuration file, obtains a different order of the initial configuration file, so as to obtain an execution order corresponding to the workflow element, and the server associates the execution code according to the obtained execution order, and generates an execution file.
The workflow element acquired by the server is a workflow node, the server queries node information of the workflow node, further queries a pre-stored execution mode corresponding to the workflow node according to the node information, queries an execution code associated with the execution mode, further sequentially associates the queried execution code to generate an execution file, and in addition, the server sequentially associates the execution code by using a pipeline model (pipeline model), so that different execution codes can be combined, and the execution code is ensured to be clear.
For example, the workflow is a risk assessment process, the workflow element is queried to be a workflow node in the workflow, the workflow node may be two workflow nodes, the first workflow node is to receive enterprise data, the second workflow node is to assess the enterprise data, the server queries the execution mode of the first workflow node to receive the enterprise data to verify enterprise information and store the enterprise data, and queries the execution mode of the second workflow node to assess the enterprise data to assess the risk data by using a corresponding risk assessment strategy, the server acquires a first execution code according to the execution mode of the first workflow node and acquires a second execution code corresponding to the execution mode of the second workflow node, the server queries the execution sequence of the first workflow node and the second workflow node to execute the first workflow node first, and further executing the second workflow node, the server associates the first execution code with the second code segment by adopting a pipeline mechanism to generate an execution file.
In this embodiment, the server queries the execution mode corresponding to the workflow element in the initial configuration file, and generates an execution code corresponding to the workflow element according to the execution mode, and the server obtains the execution sequence corresponding to the workflow element and associates the execution code according to the execution sequence to generate an execution file, so that the execution code is clear, and the execution code is associated to generate the execution file without adding a corresponding execution code into the service code segment, thereby improving the generation efficiency of the service code segment.
In one embodiment, associating the execution file with the element configuration file to generate a target configuration file comprises: acquiring a storage path corresponding to each initial configuration file contained in the element configuration file; and associating the execution code corresponding to each initial configuration file with the storage path from the execution file to generate a target configuration file.
Specifically, when the server generates the element configuration file and the execution file, the server queries different initial configuration files included in the element configuration file, further queries initial configuration file information of the different initial configuration files, such as names of workflow elements stored in the initial configuration files, paths stored in the initial configuration files, and the like, the server queries storage paths corresponding to the different initial configuration files from the acquired initial configuration file information, further queries different execution codes in the execution file, and associates the execution codes with the storage paths of the corresponding initial configuration files. The server may obtain the element configuration file, query different initial configuration files from the element configuration table, where the initial configuration files may include corresponding workflow nodes, further query node information including the workflow nodes, extract a workflow node storage path from the node information, and associate the workflow node storage path with the execution code to generate the target configuration file.
In this embodiment, the server may obtain storage paths corresponding to different initial configuration files included in the element configuration file, and further associate an execution code included in the execution file with the storage path of the corresponding initial configuration file to generate a target configuration file, which is simple to generate, and ensures that the server loads a generated workflow through the workflow generation container with high efficiency, and may directly query the execution code according to the storage path according to the initial configuration file in the target configuration file, and ensure that the generated workflow is accurate.
In one embodiment, associating the execution file with the element configuration file to generate a target configuration file, and loading the target configuration file into the workflow generation container; receiving a workflow execution instruction and calling a driving interface packaged in a workflow frame; calling a configuration interface to acquire a target configuration file from a workflow generation container through a driving interface according to a workflow execution instruction; inquiring a target configuration file acquired from a configuration interface through an execution interface, and executing a workflow; and feeding back the execution state of the execution interface to the terminal.
Specifically, the driver interface is a code segment that corresponds to the workflow framework generated by encapsulating the workflow generation container configured with the target configuration file by using the corresponding workflow framework and can be directly called by other service code segments, that is, the driver interface does not need to additionally call the code segments for realizing other functions by the service system, thereby improving the efficiency of service development. The configuration interface refers to a code segment that can obtain a target configuration file corresponding to the workflow from the workflow generation container, that is, the configuration interface obtains the target configuration file corresponding to the workflow, so that the interface code segment executing the workflow executes the frame code corresponding to the target configuration file, thereby completing the execution of the workflow. The execution interface refers to a relevant code segment for executing the frame code segment corresponding to the target configuration file so as to complete the workflow.
Specifically, when the server completes the establishment of the workflow, when the workflow is realized, the terminal generates a workflow execution instruction and sends the workflow execution instruction to the server, the server receives the workflow execution instruction sent by the terminal, the server calls a driving interface in a workflow frame, that is, the server queries the interface name, so as to execute a driving interface code segment corresponding to the driving interface, the server calls a configuration interface through the driving interface code segment, acquires a target configuration file through executing the code segment corresponding to the configuration interface, calls an execution interface through the driving interface, executes the acquired target configuration file through the execution interface, and further queries a frame code corresponding to the target configuration file, that is, executes the corresponding frame code, so as to complete the execution of the workflow, and the execution interface can feed back different workflow nodes and execution states corresponding to the execution codes, the execution state may be a state such as completion of execution corresponding to the workflow node or failure of execution, and if the execution fails, the server feeds back the received execution state to the terminal corresponding to the reason of the failure. It should be noted that different interfaces in the workflow framework can be encapsulated uniformly, and thus, when writing corresponding service code segments, corresponding workflows can be executed without calling different interfaces respectively, that is, the exposed interfaces can be called.
In this embodiment, the server receives the workflow execution instruction, directly calls the driving interface encapsulated in the workflow frame, and then the configuration interface in the workflow framework is called to obtain the target configuration file from the workflow generation container through the driving interface and the workflow execution instruction, querying the target configuration file obtained from the configuration interface through an execution interface in the workflow framework so as to execute the workflow according to the framework code corresponding to the target configuration file, and then the server feeds back the execution state of the execution interface to the terminal, that is, in the process of executing the workflow, different interfaces are packaged, the server does not need to call different interfaces respectively, and can enable the workflow-related interface to execute the workflow only by driving the interface, therefore, the workflow is simple and easy to execute, and the business codes corresponding to the workflow are concise.
In one embodiment, before loading the target configuration file into the workflow generation container, including; when detecting that the target configuration file carries the type conversion identifier, acquiring a pre-stored conversion logic; and acquiring the file format of the target configuration file, and performing format conversion on the file format of the target configuration file according to the conversion logic.
Specifically, the file format refers to a language format corresponding to the target configuration file, and the file format may be a lightweight language format or an extensible markup language. The type conversion flag refers to a flag for converting a file format into a different language format, and it is understood that the flag may be a code segment comment or the like.
Specifically, when the server generates the target configuration file, because the target configuration file is parsed, a lightweight language format can be adopted to ensure fast parsing speed, and an extensible markup language can also be adopted to ensure stable parsing, but the language in the file is complex, when the target configuration file is obtained, the target configuration file can be parsed, that is, the server reads the language format corresponding to the target configuration file to obtain the file format of the target configuration file, and then the server queries whether the target configuration file carries a type conversion identifier, that is, whether the target configuration file carries a comment required to be converted, when the server queries that the target configuration file carries a type conversion identifier, the server queries the target format required to be converted of the target configuration file, queries the corresponding conversion logic according to the target format, and according to the conversion logic, and performing language conversion on the target configuration file, namely converting the file format.
For example, when a server generates a target configuration file, a file format corresponding to the target configuration file is queried, and if the file format of the target configuration file is queried and written by using an extensible markup language, and then the target configuration file is queried by the server to carry a type conversion identifier, and the format to be converted is a lightweight language format by the server according to the type conversion identifier, the server acquires conversion logic, and converts different code languages contained in the target configuration file according to the conversion logic to obtain a converted lightweight language format file. Additionally, the target configuration file generated by the server may be in a lightweight language format for conversion to extensible markup language according to the conversion logic.
In this embodiment, the target configuration file compiled in the lightweight language format can be conveniently parsed, and the extensible markup language is convenient for data sharing, so that the server can adopt target configuration files in different file formats, and enhance applicability, and can query the file format corresponding to the target configuration file, and obtain the pre-stored conversion logic when the target configuration file carries the type conversion identifier, and then convert the file format corresponding to the target configuration file according to the conversion logic, and the conversion mode is simple and easy, and can be converted into different formats, thereby enhancing applicability.
In an embodiment, a user completes a car purchasing Process on line, the car purchasing Process can be regarded as a corresponding workflow, the server can establish a workflow corresponding to the corresponding car purchasing Process, please refer to fig. 4, a Process schematic diagram generated by another workflow is provided, that is, a bottom workflow module in the server is provided with a Business Process Modeling symbol (BPMN), the Business Process Modeling symbol is a whole set of workflow model, an upper Business person inputs a model related definition corresponding to the car purchasing Process and corresponding to the workflow model through a terminal, the bottom workflow module in the server receives the model related definition to generate a workflow configuration diagram, and a workflow abstraction module in the server abstracts related workflow nodes and the like according to the workflow configuration diagram, that is, an element configuration file is obtained, then the server receives an execution code segment input by upper-layer service personnel through a terminal and corresponding to the workflow node, namely, an action associated with the obtained workflow node, and then the server associates the execution operation and the element configuration file to obtain a target configuration file, the server loads the target configuration file to a corresponding workflow generation container, the workflow generation container can be a spring container, and then the server obtains a workflow frame, for example, the workflow frame can be an activiti frame, and then the activiti frame is combined with the configuration completion spring container, so as to complete the establishment of the workflow, and the server encapsulates the activiti frame, provides a driving interface which can be called and drive other interfaces in the activiti frame for the service system, so that when the server executes the workflow of the vehicle purchase on the line, in a service code, the server can call the driving interface without calling different interfaces, so that other interfaces are driven to complete the execution of the workflow, for example, the driving interface is called, the driving configuration interface calls the target configuration file, and the target configuration file is executed through the execution interface, so that the workflow is realized.
In addition, when the target configuration file is loaded into the spring container, when the target configuration file is an XML file, the XML file can be converted into a JSON file, so that the spring container can be conveniently analyzed. Wherein, loading the target configuration file into the spring container, please refer to fig. 5, providing another file loading flow diagram, when loading the target configuration file into the spring container, the server can firstly inquire whether the container is started, when the container is started, the container monitoring code set in the spring container can feed back the corresponding event, the container monitoring code is the initial code, when the initial code is triggered, the server analyzes according to the target configuration file through the workflow analysis code end set in the spring container, and converts the analyzed target configuration file into the intermediate data structure which can be further analyzed in detail through the set workflow assembly code, so that the server analyzes the workflow node included in the element configuration file corresponding to the code through the workflow node, and executes the analysis code through the workflow, and analyzes the execution code corresponding to the workflow node, and further correlating the analyzed workflow nodes and the workflow execution codes through the workflow component assembly codes to generate corresponding framework codes, wherein the framework codes can be Javabeans (reusable components generated by the Java codes) in the spring container, and registering different generated Javabeans to finish the loading of the whole spring container on the target configuration file.
It should be understood that although the various steps in the flow charts of fig. 2-5 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 2-5 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternating with other steps or at least some of the sub-steps or stages of other steps.
In one embodiment, as shown in fig. 6, there is provided a workflow generation apparatus including: an obtaining module 610, an extracting module 620, a generating module 630 and a establishing module 640, wherein:
the first obtaining module 610 is configured to obtain the workflow configuration diagram, and extract workflow elements in the workflow configuration diagram.
The extracting module 620 is configured to extract node information corresponding to the workflow node from the workflow element, store the node information in association with each other to generate an initial configuration file corresponding to the workflow element, and generate an element configuration file according to the initial configuration file.
The generating module 630 is configured to obtain an execution code associated with the initial configuration file, and generate an execution file according to the execution code.
The establishing module 640 is configured to associate the execution file with the element configuration file to generate a target configuration file, and load the target configuration file into the workflow generation container to generate the workflow.
In one embodiment, the establishing module 640 includes:
and the code segment query unit is used for querying the initialization code segment corresponding to the workflow generation container and monitoring whether the initialization code segment is triggered.
And the analysis unit is used for analyzing the initial configuration file in the target configuration file through the workflow generation container and analyzing the execution code in the target configuration file when the initialization code segment is triggered.
And the establishing unit is used for associating the analyzed initial configuration file with the analyzed execution code, and the association is used as a frame code corresponding to the workflow generation container to finish the loading of the target configuration file.
In one embodiment, the setup module includes:
and the file query unit is used for acquiring a pre-stored language analysis file when the file format of the target configuration file is detected to be the lightweight language format.
An analysis unit comprising:
and the analysis subunit is used for generating a container calling language analysis file through the workflow, analyzing the initial configuration file in the target configuration file, and analyzing the execution code in the target configuration file.
In one embodiment, the generating module 630 includes:
and the execution mode query unit is used for querying the execution mode corresponding to the workflow element in the initial configuration file.
And the generating unit is used for generating an execution code corresponding to the workflow element according to the execution mode.
And the first association unit is used for acquiring the execution sequence corresponding to the workflow elements and associating the execution codes according to the execution sequence to generate an execution file.
In one embodiment, the establishing module 640 includes:
and the acquisition unit is used for acquiring the storage path corresponding to each initial configuration file contained in the element configuration file.
And the second association unit is used for associating the execution codes corresponding to different initial configuration files with the storage path from the execution files to generate a target configuration file.
In one embodiment, the workflow generation apparatus 600 includes.
And the receiving module is used for receiving the workflow execution instruction and calling the driving interface packaged in the workflow framework.
And the calling module is used for calling a configuration interface in the workflow framework to acquire the target configuration file from the workflow generation container through the driving interface according to the workflow execution instruction.
And the execution module is used for inquiring the target configuration file acquired from the configuration interface through the execution interface in the workflow frame, inquiring the frame code corresponding to the target configuration file, and executing the frame code to finish the execution of the workflow.
And the feedback module is used for feeding back the execution state of the execution interface to the terminal.
In one embodiment, the workflow generation apparatus 600 includes:
the second obtaining module is used for obtaining a prestored conversion logic when the target configuration file is detected to carry the type conversion identifier;
and the conversion module is used for acquiring the file format of the target configuration file and converting the file format of the target configuration file according to the conversion logic.
For specific limitations of the workflow generation apparatus, reference may be made to the above limitations of the workflow generation method, which are not described herein again. The modules in the workflow generation apparatus may be implemented in whole or in part by software, hardware, and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a server, the internal structure of which may be as shown in fig. 7. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the computer device is used to store workflow building data. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a workflow generation method.
Those skilled in the art will appreciate that the architecture shown in fig. 7 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, there is provided a computer device comprising a memory storing a computer program and a processor implementing the following steps when the processor executes the computer program: and acquiring a workflow configuration diagram, and extracting workflow elements in the workflow configuration diagram. Extracting node information corresponding to the workflow nodes from the workflow elements, storing the node information in a correlation mode to generate initial configuration files corresponding to the workflow elements, and generating element configuration files according to the initial configuration files. And acquiring an execution code associated with the initial configuration file, and generating an execution file according to the execution code. And associating the execution file with the element configuration file to generate a target configuration file, loading the target configuration file into a workflow generation container, and generating the workflow.
In one embodiment, the processor when executing the computer program implements loading the target configuration file into the workflow generation container, comprising: and inquiring the initialization code segment corresponding to the workflow generation container, and monitoring whether the initialization code segment is triggered. When the initialization code segment is triggered, analyzing the initial configuration file in the target configuration file through the workflow generation container, and analyzing the execution code in the target configuration file. And associating the analyzed initial configuration file with the analyzed execution code to serve as a frame code corresponding to the workflow generation container, and completing the loading of the target configuration file.
In one embodiment, before the processor executes the computer program to parse the initial configuration file from the target configuration file through the workflow generation container and parse the execution code from the target configuration file, the method includes: and when the file format of the target configuration file is detected to be the lightweight language format, acquiring a pre-stored language analysis file. When the processor executes the computer program, the initial configuration file in the target configuration file is analyzed through the workflow generation container, and the execution code in the target configuration file is analyzed, wherein the method comprises the following steps: and generating a container calling language analysis file through the workflow, analyzing an initial configuration file in the target configuration file, and analyzing an execution code in the target configuration file.
In one embodiment, the processor, when executing the computer program, implements obtaining the execution code associated with the initial configuration file and generating an execution file according to the execution code, including: and inquiring the execution mode corresponding to the workflow element in the initial configuration file. And generating an execution code corresponding to the workflow element according to the execution mode. And acquiring an execution sequence corresponding to the workflow elements, and associating the execution codes according to the execution sequence to generate an execution file.
In one embodiment, the processor, when executing the computer program, implements associating the execution file with the element configuration file to generate a target configuration file, comprising: and acquiring a storage path corresponding to each initial configuration file contained in the element configuration file. And associating the execution code corresponding to each initial configuration file with the storage path from the execution file to generate a target configuration file.
In one embodiment, when the processor executes the computer program, the method includes associating the execution file with the element configuration file to generate a target configuration file, loading the target configuration file into a workflow generation container, and after generating the workflow, the method includes: and receiving a workflow execution instruction and calling a driving interface packaged in the workflow framework. And calling a configuration interface in the workflow framework to acquire a target configuration file from the workflow generation container through a driving interface according to the workflow execution instruction. Inquiring a target configuration file acquired from a configuration interface through an execution interface in a workflow frame, inquiring a frame code corresponding to the target configuration file, and executing the frame code to finish the execution of the workflow; . And feeding back the execution state of the execution interface to the terminal.
In one embodiment, the processor when executing the computer program before loading the target configuration file into the workflow generation container comprises: when detecting that the target configuration file carries the type conversion identifier, acquiring a pre-stored conversion logic; and acquiring the file format of the target configuration file, and performing format conversion on the file format of the target configuration file according to the conversion logic.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of: and acquiring a workflow configuration diagram, and extracting workflow elements in the workflow configuration diagram. Extracting node information corresponding to the workflow nodes from the workflow elements, storing the node information in a correlation mode to generate initial configuration files corresponding to the workflow elements, and generating element configuration files according to the initial configuration files. And acquiring an execution code associated with the initial configuration file, and generating an execution file according to the execution code. And associating the execution file with the element configuration file to generate a target configuration file, loading the target configuration file into a workflow generation container, and generating the workflow.
In one embodiment, a computer program that when executed by a processor implements loading of a target configuration file into a workflow generation container, comprising: and inquiring the initialization code segment corresponding to the workflow generation container, and monitoring whether the initialization code segment is triggered. When the initialization code segment is triggered, analyzing the initial configuration file in the target configuration file through the workflow generation container, and analyzing the execution code in the target configuration file. And associating the analyzed initial configuration file with the analyzed execution code to serve as a frame code corresponding to the workflow generation container, and completing the loading of the target configuration file.
In one embodiment, the computer program when executed by the processor, before performing parsing of the initial configuration file in the target configuration file through the workflow generation container and parsing of the execution code in the target configuration file, includes: and when the file format is the lightweight language format, acquiring a pre-stored language analysis file. When the processor executes the computer program, the initial configuration file in the target configuration file is analyzed through the workflow generation container, and the execution code in the target configuration file is analyzed, wherein the method comprises the following steps: and generating a container calling language analysis file through the workflow, analyzing an initial configuration file in the target configuration file, and analyzing an execution code in the target configuration file.
In one embodiment, the computer program when executed by the processor implements obtaining execution code associated with the initial configuration file and generating an execution file from the execution code, comprising: and inquiring the execution mode corresponding to the workflow element in the initial configuration file. And generating an execution code corresponding to the workflow element according to the execution mode. And acquiring an execution sequence corresponding to the workflow elements, and associating the execution codes according to the execution sequence to generate an execution file.
In one embodiment, a computer program that when executed by a processor implements associating an execution file with an element profile to generate a target profile, comprising: and acquiring a storage path corresponding to each initial configuration file contained in the element configuration file. And associating the execution code corresponding to each initial configuration file with the storage path from the execution file to generate a target configuration file.
In one embodiment, a computer program that when executed by a processor implements associating an execution file with an element configuration file to generate a target configuration file, loading the target configuration file into a workflow generation container, and including after generating a workflow. And receiving a workflow execution instruction and calling a driving interface packaged in the workflow framework. And calling a configuration interface in the workflow framework to acquire a target configuration file from the workflow generation container through a driving interface according to the workflow execution instruction. And querying a target configuration file acquired from the configuration interface through an execution interface in the workflow frame, querying a frame code corresponding to the target configuration file, and executing the frame code to finish the execution of the workflow. . And feeding back the execution state of the execution interface to the terminal.
In one embodiment, the computer program when executed by the processor, prior to loading the target configuration file into the workflow generation container, comprises: and when the target configuration file is detected to carry the type conversion identifier, acquiring the pre-stored conversion logic. And acquiring the file format of the target configuration file, and performing format conversion on the file format of the target configuration file according to the conversion logic.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware related to instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above examples only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (14)

1. A workflow generation method, the method comprising:
acquiring a workflow configuration diagram, and extracting workflow elements in the workflow configuration diagram;
extracting node information corresponding to workflow nodes from the workflow elements, storing the node information in a correlation manner to generate an initial configuration file corresponding to the workflow elements, and generating element configuration files according to the initial configuration file;
inquiring an execution mode corresponding to the workflow element in the initial configuration file;
generating an execution code corresponding to the workflow element according to the execution mode;
acquiring an execution sequence corresponding to the workflow elements, and associating the execution codes according to the execution sequence to generate an execution file;
and associating the execution file with the element configuration file to generate a target configuration file, and loading the target configuration file into a workflow generation container to generate a workflow.
2. The method of claim 1, wherein loading the target configuration file into a workflow generation container comprises:
inquiring an initialization code segment corresponding to a workflow generation container, and monitoring whether the initialization code segment is triggered;
when the initialization code segment is triggered, analyzing the initial configuration file in the target configuration file through the workflow generation container, and analyzing the execution code in the target configuration file;
and associating the analyzed initial configuration file with the analyzed execution code to serve as a frame code corresponding to the workflow generation container, and completing the loading of the target configuration file.
3. The method of claim 2, prior to said parsing said initial configuration file in said target configuration file and said executing code in said target configuration file by said workflow generation container, comprising;
when the file format of the target configuration file is detected to be a lightweight language format, acquiring a pre-stored language analysis file;
the analyzing the initial configuration file in the target configuration file and the executing code in the target configuration file by the workflow generation container includes:
and calling the language analysis file through the workflow generation container, analyzing the initial configuration file in the target configuration file, and analyzing the execution code in the target configuration file.
4. The method of claim 1, wherein associating the execution file with the element profile generates a target profile, comprising:
acquiring a storage path corresponding to each initial configuration file contained in the element configuration file;
and associating the execution code corresponding to each initial configuration file with the storage path from the execution file to generate a target configuration file.
5. The method of claim 1, wherein associating the execution file with the element configuration file generates a target configuration file, loading the target configuration file into a workflow generation container, and after generating a workflow, including;
receiving a workflow execution instruction and calling a driving interface packaged in a workflow frame;
calling a configuration interface in the workflow framework to acquire the target configuration file from the workflow generation container through the driving interface according to the workflow execution instruction;
inquiring the target configuration file acquired from the configuration interface through an execution interface in the workflow frame, inquiring a frame code corresponding to the target configuration file, and executing the frame code to finish the execution of the workflow;
and feeding back the execution state of the execution interface to the terminal.
6. The method of claim 1, wherein prior to loading the target configuration file into the workflow generation container, comprising;
when detecting that the target configuration file carries a type conversion identifier, acquiring a pre-stored conversion logic;
and acquiring the file format of the target configuration file, and performing format conversion on the file format of the target configuration file according to the conversion logic.
7. A workflow generation apparatus, characterized in that the apparatus comprises;
the acquisition module is used for acquiring the workflow configuration diagram and extracting workflow elements in the workflow configuration diagram;
the extraction module is used for extracting node information corresponding to workflow nodes from the workflow elements, storing the node information in a correlation mode to generate initial configuration files corresponding to the workflow elements, and generating element configuration files according to the initial configuration files;
the generating module is used for acquiring the execution code associated with the initial configuration file and generating an execution file according to the execution code;
the generation module comprises:
the execution mode query unit is used for querying the execution mode corresponding to the workflow element in the initial configuration file;
the generating unit is used for generating an execution code corresponding to the workflow element according to the execution mode;
the first association unit is used for acquiring an execution sequence corresponding to the workflow elements and associating the execution codes according to the execution sequence to generate an execution file;
and the establishing module is used for associating the execution file with the element configuration file to generate a target configuration file, loading the target configuration file into a workflow generating container and generating a workflow.
8. The apparatus of claim 7, wherein the establishing module comprises:
the system comprises a code segment query unit, a storage unit and a processing unit, wherein the code segment query unit is used for querying an initialization code segment corresponding to a workflow generation container and monitoring whether the initialization code segment is triggered;
the analysis unit is used for analyzing the initial configuration file in the target configuration file through the workflow generation container and analyzing the execution code in the target configuration file when the initialization code segment is triggered;
and the establishing unit is used for associating the analyzed initial configuration file with the analyzed execution code, and the initial configuration file is used as a frame code corresponding to the workflow generation container to finish the loading of the target configuration file.
9. The apparatus of claim 8, wherein the establishing module comprises;
the file query unit is used for acquiring a pre-stored language analysis file when the file format of the target configuration file is detected to be a lightweight language format;
the analysis unit includes:
and the analysis subunit is used for calling the language analysis file through the workflow generation container, analyzing the initial configuration file in the target configuration file, and analyzing the execution code in the target configuration file.
10. The apparatus of claim 8, wherein the establishing module comprises:
an obtaining unit, configured to obtain a storage path corresponding to each initial configuration file included in the element configuration file;
and the second association unit is used for associating the execution code corresponding to each initial configuration file with the storage path from the execution file to generate a target configuration file.
11. The apparatus of claim 8, wherein the workflow generation apparatus comprises;
the receiving module is used for receiving the workflow execution instruction and calling a driving interface packaged in the workflow frame;
the calling module is used for calling a configuration interface in the workflow frame to acquire the target configuration file from the workflow generation container according to the workflow execution instruction through the driving interface;
the execution module is used for inquiring the target configuration file acquired from the configuration interface through an execution interface in the workflow frame, inquiring a frame code corresponding to the target configuration file, and executing the frame code to finish the execution of the workflow;
and the feedback module is used for feeding back the execution state of the execution interface to the terminal.
12. The apparatus of claim 8, wherein the workflow generation apparatus comprises;
a second obtaining module, configured to obtain a pre-stored conversion logic when it is detected that the target configuration file carries the type conversion identifier;
and the conversion module is used for acquiring the file format of the target configuration file and converting the file format of the target configuration file according to the conversion logic.
13. A computer device comprising a memory and a processor, the memory storing a computer program, wherein the processor implements the steps of the method of any one of claims 1 to 6 when executing the computer program.
14. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 6.
CN201910455976.0A 2019-05-29 2019-05-29 Workflow generation method and device, computer equipment and storage medium Active CN111142933B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910455976.0A CN111142933B (en) 2019-05-29 2019-05-29 Workflow generation method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910455976.0A CN111142933B (en) 2019-05-29 2019-05-29 Workflow generation method and device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111142933A CN111142933A (en) 2020-05-12
CN111142933B true CN111142933B (en) 2020-11-27

Family

ID=70516724

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910455976.0A Active CN111142933B (en) 2019-05-29 2019-05-29 Workflow generation method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111142933B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113918138A (en) * 2020-07-09 2022-01-11 阿里巴巴集团控股有限公司 Flow processing method and device and computer system
CN112035367B (en) * 2020-09-02 2023-08-18 中国银行股份有限公司 Method and system for checking workflow correctness of big data platform
CN112416476B (en) * 2020-11-25 2023-03-24 武汉联影医疗科技有限公司 Workflow execution method and device, computer equipment and storage medium
CN112597741A (en) * 2020-12-14 2021-04-02 北京中电普华信息技术有限公司 Data adaptation method and device
CN112631675A (en) * 2020-12-18 2021-04-09 平安普惠企业管理有限公司 Workflow configuration method, device, equipment and computer readable storage medium
CN114880015B (en) * 2021-07-26 2023-04-18 深圳前海微众银行股份有限公司 Task configuration method, device, equipment and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101620528A (en) * 2008-06-30 2010-01-06 上海全成通信技术有限公司 Method for structuring workflow system based on XPDL
US8341590B1 (en) * 2007-12-12 2012-12-25 Accurev, Inc. System for relating workflow status to code component status in a software project

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8381181B2 (en) * 2007-08-31 2013-02-19 International Business Machines Corporation Updating a workflow when a user reaches an impasse in the workflow
US20130152021A1 (en) * 2011-12-09 2013-06-13 Microsoft Corporation Stage and stage view within a workflow
CN103218706B (en) * 2013-03-20 2016-03-02 深圳市赛为智能股份有限公司 Workflow document generating method and equipment, generation manner of execution and system
CN103761111A (en) * 2014-02-19 2014-04-30 中国科学院软件研究所 Method and system for constructing data-intensive workflow engine based on BPEL language
CN108762764A (en) * 2018-06-05 2018-11-06 中国平安人寿保险股份有限公司 Code automatic generation method, device, computer equipment and storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8341590B1 (en) * 2007-12-12 2012-12-25 Accurev, Inc. System for relating workflow status to code component status in a software project
CN101620528A (en) * 2008-06-30 2010-01-06 上海全成通信技术有限公司 Method for structuring workflow system based on XPDL

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
写一份gulp常用配置文件,构建前端工作流;葡萄干是个程序员;《https://blog.csdn.net/qq_15096707/article/details/54293203》;20170109;1-37 *

Also Published As

Publication number Publication date
CN111142933A (en) 2020-05-12

Similar Documents

Publication Publication Date Title
CN111142933B (en) Workflow generation method and device, computer equipment and storage medium
CN109933522B (en) Test method, test system and storage medium for automatic case
CN109460527B (en) Product data configuration method, device, computer equipment and storage medium
CN109474578B (en) Message checking method, device, computer equipment and storage medium
CN109683988B (en) Micro services start method, apparatus, computer equipment and storage medium
US10289524B2 (en) Workflow test case generation
CN110636106B (en) Information pushing method and device, computer equipment and storage medium
CN107241315B (en) Access method and device of bank gateway interface and computer readable storage medium
CN111027295A (en) Data processing method, data processing device, computer equipment and storage medium
CN110780870B (en) Service execution method, device, equipment and storage medium
CN110503385B (en) Service processing method, device, computer equipment and storage medium
CN110633160A (en) Interface calling method and device, computer equipment and storage medium
CN108965375B (en) Service call proxy control system, method, server and readable storage medium
CN110413507B (en) System test method, device, computer equipment and storage medium
CN110727581B (en) Crash positioning method and electronic equipment
CN112491659B (en) Flow playback test method and device, computer equipment and storage medium
CN109325058B (en) Rule batch comparison method, device, computer equipment and storage medium
CN107861765B (en) Product configuration method, apparatus, and computer-readable storage medium
CN111831365A (en) Interface route forwarding method, system, computer equipment and readable storage medium
CN112487163B (en) Execution method of automatic flow and method and device for acquiring interface data of execution method
CN110362309B (en) Front-end project development method, device, equipment and computer readable storage medium
CN110865943A (en) Interface testing method and device, computer equipment and storage medium
US20090210887A1 (en) Radio frequency identification business-aware framework
CN113157754B (en) Method, device and equipment for displaying flow form data and storage medium
KR20190132789A (en) Apparatus and method for providing an application service of agricultural products, and method for controlling an integrated event of famhouses

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