A method, apparatus, computer device, and storage medium for modifying XAML files.

By parsing and modifying the XAML workflow engine file, a tree-structured data model is generated and operated on in a custom designer interface. This solves the problem of the inability to modify XAML files in a user-friendly way in traditional methods, and enables the generation and modification of XAML files under Microsoft Workflow.

CN116149665BActive Publication Date: 2026-06-30YGSOFT INC

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
YGSOFT INC
Filing Date
2023-02-17
Publication Date
2026-06-30

AI Technical Summary

Technical Problem

Traditional workflow parsing methods cannot modify XAML workflow files within the program in a user-friendly manner, and cannot generate correctly formatted XAML files under Microsoft Workflow.

Method used

By receiving RPA process parsing requests from user terminals, the parser is invoked to parse the XAML process engine file, generate a tree-structured data model, and modify it in the custom designer interface, ultimately generating the target XAML process engine file that runs on Microsoft Workflow.

Benefits of technology

It enables user-friendly modification of XAML files within the program, generating XAML files that conform to Workflow Designer's support, thus improving the flexibility and efficiency of workflows.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116149665B_ABST
    Figure CN116149665B_ABST
Patent Text Reader

Abstract

This application belongs to the field of workflow management technology, and relates to a method, apparatus, computer device, and storage medium for modifying XAML files. The method includes: receiving an RPA workflow parsing request carrying a XAML workflow engine file sent by a user terminal; invoking a parser and performing parsing operations on the XAML workflow engine file according to the parser to obtain a tree-like data model; displaying the tree-like data model according to a custom designer interface; after the user completes the modification operation, obtaining the user-modified custom tree-like data model according to the custom designer interface; and performing a transformation operation on the custom tree-like data model according to the parser to obtain the target XAML workflow engine file. This application can interpret XAML workflow engine files running on Microsoft Workflow, produce a custom tree-like data model within the program, and generate XAML files supported by Workflow Designer based on the custom tree-like data model. By modifying the tree-like data model generated by the parser, user-friendly modification of XAML files can be achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of workflow management technology, and in particular to a method, apparatus, computer device and storage medium for modifying XAML files. Background Technology

[0002] With the development and popularization of computer technology, network technology, and database technology, various enterprise and personal information applications are emerging in an endless stream, giving rise to workflow. Workflow is a computational model of a workflow, representing the logic and rules of how tasks are organized sequentially within a workflow in a computer model and performing calculations accordingly. The main problem that workflow aims to solve is: to automatically transfer documents, information, or tasks among multiple participants using computers according to certain predetermined rules in order to achieve a specific business goal. Using workflow software, users only need to fill out relevant forms on their computers, and the tasks will automatically proceed according to the defined flow. The next level of approvers will receive the relevant materials and can modify, track, manage, query, statistically analyze, and print them as needed. Compared to traditional workflow implementation methods, this greatly improves efficiency, enables knowledge management, and enhances the company's core competitiveness.

[0003] There is a workflow parsing method where users add components and perform other operations through the RPA designer's interface. After the automated process is saved, the RPA designer generates an automated process XAML file, which can run under Microsoft Workflow to achieve the purpose of automation.

[0004] However, the applicant found that traditional workflow parsing methods must strictly use Microsoft's WorkflowDesigner to generate XAML files, and cannot modify the XAML workflow files internally to generate correctly formatted XAML files that are supported by Workflow. Summary of the Invention

[0005] The purpose of this application is to provide a method, apparatus, computer device, and storage medium for modifying XAML files, so as to solve the problem that traditional workflow parsing methods cannot modify XAML process files in a user-friendly way within the program.

[0006] To address the aforementioned technical problems, this application provides a method for modifying XAML files, employing the following technical solution:

[0007] Receive an RPA process parsing request sent by a user terminal, wherein the RPA process parsing request carries a XAML process engine file running on Microsoft Workflow;

[0008] The parser is invoked, and the XAML process engine file is parsed according to the parser to obtain a tree-structured data model;

[0009] The tree-like data model is displayed through the custom designer interface, allowing users to modify the data in the tree-like data model using the custom designer interface.

[0010] After the user completes the modification operation, the user-modified custom tree data model is obtained from the custom designer interface.

[0011] The parser performs a transformation operation on the custom tree data model to obtain the target XAML process engine file that runs on Microsoft Workflow.

[0012] Furthermore, the step of invoking the parser and parsing the XAML workflow engine file according to the parser to obtain the tree-like data model specifically includes the following steps:

[0013] Read the class factory and retrieve the parsing class corresponding to the node name information of the XAML process engine file from the class factory;

[0014] Call the parsing interface of the parsing class to obtain the node data corresponding to the node name information;

[0015] The node data is encapsulated to obtain the tree-like data model;

[0016] Furthermore, before the step of reading the class factory and obtaining the parsing class corresponding to the node name information of the XAML process engine file, the following step is also included:

[0017] The Extensible Markup Language (XML) file is invoked, and the XAML process engine file is loaded based on the XML file to obtain the node name information.

[0018] Furthermore, the step of transforming the custom tree data model using the parser to obtain the target XAML workflow engine file running on the Microsoft Workflow specifically includes the following steps:

[0019] Get the predefined character sequence variable;

[0020] Traverse the list of custom tree-structured data models to obtain the data model categories;

[0021] Retrieve the Polygon.ToXaml method corresponding to the data model category;

[0022] The XAML string of the custom tree data model is obtained based on the Polygon.ToXaml method;

[0023] The XAML string is stored in the character sequence variable to obtain the target character sequence variable;

[0024] The target character sequence variable is formatted using the ToString method to obtain the target XAML process engine file.

[0025] To address the aforementioned technical problems, this application also provides a XAML file modification device, which employs the following technical solution:

[0026] The request receiving module is used to receive RPA process parsing requests sent by user terminals, wherein the RPA process parsing requests carry XAML process engine files running on Microsoft Workflow.

[0027] The parsing module is used to call the parser and perform parsing operations on the XAML process engine file according to the parser to obtain a tree-like data model;

[0028] The interface display module is used to display the tree data model according to the custom designer interface, so that the user can modify the data of the tree data model according to the custom designer interface;

[0029] The data receiving module is used to obtain the user-modified custom tree data model according to the custom designer interface after the user completes the modification operation.

[0030] The transformation module is used to perform transformation operations on the custom tree data model according to the parser to obtain the target XAML process engine file that runs on the Microsoft Workflow.

[0031] Furthermore, the parsing module includes:

[0032] The parsing class acquisition submodule is used to read the class factory and obtain the parsing class corresponding to the node name information of the XAML process engine file from the class factory;

[0033] The node data acquisition submodule is used to call the parsing interface of the parsing class to obtain the node data corresponding to the node name information;

[0034] The encapsulation submodule is used to encapsulate the node data to obtain the tree-like data model.

[0035] Furthermore, the parsing module also includes:

[0036] The node name acquisition submodule is used to call the Extensible Markup Language (XML) file and load the XAML process engine file according to the XML file to obtain the node name information.

[0037] Furthermore, the conversion module includes:

[0038] The character sequence variable retrieval submodule is used to retrieve predefined character sequence variables;

[0039] The model traversal submodule is used to traverse the list of custom tree-structured data models to obtain the data model categories;

[0040] The category method acquisition submodule is used to obtain the Polygon.ToXaml method corresponding to the data model category;

[0041] The string retrieval submodule is used to retrieve the XAML string of the custom tree data model based on the Polygon.ToXaml method;

[0042] The string storage submodule is used to store the XAML string into the character sequence variable to obtain the target character sequence variable;

[0043] The formatting submodule is used to perform string formatting on the target character sequence variable based on the ToString method to obtain the target XAML process engine file.

[0044] To address the aforementioned technical problems, this application also provides a computer device that employs the following technical solution:

[0045] It includes a memory and a processor, wherein the memory stores computer-readable instructions, and the processor executes the computer-readable instructions to implement the steps of the XAML file modification method as described above.

[0046] To address the aforementioned technical problems, this application also provides a computer-readable storage medium, employing the technical solution described below:

[0047] The computer-readable storage medium stores computer-readable instructions, which, when executed by a processor, implement the steps of the XAML file modification method described above.

[0048] This application provides a method for modifying XAML files, comprising: receiving an RPA process parsing request sent by a user terminal, wherein the RPA process parsing request carries a XAML process engine file running on Microsoft Workflow; invoking a parser and performing a parsing operation on the XAML process engine file according to the parser to obtain a tree-like data model; displaying the tree-like data model according to a custom designer interface, so that the user can modify the data of the tree-like data model according to the custom designer interface; after the user completes the modification operation, obtaining the user-modified custom tree-like data model according to the custom designer interface; and performing a transformation operation on the custom tree-like data model according to the parser to obtain a target XAML process engine file running on Microsoft Workflow. Compared with the prior art, this application can interpret the XAML process engine file running on Microsoft Workflow, produce a custom tree-like data model within the program, and generate a XAML file supported by Workflow Designer based on the custom tree-like data model. By modifying the tree-like data model generated by the parser, the purpose of user-friendly modification of XAML files can be achieved. Attached Figure Description

[0049] To more clearly illustrate the solutions in this application, the accompanying drawings used in the description of the embodiments of this application will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0050] Figure 1 This is an exemplary system architecture diagram to which this application can be applied;

[0051] Figure 2 This is a flowchart illustrating the implementation of the XAML file modification method provided in Embodiment 1 of this application;

[0052] Figure 3 yes Figure 2 A flowchart of a specific implementation of step S202;

[0053] Figure 4 yes Figure 3 A flowchart of a specific implementation method prior to step S301;

[0054] Figure 5 yes Figure 2 A flowchart of a specific implementation of step S205;

[0055] Figure 6 This is a schematic diagram of the structure of the XAML file modification device provided in Embodiment 2 of this application;

[0056] Figure 7 This is a schematic diagram of the structure of one embodiment of the computer device according to this application. Detailed Implementation

[0057] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains; the terminology used herein in the specification of the application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application; the terms "comprising" and "having," and any variations thereof, in the specification, claims, and foregoing drawings of this application, are intended to cover non-exclusive inclusion. The terms "first," "second," etc., in the specification, claims, or foregoing drawings of this application are used to distinguish different objects, not to describe a particular order.

[0058] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0059] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings.

[0060] like Figure 1 As shown, system architecture 100 may include terminal devices 101, 102, and 103, a network 104, and a server 105. Network 104 serves as the medium for providing communication links between terminal devices 101, 102, and 103 and server 105. Network 104 may include various connection types, such as wired or wireless communication links, or fiber optic cables, etc.

[0061] Users can use terminal devices 101, 102, and 103 to interact with server 105 via network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, and 103, such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, social media platform software, etc.

[0062] Terminal devices 101, 102, and 103 can be various electronic devices with displays and support web browsing, including but not limited to smartphones, tablets, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III), MP4 players (Moving Picture Experts Group Audio Layer IV), laptops, and desktop computers, etc.

[0063] Server 105 can be a server that provides various services, such as a backend server that supports the pages displayed on terminal devices 101, 102, and 103.

[0064] It should be noted that the XAML file modification method provided in this application embodiment is generally executed by a server / terminal device, and correspondingly, the XAML file modification device is generally set in the server / terminal device.

[0065] It should be understood that Figure 1 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.

[0066] Example 1

[0067] Continue to refer to Figure 2 The diagram shows the implementation flowchart of the XAML file modification method provided in Embodiment 1 of this application. For ease of explanation, only the parts related to this application are shown.

[0068] The above-mentioned method for modifying XAML files includes steps S201, S202, S203, S204, and S205.

[0069] In step S201, an RPA process parsing request sent by a user terminal is received, wherein the RPA process parsing request carries a XAML process engine file running on Microsoft Workflow.

[0070] In this embodiment, RPA refers to Robotic Process Automation, whose main function is to use robots to execute work information and business interactions according to pre-designed processes. Thus, when there is a large amount of work information and business interaction, RPA can efficiently handle these complex processes and save labor costs.

[0071] In this application's embodiments, "Workflow" refers to the automation of a part or all of a business process within a computer application environment. It is an abstract and generalized description of a workflow and the business rules governing its various operational steps. In computers, workflow is part of Computer-Supported Collaborative Work (CSCW). The latter broadly studies how a group can collaborate with the help of computers.

[0072] In this embodiment, XAML is an abbreviation for eXtensible Application Markup Language, a descriptive language created by Microsoft for building application user interfaces. XAML provides an easily extensible and locatable syntax for defining user interfaces that are separate from program logic, an implementation very similar to the "code-behind" model in ASP.NET. XAML is a parsed language, although it can also be compiled. Its advantage is simplifying the programmatic user creation process, eliminating the need for adding code and configuration at application time.

[0073] In step S202, the parser is invoked, and the XAML process engine file is parsed according to the parser to obtain a tree-like data model.

[0074] In this embodiment of the application, parsing the XAML process engine file according to the parser may involve reading the class factory, obtaining the parsing class corresponding to the node name information of the XAML process engine file from the class factory; calling the parsing interface of the parsing class to obtain the node data corresponding to the node name information; and encapsulating the node data to achieve the above parsing operation.

[0075] In step S203, a tree-like data model is displayed according to the custom designer interface so that the user can modify the data of the tree-like data model according to the custom designer interface.

[0076] In this embodiment, the display unit of the parser is the user input interface of the B-end automated process designer, which can view the Microsoft Workflow automated process XAML file; the parser parses the automated process XAML file and returns a custom tree data model, and displays the custom designer interface.

[0077] In this embodiment, users can modify Microsoft Workflow automation process XAML files according to the custom designer interface, and modify custom tree data model data based on user operation of the designer interface.

[0078] In step S204, after the user completes the modification operation, the user-modified custom tree data model is obtained from the custom designer interface.

[0079] In this embodiment of the application, after the user modifies the Microsoft Workflow automation process XAML file, the user's modified custom tree data model can be obtained.

[0080] In step S205, the custom tree data model is transformed by the parser to obtain the target XAML process engine file that runs on Microsoft Workflow.

[0081] In this embodiment, the transformation operation may involve: obtaining a predefined character sequence variable; traversing a list of custom tree-structured data models to obtain data model categories; obtaining the Polygon.ToXaml method corresponding to the data model category; obtaining the XAML string of the custom tree-structured data model based on the Polygon.ToXaml method; storing the XAML string in the character sequence variable to obtain the target character sequence variable; and performing string formatting on the target character sequence variable based on the ToString method to obtain the target XAML workflow engine file.

[0082] This application provides a method for modifying XAML files, including: receiving an RPA process parsing request sent by a user terminal, wherein the RPA process parsing request carries a XAML process engine file running on Microsoft Workflow; invoking a parser and performing parsing operations on the XAML process engine file according to the parser to obtain a tree-like data model; displaying the tree-like data model according to a custom designer interface so that the user can modify the data in the tree-like data model according to the custom designer interface; after the user completes the modification operation, obtaining the user-modified custom tree-like data model according to the custom designer interface; and performing a transformation operation on the custom tree-like data model according to the parser to obtain a target XAML process engine file running on Microsoft Workflow. Compared with the prior art, this application can interpret the XAML process engine file running on Microsoft Workflow, produce a custom tree-like data model within the program, and generate a XAML file supported by Workflow Designer based on the custom tree-like data model. By modifying the tree-like data model generated by the parser, the purpose of user-friendly modification of XAML files can be achieved.

[0083] Continue reading Figure 3 , showed Figure 2 The flowchart of a specific implementation of step S202 is shown. For ease of explanation, only the parts relevant to this application are shown.

[0084] In some optional implementations of this embodiment, step S202 specifically includes: step S301, step S302 and step S303.

[0085] In step S301, the class factory is read, and the parsing class corresponding to the node name information of the XAML process engine file is obtained from the class factory.

[0086] In step S302, the parsing interface of the parsing class is called to obtain the node data corresponding to the node name information.

[0087] In step S303, the node data is encapsulated to obtain a tree-like data model.

[0088] In this embodiment, the input Microsoft Workflow is a workflow XAML file; all nodes in the document are traversed, and the parsing class of the node is obtained from the class factory by the node name. For example, for a Sequence node, the parsing class of Sequence is obtained from the class factory by the node name Sequence; the parsing interface Read method of the parsing class is called to return data containing all information of the node; the node information data is encapsulated to form a data model with a custom name; after the parsing of other nodes is completed, a custom data model containing all information of the nodes with the same structure as the XAML document is finally generated; the parser finally outputs a custom tree-like data model (with the same structure as the XAML document).

[0089] Continue reading Figure 4 , showed Figure 3 The flowchart of a specific implementation prior to step S301 is shown for ease of explanation, showing only the parts relevant to this application.

[0090] In some optional implementations of this embodiment, step S401 is included before step S301.

[0091] In step S401, the Extensible Markup Language (XML) file is invoked, and the XAML process engine file is loaded based on the XML file to obtain node name information.

[0092] Continue reading Figure 5 , showed Figure 2 The flowchart of a specific embodiment of step S205 is shown. For ease of explanation, only the parts relevant to this application are shown.

[0093] In some optional implementations of this embodiment, step S205 specifically includes:

[0094] In step S501, the predefined character sequence variable is obtained.

[0095] In step S502, the list of custom tree-structured data models is traversed to obtain the data model categories.

[0096] In step S503, the Polygon.ToXaml method corresponding to the data model category is obtained.

[0097] In step S504, the XAML string of the custom tree data model is obtained based on the Polygon.ToXaml method.

[0098] In step S505, the XAML string is stored in a character sequence variable to obtain the target character sequence variable.

[0099] In step S506, the target character sequence variable is formatted using the ToString method to obtain the target XAML process engine file.

[0100] In this embodiment, the implementation is the reverse process of parsing a XAML file to generate a custom data model.

[0101] ① The input to the parser is a custom tree data model;

[0102] ② Define a StringBuilder variable to store the results during the process;

[0103] ③ Traverse the tree-like list of the data model;

[0104] ④ In the data model type, call the ToXAML method of the type to get the XAML string and save it to the StringBuilder variable. For example, in the Sequence class of the data model, use the ToXaml method of the class to get the XAML text string and save it to the StringBuilder.

[0105] ⑤ For the reverse process steps of other data model types, refer to step ④;

[0106] ⑥ Finally, store the string in the StringBuilder variable using the ToString method to get the string content from the XAML;

[0107] ⑦ The output of the process parser is the Workflow XAML file text.

[0108] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by instructing related hardware with computer-readable instructions. These computer-readable instructions can be stored in a computer-readable storage medium, and when executed, they can include the processes of the embodiments of the methods described above. The aforementioned storage medium can be a non-volatile storage medium such as a magnetic disk, optical disk, or read-only memory (ROM), or random access memory (RAM).

[0109] It should be understood that although the steps in the flowcharts of the accompanying figures are shown sequentially as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the accompanying figures may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the sub-steps or stages of other steps.

[0110] Example 2

[0111] Further reference Figure 6 As a response to the above Figure 2 The implementation of the method shown in this application provides an embodiment of a XAML file modification apparatus, which is similar to... Figure 2 Corresponding to the method embodiments shown, this device can be specifically applied to various electronic devices.

[0112] like Figure 6 As shown, the XAML file modification device 200 of this embodiment includes: a request receiving module 210, a parsing module 220, an interface display module 230, a data receiving module 240, and a conversion module 250.

[0113] in:

[0114] The request receiving module 210 is used to receive the RPA process parsing request sent by the user terminal, wherein the RPA process parsing request carries a XAML process engine file running on Microsoft Workflow.

[0115] The parsing module 220 is used to call the parser and perform parsing operations on the XAML process engine file according to the parser to obtain a tree-like data model;

[0116] The interface display module 230 is used to display the tree data model according to the custom designer interface, so that users can modify the data of the tree data model according to the custom designer interface;

[0117] The data receiving module 240 is used to obtain the user-modified custom tree data model from the custom designer interface after the user completes the modification operation.

[0118] The transformation module 250 is used to transform the custom tree data model according to the parser to obtain the target XAML process engine file that runs on Microsoft Workflow.

[0119] In this embodiment, RPA refers to Robotic Process Automation, whose main function is to use robots to execute work information and business interactions according to pre-designed processes. Thus, when there is a large amount of work information and business interaction, RPA can efficiently handle these complex processes and save labor costs.

[0120] In this application's embodiments, "Workflow" refers to the automation of a part or all of a business process within a computer application environment. It is an abstract and generalized description of a workflow and the business rules governing its various operational steps. In computers, workflow is part of Computer-Supported Collaborative Work (CSCW). The latter broadly studies how a group can collaborate with the help of computers.

[0121] In this embodiment, XAML is an abbreviation for eXtensible Application Markup Language, a descriptive language created by Microsoft for building application user interfaces. XAML provides an easily extensible and locatable syntax for defining user interfaces that are separate from program logic, an implementation very similar to the "code-behind" model in ASP.NET. XAML is a parsed language, although it can also be compiled. Its advantage is simplifying the programmatic user creation process, eliminating the need for adding code and configuration at application time.

[0122] In this embodiment of the application, parsing the XAML process engine file according to the parser may involve reading the class factory, obtaining the parsing class corresponding to the node name information of the XAML process engine file from the class factory; calling the parsing interface of the parsing class to obtain the node data corresponding to the node name information; and encapsulating the node data to achieve the above parsing operation.

[0123] In this embodiment, the display unit of the parser is the user input interface of the B-end automated process designer, which can view the Microsoft Workflow automated process XAML file; the parser parses the automated process XAML file and returns a custom tree data model, and displays the custom designer interface.

[0124] In this embodiment, users can modify Microsoft Workflow automation process XAML files according to the custom designer interface, and modify custom tree data model data based on user operation of the designer interface.

[0125] In this embodiment of the application, after the user modifies the Microsoft Workflow automation process XAML file, the user's modified custom tree data model can be obtained.

[0126] In this embodiment, the transformation operation may involve: obtaining a predefined character sequence variable; traversing a list of custom tree-structured data models to obtain data model categories; obtaining the Polygon.ToXaml method corresponding to the data model category; obtaining the XAML string of the custom tree-structured data model based on the Polygon.ToXaml method; storing the XAML string in the character sequence variable to obtain the target character sequence variable; and performing string formatting on the target character sequence variable based on the ToString method to obtain the target XAML workflow engine file.

[0127] In this embodiment, a XAML file modification device 200 is provided, comprising: a request receiving module 210, configured to receive an RPA process parsing request sent by a user terminal, wherein the RPA process parsing request carries a XAML process engine file running on Microsoft Workflow; a parsing module 220, configured to call a parser and perform parsing operations on the XAML process engine file according to the parser to obtain a tree-like data model; an interface display module 230, configured to display the tree-like data model according to a custom designer interface, so that the user can modify the data of the tree-like data model according to the custom designer interface; a data receiving module 240, configured to obtain the user-modified custom tree-like data model according to the custom designer interface after the user completes the modification operation; and a conversion module 250, configured to perform a conversion operation on the custom tree-like data model according to the parser to obtain a target XAML process engine file running on Microsoft Workflow. Compared with existing technologies, this application can interpret XAML process engine files running on Microsoft Workflow, produce custom tree data models within the program, generate XAML files supported by Workflow Designer based on the custom tree data models, and achieve the goal of user-friendly modification of XAML files by modifying the tree data models generated by the parser.

[0128] In some optional implementations of this embodiment, the parsing module 220 includes:

[0129] The parsing class acquisition submodule is used to read the class factory and retrieve the parsing class corresponding to the node name information in the XAML process engine file.

[0130] The node data acquisition submodule is used to call the parsing interface of the parsing class to obtain the node data corresponding to the node name information;

[0131] The encapsulation submodule is used to encapsulate node data to obtain a tree-like data model.

[0132] In this embodiment, the input Microsoft Workflow is a workflow XAML file; all nodes in the document are traversed, and the parsing class of the node is obtained from the class factory by the node name. For example, for a Sequence node, the parsing class of Sequence is obtained from the class factory by the node name Sequence; the parsing interface Read method of the parsing class is called to return data containing all information of the node; the node information data is encapsulated to form a data model with a custom name; after the parsing of other nodes is completed, a custom data model containing all information of the nodes with the same structure as the XAML document is finally generated; the parser finally outputs a custom tree-like data model (with the same structure as the XAML document).

[0133] In some optional implementations of this embodiment, the parsing module 220 further includes:

[0134] The node name retrieval submodule is used to call the Extensible Markup Language (XML) file and load the XAML workflow engine file based on the XML file to obtain the node name information.

[0135] In some optional implementations of this embodiment, the conversion module 250 includes:

[0136] The character sequence variable retrieval submodule is used to retrieve predefined character sequence variables;

[0137] The model traversal submodule is used to traverse a list of custom tree-structured data models to obtain the data model categories.

[0138] The category method retrieval submodule is used to retrieve the Polygon.ToXaml method corresponding to the data model category;

[0139] The string retrieval submodule is used to retrieve XAML strings of custom tree-structured data models based on the Polygon.ToXaml method;

[0140] The string storage submodule is used to store XAML strings into character sequence variables to obtain the target character sequence variable;

[0141] The formatting submodule is used to perform string formatting on the target character sequence variable based on the ToString method, so as to obtain the target XAML process engine file.

[0142] In this embodiment, the implementation is the reverse process of parsing a XAML file to generate a custom data model.

[0143] ① The input to the parser is a custom tree data model;

[0144] ② Define a StringBuilder variable to store the results during the process;

[0145] ③ Traverse the tree-like list of the data model;

[0146] ④ In the data model type, call the ToXAML method of the type to get the XAML string and save it to the StringBuilder variable. For example, in the Sequence class of the data model, use the ToXaml method of the class to get the XAML text string and save it to the StringBuilder.

[0147] ⑤ For the reverse process steps of other data model types, refer to step ④;

[0148] ⑥ Finally, store the string in the StringBuilder variable using the ToString method to get the string content from the XAML;

[0149] ⑦ The output of the process parser is the Workflow XAML file text.

[0150] To address the aforementioned technical problems, embodiments of this application also provide a computer device. Please refer to [link / reference needed] for details. Figure 7 , Figure 7 This is a basic structural block diagram of the computer device in this embodiment.

[0151] The computer device 300 includes a memory 310, a processor 320, and a network interface 330 that are interconnected via a system bus. It should be noted that only the computer device 300 with components 310-330 is shown in the figure; however, it should be understood that it is not required to implement all the shown components, and more or fewer components can be implemented alternatively. Those skilled in the art will understand that the computer device described here is a device capable of automatically performing numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes, but is not limited to, microprocessors, application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), digital signal processors (DSPs), embedded devices, etc.

[0152] The computer device can be a desktop computer, laptop, handheld computer, or cloud server, etc. The computer device can interact with the user via a keyboard, mouse, remote control, touchpad, or voice control.

[0153] The memory 310 includes at least one type of readable storage medium, including flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 310 may be an internal storage unit of the computer device 300, such as the hard disk or memory of the computer device 300. In other embodiments, the memory 310 may also be an external storage device of the computer device 300, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc. Of course, the memory 310 may also include both internal storage units and external storage devices of the computer device 300. In this embodiment, the memory 310 is typically used to store the operating system and various application software installed on the computer device 300, such as computer-readable instructions for modifying XAML files. Furthermore, the memory 310 can also be used to temporarily store various types of data that have been output or will be output.

[0154] In some embodiments, the processor 320 may be a central processing unit (CPU), controller, microcontroller, microprocessor, or other data processing chip. The processor 320 is typically used to control the overall operation of the computer device 300. In this embodiment, the processor 320 is used to execute computer-readable instructions stored in the memory 310 or to process data, for example, to execute computer-readable instructions for the XAML file modification method.

[0155] The network interface 330 may include a wireless network interface or a wired network interface, which is typically used to establish communication connections between the computer device 300 and other electronic devices.

[0156] The computer device provided in this application is capable of interpreting XAML process engine files running on Microsoft Workflow, producing a custom tree data model within the program, and generating XAML files supported by WorkflowDesigner based on the custom tree data model. By modifying the tree data model generated by the parser, the purpose of user-friendly modification of XAML files can be achieved.

[0157] This application also provides another embodiment, namely, providing a computer-readable storage medium storing computer-readable instructions that can be executed by at least one processor to cause the at least one processor to perform the steps of the XAML file modification method described above.

[0158] The computer-readable storage medium provided in this application can interpret XAML process engine files running on Microsoft Workflow, produce custom tree data models within the program, generate XAML files supported by Workflow Designer based on the custom tree data models, and achieve the purpose of user-friendly modification of XAML files by modifying the tree data models generated by the parser.

[0159] 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 this application, 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 this application.

[0160] Obviously, the embodiments described above are only some embodiments of this application, not all embodiments. The accompanying drawings show preferred embodiments of this application, but do not limit the patent scope of this application. This application can be implemented in many different forms; rather, the purpose of providing these embodiments is to provide a more thorough and comprehensive understanding of the disclosure of this application. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing specific embodiments, or make equivalent substitutions for some of the technical features. Any equivalent structures made using the content of this application's specification and drawings, directly or indirectly applied to other related technical fields, are similarly within the scope of patent protection of this application.

Claims

1. A method of modifying an XAML file, characterized by, Applied to a merchant platform, the method includes the following steps: Receive an RPA process parsing request sent by a user terminal, wherein the RPA process parsing request carries a XAML process engine file running on Microsoft Workflow; The parser is invoked, and the XAML process engine file is parsed according to the parser to obtain a tree-structured data model; The tree-like data model is displayed through the custom designer interface, allowing users to modify the data in the tree-like data model using the custom designer interface. After the user completes the modification, the user-modified custom tree data model is obtained from the custom designer interface. The parser performs a transformation operation on the custom tree data model to obtain the target XAML process engine file that runs on Microsoft Workflow. The step of calling the parser and parsing the XAML workflow engine file according to the parser to obtain the tree-like data model specifically includes the following steps: Read the class factory and retrieve the parsing class corresponding to the node name information of the XAML process engine file from the class factory; Call the parsing interface of the parsing class to obtain the node data corresponding to the node name information; The node data is encapsulated to obtain the tree-like data model; The step of transforming the custom tree data model using the parser to obtain the target XAML workflow engine file running on Microsoft Workflow specifically includes the following steps: Get the predefined character sequence variable; Traverse the list of custom tree-structured data models to obtain the data model categories; Retrieve the Polygon.ToXaml method corresponding to the data model category; The XAML string of the custom tree data model is obtained based on the Polygon.ToXaml method; The XAML string is stored in the character sequence variable to obtain the target character sequence variable; The target character sequence variable is formatted using the ToString method to obtain the target XAML process engine file.

2. The XAML file modification method of claim 1, wherein, Before the step of retrieving the parsing class corresponding to the node name information of the XAML process engine file from the class factory, the following steps are also included: The Extensible Markup Language (XML) file is invoked, and the XAML process engine file is loaded based on the XML file to obtain the node name information.

3. An XAML file modification apparatus characterized by comprising: The device, applied to a merchant platform, includes: The request receiving module is used to receive RPA process parsing requests sent by user terminals, wherein the RPA process parsing requests carry XAML process engine files running on Microsoft Workflow. The parsing module is used to call the parser and perform parsing operations on the XAML process engine file according to the parser to obtain a tree-like data model; The interface display module is used to display the tree data model according to the custom designer interface, so that the user can modify the data of the tree data model according to the custom designer interface; The data receiving module is used to obtain the user-modified custom tree data model according to the custom designer interface after the user completes the modification. The transformation module is used to transform the custom tree data model according to the parser to obtain the target XAML process engine file that runs on the Microsoft Workflow. The parsing module includes: The parsing class acquisition submodule is used to read the class factory and obtain the parsing class corresponding to the node name information of the XAML process engine file from the class factory; The node data acquisition submodule is used to call the parsing interface of the parsing class to obtain the node data corresponding to the node name information; The encapsulation submodule is used to encapsulate the node data to obtain the tree-like data model; The conversion module includes: The character sequence variable retrieval submodule is used to retrieve predefined character sequence variables; The model traversal submodule is used to traverse the list of custom tree-structured data models to obtain the data model categories; The category method acquisition submodule is used to obtain the Polygon.ToXaml method corresponding to the data model category; The string retrieval submodule is used to retrieve the XAML string of the custom tree data model based on the Polygon.ToXaml method; The string storage submodule is used to store the XAML string into the character sequence variable to obtain the target character sequence variable; The formatting submodule is used to perform string formatting on the target character sequence variable based on the ToString method to obtain the target XAML process engine file.

4. The XAML file modification apparatus according to claim 3, wherein The parsing module also includes: The node name acquisition submodule is used to call the Extensible Markup Language (XML) file and load the XAML process engine file according to the XML file to obtain the node name information.

5. A computer device, comprising: The system includes a memory and a processor, wherein the memory stores computer-readable instructions, and the processor executes the computer-readable instructions to implement the steps of the XAML file modification method as described in any one of claims 1 and 2.

6. A computer readable storage medium characterized by The computer-readable storage medium stores computer-readable instructions that, when executed by a processor, implement the steps of the XAML file modification method as described in any one of claims 1 and 2.