Embedding method of external system, workflow system, device and storage medium
By loading the loading instructions of the external system into the workflow system, and generating front-end controls using the node type table and parameter configuration table, the embedding of the external system is realized. The data interaction and scheduling problems between the external system and the workflow system are solved by using the IFrame tag and the Linkis client, which reduces the difficulty of adding new nodes and improves embedding efficiency and system security.
Patent Information
- Application Number
- CN201911110030.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-11-13
- Publication Date
- 2026-02-10
- Estimated Expiration
- 2039-11-13
AI Technical Summary
Adding workflow nodes corresponding to external systems to a workflow system is difficult, and existing scheduling systems have failed to effectively solve the data interaction and scheduling problems between external systems and workflow systems.
By loading the loading instructions of the external system into the front-end subsystem of the workflow system, and using the preset node type table and parameter configuration table, front-end controls are generated. The external system is embedded into the system as a workflow node, and cross-domain communication between the child page and the parent page is realized through the IFrame tag to obtain security authentication information and standard interfaces. The Linkis client is then used to execute tasks.
It reduces the difficulty of adding corresponding workflow nodes from external systems to the workflow system, improves embedding efficiency, simplifies data interaction and chart creation processes, and enhances system security and scheduling execution capabilities.
Smart Images

Figure CN110874278B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of big data technology in financial technology (Fintech), and more particularly to an embedding method, workflow system, device, and storage medium for an external system. Background Technology
[0002] With the development of computer technology, more and more technologies are being applied in the financial field. The traditional financial industry is gradually transforming into financial technology (Fintech), and big data technology is no exception. However, due to the security and real-time requirements of the financial industry, higher demands are being placed on the technology.
[0003] In the field of big data, complex business data processing scenarios, especially in offline batch computing and report processing, all rely on resolving the intricate dependencies within the data processing workflow. Therefore, job execution requires unified management and scheduling. Currently, distributed visual DAG (Database Availability Group) workflow task scheduling systems are commonly used. Popular scheduling systems include Azkaban and Airflow. Azkaban is a batch workflow task scheduler open-sourced by LinkedIn; Airflow is a programmable, scheduled, and monitored workflow platform based on a Directed Acyclic Graph (DAG). Airflow can define a group of dependent tasks and execute them sequentially according to their dependencies. Both support connecting workflows according to task dependencies using a DAG graph for distributed scheduling and execution. However, current scheduling systems focus on addressing issues such as dependency execution, concurrent execution, and scheduled execution. Since current business processing involves multiple aspects of data processing, including data import, data anonymization, data quality checks, data ETL (Extract-Transform-Load), data visualization, and data outflow, each stage is handled by a dedicated system. Therefore, adding a new type of workflow node to the workflow system requires extensive development of both the front-end and back-end subsystems.
[0004] Therefore, it is currently difficult to add workflow nodes corresponding to external systems in a workflow system. Summary of the Invention
[0005] The main objective of this invention is to provide a method for embedding external systems, a workflow system, a device, and a storage medium, aiming to solve the technical problem of the difficulty in adding workflow nodes corresponding to external systems to existing workflow systems.
[0006] To achieve the above objectives, the present invention provides an embedding method for an external system, the embedding method comprising the following steps:
[0007] When a loading instruction from an external system is detected in the front-end subsystem of the workflow system, the node type of the workflow node corresponding to the loading instruction is determined through a preset node type table.
[0008] The node parameters of the workflow node are obtained from the preset parameter configuration table according to the node type.
[0009] Based on the node parameters, a front-end control for the workflow node is generated in the front-end subsystem to embed the external system as a workflow node into the workflow system.
[0010] Preferably, after the step of generating the front-end control of the workflow node in the front-end subsystem according to the node parameters to embed the external system as a workflow node into the workflow system, the method further includes:
[0011] When a startup command to launch the external system subpage is detected in the workflow node, the Uniform Resource Locator (URL) address of the subpage is obtained, as well as the startup parameters corresponding to the startup command are obtained.
[0012] A transmission request is generated based on the URL address and the startup parameters, and the transmission request is set in a text tag to enable communication between the subpage and the parent page of the workflow system through the text tag.
[0013] Preferably, after the step of generating a transmission request based on the URL address and the startup parameters, and setting the transmission request in a text tag to enable communication between the subpage and the parent page of the workflow system through the text tag, the method further includes:
[0014] When a message transmission instruction for cross-domain message sending using the text tag is detected between the parent page and the child page, the message to be transmitted corresponding to the message transmission instruction is obtained through the parent page.
[0015] The message to be transmitted is assembled into a transmission message of a preset format and sent to the subpage.
[0016] Preferably, after the step of generating a transmission request based on the URL address and the startup parameters, and setting the transmission request in a text tag to enable communication between the subpage and the parent page of the workflow system through the text tag, the method further includes:
[0017] When a design instruction for chart design is detected on the subpage, the setting parameters corresponding to the design instruction are obtained;
[0018] The chart is set according to the settings parameters, and the settings parameters are stored as a Kanban task so that the settings parameters can be displayed on the parent page through the Kanban task.
[0019] Preferably, after the step of generating the front-end control of the workflow node in the front-end subsystem according to the node parameters to embed the external system as a workflow node into the workflow system, the method further includes:
[0020] Upon detecting an access request to the external system, the security authentication information of the external system is obtained from the back-end subsystem of the workflow system.
[0021] The security authentication information is added to the access request, and the access request carrying the security authentication information is sent to the external system so that the external system can determine the legitimacy of the access request based on the security authentication information in the access request.
[0022] Preferably, after the step of generating the front-end control of the workflow node in the front-end subsystem according to the node parameters to embed the external system as a workflow node into the workflow system, the method further includes:
[0023] Obtain the standard interface of the back-end subsystem of the workflow system that interfaces with the external system, and obtain the interface information of the external system through the front-end subsystem;
[0024] Workflow tasks are created in the external system through the front-end subsystem, based on the standard interface and the interface information.
[0025] Preferably, after the step of generating the front-end control of the workflow node in the front-end subsystem according to the node parameters to embed the external system as a workflow node into the workflow system, the method further includes:
[0026] Once an execution instruction corresponding to the workflow node of the external system is detected, the scheduling system corresponding to the execution instruction is determined.
[0027] The tasks of the workflow nodes are transformed according to the scheduling format of the scheduling system to obtain transformed tasks to be executed. The transformed tasks to be executed are then sent to the Linkis client through the scheduling system so that the Linkis client can execute the transformed tasks to be executed.
[0028] Preferably, before the step of determining the node type of the workflow node corresponding to the loading instruction through a preset node type table after detecting a loading instruction from an external system in the front-end subsystem of the workflow system, the method further includes:
[0029] When an embedding instruction for embedding a corresponding workflow node of an external system is detected in the workflow system, the node type of the workflow node is added to the node type table, and the node parameters of the workflow node are added to the parameter configuration table.
[0030] Furthermore, to achieve the above objectives, the present invention also provides a workflow system, the workflow system comprising:
[0031] The determination module is used to determine the node type of the workflow node corresponding to the loading instruction by means of a preset node type table after detecting a loading instruction of an external system in the front-end subsystem of the workflow system.
[0032] The acquisition module is used to acquire the node parameters of the workflow node from a preset parameter configuration table according to the node type.
[0033] A generation module is used to generate a front-end control for the workflow node in the front-end subsystem according to the node parameters, so as to embed the external system as a workflow node into the workflow system.
[0034] Furthermore, to achieve the above objectives, the present invention also provides an embedding device for an external system, the embedding device for the external system including a memory, a processor, and an embedding program for the external system stored in the memory and executable on the processor, wherein the embedding program for the external system, when executed by the processor, implements the steps of the embedding method for the external system as described above.
[0035] In addition, to achieve the above objectives, the present invention also provides a computer-readable storage medium storing an embedding program for an external system, wherein the embedding program for the external system, when executed by a processor, implements the steps of the embedding method for the external system as described above.
[0036] This invention, upon detecting a loading command for an external system in the front-end subsystem of a workflow system, determines the node type of the workflow node corresponding to the loading command using a preset node type table. Based on the node type, it retrieves the node parameters of the workflow node from a preset parameter configuration table. Then, based on these node parameters, it generates a front-end control for the workflow node in the front-end subsystem, embedding the external system as a workflow node into the workflow system. This eliminates the need for extensive modifications to the front-end and back-end subsystems when adding workflow nodes for external systems; only the node parameters of the corresponding workflow node need to be obtained. This reduces the difficulty of adding workflow nodes for external systems within the workflow system and improves the efficiency of doing so. Attached Figure Description
[0037] Figure 1 This is a flowchart illustrating the first embodiment of the embedding method for the external system of the present invention;
[0038] Figure 2 This is a flowchart illustrating the second embodiment of the embedding method for the external system of the present invention;
[0039] Figure 3 This is a flowchart illustrating the third embodiment of the embedding method for the external system of the present invention;
[0040] Figure 4 This is a functional schematic diagram of a preferred embodiment of the workflow system of the present invention.
[0041] Figure 5 This is a schematic diagram of the hardware operating environment involved in the embodiments of the present invention.
[0042] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0043] It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
[0044] This invention provides a method for embedding an external system, referring to... Figure 1 , Figure 1 This is a flowchart illustrating the first embodiment of the embedding method for the external system of the present invention.
[0045] This invention provides an embodiment of an embedding method for an external system. It should be noted that although the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than that shown here.
[0046] Embedding methods for external systems include:
[0047] Step S10: After detecting a loading instruction from an external system in the front-end subsystem of the workflow system, the node type of the workflow node corresponding to the loading instruction is determined by a preset node type table.
[0048] In this embodiment of the invention, the workflow system leverages the powerful aggregation capabilities of Linkis's backend computing engine, as well as Linkis's task management, resource management and isolation, task scheduling and execution features, result set and log processing capabilities, to easily integrate external systems into a single workflow for real-time execution and scheduling. Linkis is a data middleware that connects multiple computing and storage engines, provides a unified interface, and submits and executes scripts such as SQL (Structured Query Language), PySpark, HiveQL, and Scala. The workflow system includes a front-end subsystem and a back-end subsystem. The front-end subsystem is used to create workflow nodes corresponding to external systems and handle the interaction between the workflow system page and the external system page. For ease of distinction, the workflow system page is referred to as the parent page, and the external system page as the child page. In the back-end subsystem, a node type table and a node parameter attribute table are set up. The node type table is used to store the node type of each workflow node, and the node parameter attribute table is used to store the node parameters of different types of workflow nodes. Node types include data exchange nodes, data development nodes, data visualization nodes, data output nodes, signal nodes, and functional nodes, etc. Node parameters include, but are not limited to, node startup parameters, memory size of the external system corresponding to the node, number of CPUs (central processing units) in the external system corresponding to the node, node parameter name, parameter type, parameter value range, parameter validation rules, and whether the corresponding field is required. Parameter types include, but are not limited to, character and numeric types. The node parameters corresponding to different types of workflow nodes may be the same or different.
[0049] After the current subsystem detects a loading command for an external system, it determines the node type of the workflow node corresponding to the loading command from a pre-defined node type table in the back subsystem. The workflow node corresponding to the loading command is the workflow node corresponding to the external system. Once the external system is successfully embedded into the workflow system, it exists as a workflow node within the workflow system. The loading command can be triggered by the user as needed or by the workflow system itself. It should be noted that the loading command carries the external system's identification information. This identification information, which can be the external system name or a unique identifier, can be used to determine the node type of the workflow node corresponding to the loading command in the node type table. Specifically, this loading command can be a page refresh command.
[0050] Furthermore, the embedding method for external systems includes:
[0051] Step a: After detecting the embedding instruction of the corresponding workflow node of the external system in the workflow system, add the node type of the workflow node to the node type table and add the node parameters of the workflow node to the parameter configuration table.
[0052] Furthermore, when the front-end subsystem of the workflow system detects an embedding instruction for an external system as a workflow node, it sends the embedding instruction to the back-end subsystem. The back-end subsystem then obtains the node type and parameters of the workflow node corresponding to the external system based on this embedding instruction, adds the node type of the corresponding workflow node to the node type table, and adds the node parameters to the parameter configuration table. It should be noted that the node type of the workflow node corresponding to the external system is determined by the functions that the external system can perform. For an external system to be embedded as a workflow node into the workflow system, it must first register with the workflow system. During the registration process, the workflow system can obtain relevant data from the external system and determine the node type of the workflow node corresponding to the external system based on this data. This relevant data includes, but is not limited to, the external system's system name, security authentication information, and the functions it can perform. The security authentication information includes at least one of the following: cookie content and token content. Cookies are "small text files" that are data (usually encrypted) stored on a user's local terminal by some websites to identify the user and track sessions. They are information that is temporarily or permanently stored by the user's client computer.
[0053] Step S20: Obtain the node parameters of the workflow node from the preset parameter configuration table according to the node type.
[0054] Once the node type of the workflow node corresponding to the external system is determined, the front-end subsystem retrieves the node parameters of the corresponding workflow node from the parameter configuration table in the back-end subsystem based on this node type. Specifically, after detecting a load command, the front-end subsystem sends the load command to the back-end subsystem. The back-end subsystem determines the node type of the workflow node corresponding to the external system from the node type table based on the load command, then retrieves the node parameters corresponding to this node type from the pre-set parameter configuration table to obtain the node parameters of the workflow node corresponding to the external system, and finally returns these node parameters to the front-end subsystem.
[0055] Step S30: Generate a front-end control for the workflow node in the front-end subsystem according to the node parameters, so as to embed the external system as a workflow node into the workflow system.
[0056] After the current subsystem obtains the node parameters, the front-end subsystem generates a front-end control for the corresponding workflow node of the external system based on these parameters, thus embedding the external system as a workflow node into the workflow system. It should be noted that once the front-end control for the corresponding workflow node of the external system is generated, it indicates that the external system has become a workflow node in the workflow system. Furthermore, the front-end subsystem can generate a list of selectable nodes based on the node parameters in the parameter configuration table. Users can select the corresponding node parameters from this list, and the front-end subsystem dynamically loads the selected node parameters, embedding the external system as a workflow node into the workflow system.
[0057] It should be noted that in this embodiment, the workflow system essentially modifies the front-end subsystem through SQL configuration, embedding external systems as workflow nodes into the workflow system. Specifically, the workflow system sets up a template for adding workflow nodes via SQL. When an external system needs to be embedded as a workflow node, the front-end subsystem adds the obtained node parameters to the corresponding position in the template, thus embedding the external system as a workflow node. Therefore, this embodiment hides the complex logic of SQL implementation, allowing even users who do not use SQL to easily embed external systems as workflow nodes into the workflow system.
[0058] This embodiment detects a loading command for an external system in the front-end subsystem of the workflow system, determines the node type of the workflow node corresponding to the loading command through a preset node type table, and obtains the node parameters of the workflow node from a preset parameter configuration table based on the node type. Based on the node parameters, a front-end control for the workflow node is generated in the front-end subsystem to embed the external system as a workflow node into the workflow system. This eliminates the need for extensive modifications to the front-end and back-end subsystems of the workflow system when adding workflow nodes for external systems; only the node parameters of the corresponding workflow nodes need to be obtained. This reduces the difficulty of adding workflow nodes for external systems to the workflow system and improves the efficiency of doing so.
[0059] Furthermore, a second embodiment of the embedding method for the external system of the present invention is proposed.
[0060] The difference between the second embodiment of the external system embedding method and the first embodiment of the external system embedding method is that, referring to... Figure 2 The embedding method of the external system further includes:
[0061] Step S40: After detecting the startup command of the external system subpage in the workflow node, obtain the Uniform Resource Locator (URL) address of the subpage and the startup parameters corresponding to the startup command.
[0062] When the workflow system detects a start command to launch a subpage of an external system within a corresponding workflow node, the system obtains the subpage's URL (Uniform Resource Locator) address and the start parameters corresponding to the start command. These start parameters include, but are not limited to, the subpage's display method, page size, page layout parameters, and the business parameters displayed on the subpage. Business parameters include, but are not limited to, the project number corresponding to the content displayed on the subpage, the user information of the user corresponding to the subpage, the node name of the workflow node, and the task identifier corresponding to the workflow node. User information can be a username or user ID, and the project number is the project code or project ID corresponding to the content displayed on the subpage. It is understood that the start command can be triggered by the user according to specific needs or by a scheduled task within the workflow system.
[0063] Step S50: Generate a transmission request based on the URL address and the startup parameters, and set the transmission request in a text tag to enable communication between the subpage and the parent page of the workflow system through the text tag.
[0064] Once the workflow system obtains the URL address and startup parameters, it concatenates these parameters into a transmission request according to a preset format. In other words, it generates a transmission request based on the URL address and startup parameters. This embodiment does not limit the specific form of the concatenation format; for example, the URL address can be placed first, followed by the startup parameters. Specifically, in this embodiment, the transmission request can be an HTTP (Hypertext Transfer Protocol) request. It is understood that in other embodiments, the URL address and startup parameters can also be concatenated into requests corresponding to other transmission protocols.
[0065] Once the workflow system generates a transmission request, it sets the transmission request in a text tag to enable communication between the child page and the parent page of the workflow system. The text tag is an IFrame tag, which is an HTML (Hypertext Markup Language) tag. An IFrame is a document within a document, or a floating frame. An IFrame element creates an inline frame (i.e., an inline frame) containing another document. It's important to note that the IFrame tag allows a child page from an external system to be used as a workflow node in the workflow system, enabling communication between the parent and child pages. During communication between the parent and child pages, the IFrame tag is used to send messages across domains. Cross-domain communication occurs when the protocol, domain, or port of a request URL differs from the current page's URL. This embodiment primarily uses the `window.postMessage` method to address the issue of sending messages across domains.
[0066] Furthermore, the embedding method of the external system also includes:
[0067] Step b: After detecting a message transmission instruction for cross-domain message sending using the text tag between the parent page and the child page, the message to be transmitted corresponding to the message transmission instruction is obtained through the parent page.
[0068] Furthermore, when the parent page of the workflow system and the child page of the external system communicate via IFrame, the workflow system detects whether it detects a message transmission instruction for cross-domain message sending using the aforementioned text tag between the parent and child pages. Upon detecting this message transmission instruction, the workflow system retrieves the message to be transmitted corresponding to the message transmission instruction from the parent page. It should be noted that the message to be transmitted includes the project number, user information, the node name of the workflow node corresponding to the child page, and the task identifier of the task corresponding to the message to be transmitted.
[0069] Step c: Assemble the message to be transmitted into a transmission message of a preset format and send it to the subpage.
[0070] Once the workflow system receives the message to be transmitted, it assembles it into a pre-formatted transmission message and sends it to the child page. Specifically, the workflow system assembles the message into JSON (JavaScript Object Notation) format and sends it to the child page. It should be noted that the parent page detects message transmission commands through message listening and transmits the message content of the transmission commands in JSON format, i.e., it transmits the message to be transmitted in JSON format. The message structure of the message to be transmitted is pre-agreed upon by the workflow system and the external system. This embodiment uses JSON format for message transmission, taking advantage of JSON's simplicity, applicability, and good compatibility; JSON is compatible with older versions of Internet Explorer. When the workflow system receives a request from the child page to retrieve the JSON-formatted message to be transmitted via the parent page, the workflow system retrieves the corresponding message according to the request, converts it into JSON format, and places it in a fixed parameter position in a pre-defined callback function to send the JSON-formatted message to the child page, thus sending the JSON-formatted message to the external system and enabling communication between the external system and the workflow system.
[0071] Furthermore, a message sending function is added to the subpage of the external system. Specifically, a click event for the save button is set in the subpage of the external system, and a message sending function is called in the click event method. The message is sent to the parent page of the workflow system using the `window.parent.postMessage` method. During the process of the external system saving data through the save button on the subpage, the subpage sends key information of the stored data to the workflow system. Specifically, it sends this information to the front-end subsystem of the workflow system. This key information includes, but is not limited to, the task identifier, node name, and project number corresponding to the task stored in the external system. It should be noted that the external system only sends key information to the front-end subsystem of the workflow system through the subpage; other relevant information can be obtained when the corresponding task is executed. This reduces the amount of data transferred between the external system and the workflow system, simplifies the content of the data transmitted between them, and allows complex task definitions to be completed in the external system without requiring the workflow system to perform complex task definition operations.
[0072] This embodiment solves the problem of data interaction between the subpages of an external system and the parent page of the workflow system after the external system is embedded as a workflow node. In addition to directly embedding the subpages of the external system into the workflow system, the workflow system can also send messages to the external system, and the external system can also send messages to the workflow system. By using the external system as a workflow node in the workflow system, the data processing and analysis processes in the external system are made clearer, enabling the corresponding developers to complete the development of the entire business process in the visual workflow system. This avoids developers repeatedly logging into different external systems to design the business logic of the business process, reduces the difficulty of business process development for developers, and improves the design efficiency of business logic for developers.
[0073] Furthermore, the embedding method of the external system also includes:
[0074] Step d: After detecting a design instruction for chart design on the subpage, obtain the setting parameters corresponding to the design instruction.
[0075] When the workflow system detects a design instruction for chart design on a subpage, it retrieves the corresponding setting parameters from the subpage. These parameters include the data source for the chart, the chart name, the chart's display style, color scheme, and chart size. Display styles include, but are not limited to, bar charts, tables, and radar charts. In this embodiment, the chart corresponding to the design instruction is a visual chart. Specifically, users can trigger design instructions from subpages of external systems embedded in the workflow system.
[0076] Step e: Set the chart according to the setting parameters and store the setting parameters as a Kanban task so that the setting parameters can be displayed on the parent page through the Kanban task.
[0077] Once the workflow system obtains the setting parameters corresponding to the design instructions, it sets up a chart on the subpage based on these parameters and stores the settings as a Kanban task. The Kanban task is then sent to the parent page to display the setting parameters. It should be noted that the Kanban task can display relevant information about the set chart on the parent page, specifically in list format. The subpage also uses an iframe for cross-domain communication, sending the Kanban task as a string to the parent page, where the string is in JSON format. In this embodiment, the user only needs to perform corresponding operations on the external system. The external system saves the user's operation information and then sends the core information from this information to the workflow system's parent page. When executing the corresponding task, the workflow system returns the core information to the external system, allowing the external system to execute the corresponding task based on this core information. This core information identifies the specific task being performed.
[0078] This embodiment uses an Iframe to enable the creation of visual charts within the workflow system using an external system. Since the external system is embedded as a workflow node during the chart creation process, users do not need to log in to the corresponding external system to create charts. Chart creation can be performed directly within the workflow system, simplifying the difficulty of chart creation and improving its efficiency.
[0079] Furthermore, a third embodiment of the embedding method for the external system of the present invention is proposed.
[0080] The difference between the third embodiment of the external system embedding method and the first and / or second embodiments of the external system embedding method is that, referring to Figure 3 The embedding method of the external system further includes:
[0081] Step S60: After detecting an access request to the external system, obtain the security authentication information of the external system from the back-end subsystem of the workflow system.
[0082] Step S70: Add the security authentication information to the access request, and send the access request carrying the security authentication information to the external system so that the external system can determine the legitimacy of the access request based on the security authentication information in the access request.
[0083] When the workflow system detects an access request to an external system, it retrieves the external system's security authentication information from its backend subsystems and adds this information to the access request. The access request can be triggered by the user within the workflow system or the external system as needed. The security authentication information is pre-stored in the backend subsystems. It's important to note that the access request includes the name of the external system; this name allows the backend subsystem to retrieve the external system's security authentication information.
[0084] After security authentication information is added to the access request, the workflow system sends the access request carrying the security authentication information to the external system. When the external system receives the access request, it retrieves the security authentication information from the request and compares it with pre-stored security authentication information. If the retrieved security authentication information matches the stored information, the external system determines the access request is valid and executes it; if the retrieved security authentication information does not match the stored information, the external system determines the access request is invalid and does not execute it. It should be noted that the communication between the external system and the workflow system is essentially the communication between the external system's sub-page and the workflow system's parent page.
[0085] This embodiment ensures the security of the external system's execution of the workflow system's access request process by using security authentication information to guarantee the legitimacy of the access request sent by the workflow system during the communication process between the external system and the workflow system.
[0086] Furthermore, the embedding method of the external system also includes:
[0087] Step f: Obtain the standard interface of the back-end subsystem of the workflow system that interfaces with the external system, and obtain the interface information of the external system through the front-end subsystem.
[0088] The workflow system obtains the standard interfaces for connecting to external systems from the backend subsystems and acquires the interface information of the external systems through the frontend subsystems. It should be noted that the external systems need to perform tasks such as quality inspection, data export, and data analysis, and each task needs to be defined in its corresponding external system. Therefore, external systems typically have interfaces such as login, task creation, task update, and task deletion. During task execution, the external systems also need to obtain the task execution status, and the workflow system sends the task execution results and logs to the external systems. The implementation of these functions also requires corresponding interfaces. Thus, in the external system, each interface has its own required functionality and corresponding return data type. In this embodiment, to simplify the complexity of the frontend subsystem calling the external system, the backend subsystem standardizes the various interfaces corresponding to the external system, uniformly defining the standard interfaces for connecting to external systems, such as the unified definition of the login, task creation, task update, and task deletion interfaces in the backend subsystem. Interface information includes, but is not limited to, the URL address of the external system, the node name of the corresponding workflow node, and interface parameters. The interface parameters determine which interface is being used.
[0089] Step g: Create a workflow task in the external system through the front-end subsystem, based on the standard interface and the interface information.
[0090] Once the standard interface and interface information for interfacing with external systems are obtained, the workflow system retrieves the corresponding interface code from the backend subsystem. It then writes the interface information into the appropriate location within the interface code, resulting in a callable interface. At this point, the frontend subsystem can create workflow tasks in the external system using this callable interface. It's important to note that in the workflow system's backend subsystem, each standard interface has a corresponding pre-defined interface code. To use it, simply write the corresponding interface information into the pre-defined interface code.
[0091] This embodiment defines a standard interface for interfacing with external systems in the back-end subsystem of the workflow system. This eliminates the need for the front-end subsystem to handle special calls to workflow nodes for each external system when interfacing with them. Instead, it uses the interface code of the standard interface in the back-end subsystem to connect to external systems. Since the data capabilities of the front-end subsystem are weaker than those of the back-end subsystem, designing the standard interface in the back-end subsystem is less difficult than handling calls to workflow nodes for external systems through the front-end subsystem. This reduces the difficulty for the front-end subsystem to call external systems. By adding an interface framework for interfacing with external systems to the back-end subsystem, the front-end subsystem avoids directly corresponding to the interfaces of various external systems, thus enabling calls to external systems without modifying the code of the front-end subsystem.
[0092] Furthermore, a fourth embodiment of the embedding method for the external system of the present invention is proposed.
[0093] The fourth embodiment of the external system embedding method differs from the first, second, and / or third embodiments of the external system embedding method in that the external system embedding method further includes:
[0094] Step h: After detecting the execution instruction of the corresponding workflow node of the external system, determine the scheduling system corresponding to the execution instruction.
[0095] After successfully embedding an external system as a workflow node into the workflow system, the workflow system checks whether it detects an execution command for the corresponding workflow node of the external system. If an execution command is detected, the workflow system determines the scheduling system corresponding to the execution command. This execution command can be a real-time execution command or a scheduled execution command. When the execution command is a scheduled execution command, the task of the workflow node corresponding to the external system needs to be published to the corresponding scheduling system for scheduled execution. It should be noted that the execution command carries a scheduling identifier for the corresponding scheduling system; this identifier allows the determination of the scheduling system corresponding to the execution command.
[0096] Step i: Convert the tasks of the workflow node according to the scheduling format of the scheduling system to obtain the converted tasks to be executed, and send the converted tasks to be executed to the Linkis client through the scheduling system so that the converted tasks to be executed can be executed through the Linkis client.
[0097] Once the workflow system determines the scheduling system corresponding to the execution instruction, it transforms the tasks of the workflow nodes according to the scheduling format of the scheduling system, resulting in transformed tasks to be executed. It should be noted that each scheduling system has its own input format; therefore, to send tasks from external systems to the scheduling system, the tasks need to be formatted. The specific transformation method is determined by the scheduling system and will not be detailed in this embodiment. After obtaining the transformed tasks, the workflow system sends them to the scheduling system, which then sends them to the Linkis client for execution. Specifically, regardless of whether the execution instruction is a real-time execution instruction or a scheduled execution instruction, the Linkis client determines whether the node corresponding to the task is a workflow node of an external system or the original node of the workflow system through the system identifier in the task. The original node of the workflow system is the native node of the workflow system. If the Linkis client determines that the node corresponding to the task to be executed is the original node of the workflow system, the Linkis client submits the task to its execution engine for execution. If the Linkis client determines that the node corresponding to the task to be executed is a workflow node of an external system, the Linkis client determines the node type of the workflow node and then sends the task to the external system corresponding to the determined node type for execution. After the external system completes the execution of the task, it generates and returns the execution result.
[0098] If the scheduling system is Azkaban, the workflow system needs to convert the tasks of the corresponding workflow nodes in the external system into job files, compress these job files into a compressed archive, and send the archive to the Azkaban system. The Azkaban system parses the archive into a task flow, schedules it according to a Directed Acyclic Graph (DAG), and submits it to the Linkis client's backend External Entrance using an Azkaban plugin that wraps the Linkis client. The External Entrance then sends the task flow to the external system, which is responsible for parsing and executing the corresponding tasks. The compressed archive can be in zip or RAR (Roshal Archive) format. Specifically, the Linkis client can identify the system name of the external system executing the corresponding task from the compressed archive. Based on this system name, the corresponding external system can be determined. The Linkis client can identify the system name by Job Type; one workflow node corresponds to one Node type.
[0099] It should be noted that this embodiment implements the execution of external system workflow node tasks through the Linkis client, leveraging Linkis client's system-level and user-level multi-tenant isolation, concurrency rate limiting, and context sharing capabilities. When an external system needs to access Linkis to execute tasks, it only needs to implement the ExternalEntrance interface in the Linkis client's backend to enable external system access. The Linkis client's ExternalEntrance provides a Context class, allowing external system workflow nodes to share variables and parameters with other external system workflow nodes during the execution of their corresponding tasks.
[0100] This embodiment leverages Linkis's system-level and user-level multi-tenant isolation, concurrency rate limiting, and context sharing capabilities to provide a unified execution entry point for the interaction between the workflow system and external systems, thereby reducing the difficulty of interaction between the workflow system and external systems.
[0101] In addition, refer to Figure 4 The present invention also provides a workflow system, the workflow system comprising:
[0102] The determination module 10 is used to determine the node type of the workflow node corresponding to the loading instruction by means of a preset node type table after detecting a loading instruction of an external system in the front-end subsystem of the workflow system.
[0103] The acquisition module 20 is used to acquire the node parameters of the workflow node from a preset parameter configuration table according to the node type;
[0104] The generation module 30 is used to generate a front-end control for the workflow node in the front-end subsystem according to the node parameters, so as to embed the external system as a workflow node into the workflow system.
[0105] Furthermore, the acquisition module 20 is also used to acquire the Uniform Resource Locator (URL) address of the subpage and the startup parameters corresponding to the startup command after detecting a startup command to launch the external system subpage in the workflow node;
[0106] The generation module 30 is also configured to generate a transmission request based on the URL address and the startup parameters;
[0107] The workflow system also includes:
[0108] The setting module is used to set the transmission request into a text tag so as to realize communication between the subpage and the parent page of the workflow system through the text tag.
[0109] Furthermore, the acquisition module 20 is also used to acquire the message to be transmitted corresponding to the message transmission instruction through the parent page after detecting a message transmission instruction to send a message across domains using the text tag between the parent page and the child page;
[0110] The workflow system also includes:
[0111] The first sending module is used to assemble the message to be transmitted into a transmission message of a preset format and send it to the subpage.
[0112] Furthermore, the acquisition module 20 is also used to acquire the setting parameters corresponding to the design instruction after detecting the design instruction for chart design in the subpage;
[0113] The setting module is also used to set the chart according to the setting parameters;
[0114] The workflow system also includes:
[0115] The storage module is used to store the setting parameters as Kanban tasks, so that the setting parameters can be displayed on the parent page through the Kanban tasks.
[0116] Furthermore, the acquisition module 20 is also used to acquire the security authentication information of the external system from the back-end subsystem of the workflow system after detecting an access request to access the external system;
[0117] The workflow system also includes:
[0118] The first adding module is used to add the security authentication information to the access request;
[0119] The second sending module is used to send an access request carrying the security authentication information to the external system, so that the external system can determine the legitimacy of the access request based on the security authentication information in the access request.
[0120] Furthermore, the acquisition module 20 is also used to acquire the standard interface of the back-end subsystem of the workflow system that interfaces with the external system, and to acquire the interface information of the external system through the front-end subsystem;
[0121] The workflow system also includes:
[0122] A creation module is used to create workflow tasks in the external system through the front-end subsystem, based on the standard interface and the interface information.
[0123] Furthermore, the workflow system also includes:
[0124] The determination module is used to determine the scheduling system corresponding to the execution instruction after detecting the execution instruction of the corresponding workflow node of the external system;
[0125] The conversion module is used to convert the tasks of the workflow nodes according to the scheduling format of the scheduling system to obtain the converted tasks to be executed.
[0126] The acquisition module 20 is further configured to send the converted task to be executed to the Linkis client through the scheduling system, so that the converted task to be executed can be executed through the Linkis client.
[0127] Furthermore, the workflow system also includes:
[0128] The second adding module is used to add the node type of the workflow node to the node type table and the node parameters of the workflow node to the parameter configuration table after detecting the embedding instruction of the corresponding workflow node of the external system in the workflow system.
[0129] It should be noted that the various embodiments of the workflow system are basically the same as the various embodiments of the embedding method of the external system described above, and will not be described in detail here.
[0130] Furthermore, the present invention also provides an embedded device for an external system. For example... Figure 5 As shown, Figure 5 This is a schematic diagram of the hardware operating environment involved in the embodiments of the present invention.
[0131] It should be noted that, Figure 5 This can be a schematic diagram of the hardware operating environment of the embedded device for an external system. In embodiments of the present invention, the embedded device for the external system can be a terminal device such as a PC or a portable computer.
[0132] like Figure 5 As shown, the embedded device of this external system may include: a processor 1001, such as a CPU; a memory 1005; a user interface 1003; a network interface 1004; and a communication bus 1002. The communication bus 1002 is used to enable communication between these components. The user interface 1003 may include a display screen or an input unit such as a keyboard; optionally, the user interface 1003 may also include a standard wired interface or a wireless interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface). The memory 1005 may be high-speed RAM or non-volatile memory, such as a disk drive. Optionally, the memory 1005 may also be a storage device independent of the aforementioned processor 1001.
[0133] Alternatively, the embedded device of the external system may also include a camera, RF (Radio Frequency) circuitry, sensors, audio circuitry, WiFi module, and so on.
[0134] Those skilled in the art will understand that Figure 5 The embedded device structure of the external system shown does not constitute a limitation on the embedded device of the external system, and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0135] like Figure 5 As shown, the memory 1005, which serves as a computer storage medium, may include an operating system, a network communication module, a user interface module, and an embedded program for an external system. The operating system is a program that manages and controls the hardware and software resources of the embedded device in the external system, supporting the operation of the embedded program and other software or programs.
[0136] exist Figure 5 In the external system embedding device shown, the user interface 1003 is mainly used to connect to the client and communicate data with the client; the network interface 1004 is mainly used to communicate data with the backend server; the processor 1001 can be used to call the external system embedding program stored in the memory 1005 and execute the steps of the external system embedding method as described above.
[0137] The specific implementation of the embedding device of the external system of the present invention is basically the same as the various embodiments of the embedding method of the external system described above, and will not be repeated here.
[0138] Furthermore, embodiments of the present invention also propose a computer-readable storage medium storing an embedding program for an external system, wherein the embedding program for the external system, when executed by a processor, implements the steps of the embedding method for the external system as described above.
[0139] The specific implementation of the computer-readable storage medium of the present invention is basically the same as the various embodiments of the embedding method of the external system described above, and will not be repeated here.
[0140] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0141] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0142] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of the present invention.
[0143] The above are merely preferred embodiments of the present invention and do not limit the patent scope of the present invention. Any equivalent structural or procedural transformations made based on the content of the present invention's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of the present invention.
Claims
1. A method for embedding an external system, characterized in that, The method for embedding the external system includes the following steps: When a loading instruction from an external system is detected in the front-end subsystem of the workflow system, the node type of the workflow node corresponding to the loading instruction is determined through a preset node type table. The node parameters of the workflow node are obtained from the preset parameter configuration table according to the node type. Based on the node parameters, a front-end control for the workflow node is generated in the front-end subsystem to embed the external system as a workflow node into the workflow system. When a startup command to launch the external system subpage is detected in the workflow node, the Uniform Resource Locator (URL) address of the subpage is obtained, as well as the startup parameters corresponding to the startup command are obtained. A transmission request is generated based on the URL address and the startup parameters, and the transmission request is set in a text tag to enable communication between the subpage and the parent page of the workflow system through the text tag.
2. The embedding method of an external system as described in claim 1, characterized in that, After the step of generating a transmission request based on the URL address and the startup parameters, and setting the transmission request in a text tag to enable communication between the subpage and the parent page of the workflow system through the text tag, the method further includes: When a message transmission instruction for cross-domain message sending using the text tag is detected between the parent page and the child page, the message to be transmitted corresponding to the message transmission instruction is obtained through the parent page. The message to be transmitted is assembled into a transmission message of a preset format and sent to the subpage.
3. The embedding method of an external system as described in claim 1, characterized in that, After the step of generating a transmission request based on the URL address and the startup parameters, and setting the transmission request in a text tag to enable communication between the subpage and the parent page of the workflow system through the text tag, the method further includes: When a design instruction for chart design is detected on the subpage, the setting parameters corresponding to the design instruction are obtained; The chart is set according to the settings parameters, and the settings parameters are stored as a Kanban task so that the settings parameters can be displayed on the parent page through the Kanban task.
4. The embedding method of an external system as described in claim 1, characterized in that, After the step of generating the front-end control of the workflow node in the front-end subsystem according to the node parameters, so as to embed the external system as a workflow node into the workflow system, the method further includes: Upon detecting an access request to the external system, the security authentication information of the external system is obtained from the back-end subsystem of the workflow system. The security authentication information is added to the access request, and the access request carrying the security authentication information is sent to the external system so that the external system can determine the legitimacy of the access request based on the security authentication information in the access request.
5. The embedding method of an external system as described in claim 1, characterized in that, After the step of generating the front-end control of the workflow node in the front-end subsystem according to the node parameters, so as to embed the external system as a workflow node into the workflow system, the method further includes: Obtain the standard interface of the back-end subsystem of the workflow system that interfaces with the external system, and obtain the interface information of the external system through the front-end subsystem; Workflow tasks are created in the external system through the front-end subsystem, based on the standard interface and the interface information.
6. The embedding method of an external system as described in claim 1, characterized in that, After the step of generating the front-end control of the workflow node in the front-end subsystem according to the node parameters, so as to embed the external system as a workflow node into the workflow system, the method further includes: Once an execution instruction corresponding to the workflow node of the external system is detected, the scheduling system corresponding to the execution instruction is determined. The tasks of the workflow nodes are transformed according to the scheduling format of the scheduling system to obtain transformed tasks to be executed. The transformed tasks to be executed are then sent to the Linkis client through the scheduling system so that the Linkis client can execute the transformed tasks to be executed.
7. The embedding method of an external system as described in any one of claims 1 to 6, characterized in that, Before the step of determining the node type of the workflow node corresponding to the loading instruction through a preset node type table after detecting a loading instruction from an external system in the front-end subsystem of the workflow system, the method further includes: When an embedding instruction for embedding a corresponding workflow node of an external system is detected in the workflow system, the node type of the workflow node is added to the node type table, and the node parameters of the workflow node are added to the parameter configuration table.
8. A workflow system, characterized in that, The workflow system includes: The determination module is used to determine the node type of the workflow node corresponding to the loading instruction by means of a preset node type table after detecting a loading instruction of an external system in the front-end subsystem of the workflow system. The acquisition module is used to acquire the node parameters of the workflow node from a preset parameter configuration table according to the node type. A generation module is used to generate a front-end control for the workflow node in the front-end subsystem according to the node parameters, so as to embed the external system as a workflow node into the workflow system; The acquisition module is further configured to, upon detecting a startup instruction to launch the external system subpage in the workflow node, acquire the Uniform Resource Locator (URL) address of the subpage and acquire the startup parameters corresponding to the startup instruction; The generation module is also used to generate a transmission request based on the URL address and the startup parameters; The setting module is used to set the transmission request into a text tag so as to realize communication between the subpage and the parent page of the workflow system through the text tag.
9. An embedded device for an external system, characterized in that, The external system embedding device includes a memory, a processor, and an external system embedding program stored in the memory and executable on the processor, wherein the external system embedding program, when executed by the processor, implements the steps of the external system embedding method as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores an embedding program for an external system, which, when executed by a processor, implements the steps of the embedding method for an external system as described in any one of claims 1 to 7.
11. A computer program product, characterized in that, The computer program product stores instructions that, when read and executed by a computer, cause the computer to perform the method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Parallel front end application and workflow development
CN108292208A
Workflow configuration method and system for financial business, terminal and readable storage medium
CN109636301A