A Data Source-Driven Methodology and System for Rapid Development of No-Code SaaS Applications
By constructing a directed acyclic graph and using finite state machine theory, the transaction consistency problem in cross-heterogeneous data source business processes of no-code platforms is solved, realizing automated transaction orchestration and state management, and ensuring the reliability and consistency of distributed transactions.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- JIANGSU SQUARE SOFTWARE TECH CO LTD
- Filing Date
- 2025-09-01
- Publication Date
- 2026-07-17
Smart Images

Figure CN121092149B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of computer software engineering and distributed systems technology, and in particular to a method and system for rapid development of no-code SaaS applications based on data source-driven approaches. Background Technology
[0002] With the increasing popularity of no-code / low-code development platforms in enterprise digital transformation and rapid SaaS application development, the reliability of business processes and data consistency assurance have become key bottlenecks restricting their deep application in core business scenarios. How to enable developers to easily build complex business processes across multiple heterogeneous data sources in a no-code visual environment, while addressing the shortcomings of traditional platforms such as native transaction support, complex compensation logic design, and weak cross-data source consistency assurance capabilities, has become a crucial challenge and an important issue that urgently needs to be addressed for no-code development platforms to move from edge applications to core enterprise systems.
[0003] Chinese patent application CN120144109A discloses a visual large-scale model low-code development platform and method. The method includes setting up a visual large-scale model low-code development platform comprising a front-end interaction module, a back-end processing module, and a scheduling gateway. The front-end interaction module includes a SaaS environment operation module, a large-scale model low-code editing module, a data acquisition module, and visual components. The back-end processing module includes a permission configuration module, a SaaS control module, and a data storage module.
[0004] However, current technologies still face numerous challenges. No-code development platforms generally lack automated transaction consistency guarantees when handling business processes across heterogeneous data sources. When a business process, such as an e-commerce order placement, is abnormally terminated due to a partial failure, such as an inventory service interruption, the lack of unified compensation and rollback capabilities means that successfully executed preceding operations, such as payment gateway deductions, cannot be atomically reversed. Such issues directly cause serious inconsistencies in the final state of data across systems. For example, a user may have been charged, but the order creation may have failed. This data inconsistency not only triggers business logic chaos such as overselling and fulfillment failures, but also brings higher costs for manual data calibration and post-intervention, ultimately damaging enterprise operational efficiency and business reputation, and even causing direct economic losses. Summary of the Invention
[0005] To achieve the above objectives, this invention provides a data source-driven, no-code SaaS application rapid development method, the specific technical solution of which is as follows:
[0006] Constructing a directed acyclic graph G of the positive business process f , is the directed acyclic graph G f Forward operation node n fEstablish and compensate operation node n c Semantic associations, generating a compensation link set L c All operation nodes are semantically bound to the transactional data source adapter, a mapping function M is established, and a visual transaction model D is generated by aggregation. v =(G f ,L c ,M);
[0007] Analysis and Visualization of Transaction Model D v Generate transaction step sequence Based on the transaction step sequence T, a finite state set Q and a state transition function δ are constructed. The finite state set Q, the state transition function δ, and other formal components are aggregated and encapsulated to generate an SAGA process state machine definition object S. def =(Q,∑,δ,q0,F);
[0008] A global transaction ID T is generated at the start of the transaction lifecycle. id According to the global transaction ID T id and external business requests R in Request to load SAGA process state machine definition object S def Construct a transaction context object Ctx; serialize the transaction context object Ctx according to the Write-Ahead Log (WAL) principle to generate an initial transaction context instance Ctx. init ;
[0009] Load and deserialize the initial transaction context instance Ctx init Rebuild the second transaction context object Ctx' and start a state-driven execution loop with a non-terminal state as the persistence condition; in the iteration of the execution loop, perform a single-step state transition; and in the execution loop, due to the current state q current After a transaction terminates due to belonging to the final state set F, the final result R of the transaction is determined. final And archive and generate audit logs. audit .
[0010] Furthermore, the visualized transaction model D v =(G f ,L c The aggregation generation methods of M) include:
[0011] Capture business logic and construct a directed acyclic graph G of the positive business process. f The directed acyclic graph G f From the forward node set N f and execution edge set E f composition;
[0012] Identifying Directed Acyclic Graphs Gf Forward operation node n f Based on the associated operations captured in the graphical interface, the forward operation node n is established. f Its corresponding compensation operation node n c The semantic relationships between them generate a compensation link set L c ;
[0013] The directed acyclic graph G f Each operation node in the graph is bound to a callable method in the transactional data source adapter, and a mapping function M is established; and the acyclic graph G is then mapped to the graph. f Compensation Link Set L c The mapping function M is then aggregated to generate a visual transaction model D. v =(G f ,L c M).
[0014] Furthermore, the SAGA process state machine definition object S def The methods for generating =(Q,∑,δ,q0,F) include:
[0015] Visual transaction model D v Forward operation node n f Based on the execution edge set E f Perform topological sorting to generate a linear execution sequence, and combine it with the compensation link set L. c The mapping function M is used to match and extract positive operations for each operation node in the linear execution sequence. and compensation operations Constructing a sequence of transaction steps
[0016] A global state is defined based on a sequence of transaction steps T, and each transaction step in the sequence of transaction steps T is traversed. Generate the corresponding local state By analyzing the global state and all local states Perform a union operation to construct a finite set of states Q;
[0017] Based on the finite state set Q and the predefined event alphabet ∑, according to the forward execution order and compensation logic of the transaction step sequence T, state transition rules are generated for each non-terminal state in the finite state set Q, and a state transition function δ is constructed.
[0018] The finite set of states Q, the event alphabet ∑, the state transition function δ, the initial state q0, and the final state set F are aggregated and encapsulated into a SAGA process state machine definition object S. def =(Q,∑,δ,q0,F).
[0019] Furthermore, the state transition rules include:
[0020] When the state machine is in the forward execution state of any non-final step Upon receiving a Success event indicating successful operation, the state transitions to the forward execution state for the next step. When the state machine is in the forward execution state of the final step When the operation is successfully completed, the state transitions to the transaction commit successful state.
[0021] When the state machine is in the forward execution state of any step Upon receiving a Failure event, the forward process is immediately interrupted, and the state is transitioned to the compensation execution state corresponding to the current step.
[0022] When the state machine is in the compensation execution state of any non-initial step Upon receiving the "Success" event indicating a successful compensation operation, the state reverts to the compensation execution state of the previous step. When the state machine is in the initial step and the compensation is successful, the state is transitioned to the transaction abort and rollback state.
[0023] Furthermore, the initial transaction context instance Ctx init The generation methods include:
[0024] At the start of the transaction lifecycle, the ID generation service is invoked to combine the random unique identifier UUIDv4 with a monotonically increasing timestamp to generate a global transaction ID T. id ;
[0025] Based on global transaction ID T id and external business requests R in The metadata is retrieved from the definition library and the corresponding SAGA process state machine definition object S is loaded. def Instantiate the transaction context object Ctx in memory;
[0026] Based on the Write-Ahead Log (WAL) principle, before the driving state machine performs its initial state transition, the transaction context object Ctx is serialized and written to persistent storage, generating the initial transaction context instance Ctx. init .
[0027] Furthermore, the method for executing the single-step state transition includes:
[0028] Based on the current state q currentThe SAGA process state machine definition object S contained in the second transaction context object Ctx' def In the process, find and locate the state q. current The specific business operations that are bound to it;
[0029] Call the transactional data source adapter method corresponding to the specific business operation to obtain the operation execution result (result), which belongs to the predefined event alphabet ∑ and is used to represent the success or failure of the business operation.
[0030] With the current state q current Using the operation execution result as input, query the preset state transition function δ to determine the next transition state q corresponding to this state transition. next ;
[0031] The following is a transition state q next Update the second transaction context object Ctx' in memory, append the details of this business operation to the execution history, serialize the updated second transaction context object Ctx', and generate the third transaction context object Ctx. final .
[0032] Furthermore, the audit log... audit The methods for generating archives include:
[0033] Obtain and deserialize the initial transaction context instance Ctx init Reconstruct the second transaction context object Ctx' and determine the current state q of the second transaction context object Ctx'. current Does it belong to the final state set F? If the current state q current If it does not belong to the final state set F, then the current state q is used. current As a basis for execution, a state-driven execution loop is initiated and maintained;
[0034] Based on the current state q in the execution loop current Locate and execute the corresponding business operation to obtain the operation execution result result in the event alphabet ∑, based on the current state q. current Based on the operation execution result (result), query the state transition function δ to determine the next transition state (q). next Using the next migration state q next Update the second transaction context object Ctx' and generate the third transaction context object Ctx. final ;
[0035] When a third transaction context object Ctx is detected final The current state q currentWhen the state belongs to the final state set F, the execution loop terminates and the third transaction context object Ctx is transferred. final The final transaction context object is considered as such; the final result R of the transaction is determined based on the final transaction context object's termination state, currentState. final If the final state currentState is a successful transaction commit state, then the final result R is determined. final If the transaction has been committed and the final state currentState is a transaction abort / rollback state, then the final result R is determined. final The transaction has been aborted; extract the execution history from the final transaction context object to archive and generate an audit log. audit .
[0036] The data source-driven no-code SaaS application rapid development system is used to implement the above-mentioned data source-driven no-code SaaS application rapid development method, including a visual transaction modeling module, a state machine definition generation module, a transaction instance initialization module, and a transaction process orchestration module.
[0037] The visualization transaction modeling module is used to construct a directed acyclic graph G of the forward business process. f , is the directed acyclic graph G f Forward operation node n f Establish and compensate operation node n c Semantic associations, generating a compensation link set L c All operation nodes are semantically bound to the transactional data source adapter, a mapping function M is established, and a visual transaction model D is generated by aggregation. v =(G f ,L c ,M);
[0038] The state machine definition generation module is used to parse the visual transaction model D. v Generate transaction step sequence Based on the transaction step sequence T, a finite state set Q and a state transition function δ are constructed. The finite state set Q, the state transition function δ, and other formal components are aggregated and encapsulated to generate an SAGA process state machine definition object S. def =(Q,∑,δ,q0,F);
[0039] The transaction instance initialization module is used to generate a global transaction ID T when the transaction lifecycle starts. id According to the global transaction ID T idx and external business requests R in Request to load SAGA process state machine definition object S defConstruct a transaction context object Ctx; serialize the transaction context object Ctx according to the Write-Ahead Log (WAL) principle to generate an initial transaction context instance Ctx. init ;
[0040] The transaction orchestration module is used to load and deserialize the initial transaction context instance Ctx. init Rebuild the second transaction context object Ctx' and start a state-driven execution loop with a non-terminal state as the persistence condition; in the iteration of the execution loop, perform a single-step state transition; and in the execution loop, due to the current state q current After a transaction terminates due to belonging to the final state set F, the final result R of the transaction is determined. final And archive and generate audit logs. cudit .
[0041] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0042] This invention avoids the difficulty of manually designing and drawing complex error handling branches in a visual flowchart by declaratively and non-intrusively associating positive business logic with compensation and rollback logic, thereby reducing the implementation complexity of building reliable distributed transactions in a no-code environment.
[0043] This invention uses automated compilation technology to convert a visual model containing business logic into a machine-executable definition that strictly follows the finite state machine theory. This solves the problem of systematically defining and ensuring the consistency of behavior of complex transactions across all possible paths in a no-code environment due to the lack of formal means.
[0044] This invention improves upon the problem in traditional distributed systems where transient failures of coordinator nodes can lead to the permanent loss or uncertain status of received transaction requests by pre-writing the transaction context containing the complete execution intent to persistent storage during the transaction initiation phase, in accordance with the write-ahead log principle.
[0045] This invention improves upon the technical shortcomings of traditional workflow engines that suffer from inconsistent transaction states or permanent loss of execution progress due to unexpected interruptions when executing long-cycle business processes by persisting the complete transaction context, which includes the next state and execution history, in each iteration of the execution loop. Attached Figure Description
[0046] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0047] Figure 1 This is a flowchart illustrating the principle of the data source-driven no-code SaaS application rapid development method of the present invention.
[0048] Figure 2 This is a functional block diagram of the data source-driven no-code SaaS application rapid development system of the present invention. Detailed Implementation
[0049] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0050] Example 1
[0051] Please see Figure 1 As shown, this embodiment provides a rapid no-code SaaS application development method based on data source driving, including:
[0052] S1000, construct the directed acyclic graph G of the positive business process. f , is the directed acyclic graph G f Forward operation node n f Establish and compensate operation node n c Semantic associations, generating a compensation link set L c All operation nodes are semantically bound to the transactional data source adapter, a mapping function M is established, and a visual transaction model D is generated by aggregation. v =(G f ,L c M).
[0053] Specifically, this step aims to transform complex distributed transaction requirements into a formalized and machine-interpretable specification, namely the visual transaction model D, through high-level abstraction and visual modeling. v =(G f ,L c ,M), to ensure the atomicity of operations across heterogeneous data sources.
[0054] Further, step S1000 includes:
[0055] Step S1100: Capture business logic and construct a directed acyclic graph G of the forward business process. f The directed acyclic graph G f From the forward node set N f and execution edge set E fcomposition.
[0056] Specifically, this step aims to transform the abstract business logic in the developer's mind into a structured and machine-readable formal graphical model, namely a Directed Acyclic Graph (DAG) of the forward business process. f =(N f E f This provides a contextual basis for subsequent transaction consistency control and cross-data source execution engine generation.
[0057] In the specific implementation, the system listens for and captures the developer's interaction events in the graphical designer, such as node drag-and-drop and edge connection operations. Each business function placed on the canvas, such as "create customer profile" or "update product inventory," is instantiated as an abstract forward node, denoted as n. f These nodes currently serve only as placeholders for business semantics and are not yet bound to any specific data source. All forward operation nodes together constitute a forward node set (N) representing all steps of the business process. f Simultaneously, the connections between nodes are resolved into directed edges that define the execution order, forming an execution edge set (E). f The above positive node set N f and execution edge set E f A directed acyclic graph G that aggregates into positive business logic f =(N f E f ).
[0058] Among them, G f A directed acyclic graph representing positive business logic is used to describe all the steps and their order when the business is successfully executed, through nodes and directed edges. n represents the set of forward nodes, which is a finite set of all nodes with forward operations in a directed acyclic graph; f A general symbol representing a node in a forward operation. In a set of forward nodes, each specific node instance is identified by a letter with a subscript, such as... and Representing the forward node set N respectively f The i-th and j-th forward operation nodes in the set; k represents the set of forward nodes N. f The total number of nodes containing forward operation nodes. E f The execution edge set is represented by the directed acyclic graph G. f The set of all directed edges in the set, where each directed edge is composed of node pairs. This indicates that the predecessor constraint relationship is defined, i.e., the i-th forward operation node. The operation represented must be successfully completed before the start of the j-th forward operation node.
[0059] Step S1200: Identify the directed acyclic graph G f Forward operation node n f Based on the associated operations captured in the graphical interface, the forward operation node n is established. f Its corresponding compensation operation node n c The semantic relationships between them generate a compensation link set L c .
[0060] Specifically, this step aims to define corresponding reverse operations or compensation logic for operations that require transaction guarantees in the forward business process in a declarative and non-intrusive manner, thereby establishing a contract for transaction rollback, which is the core link to ensure the eventual consistency of business processes across heterogeneous data sources.
[0061] In the specific implementation process, it is based on the directed acyclic graph G defined in step S1100. f =(N f E f Identify the positive operation nodes n that require transaction guarantees. f For each identified positive operation node n f Developers can drag and drop the corresponding compensation node from the component panel, denoted as n. c Then, using the platform's compensation linking tool, a forward operation path is established from the source node n. f To the target compensation operation node n c The semantic links between them. The key to this operation lies in its declarative nature: developers only need to specify the compensation correspondence of a certain forward operation, and there is no need to specify it in the directed acyclic graph G. f The system designs and draws complex error handling branches and rollback call logic. This design achieves a structural separation between forward execution logic and exception compensation logic, reducing the implementation complexity for developers building reliable distributed transactions in a no-code environment. Each declared compensation relationship is captured and uniformly stored as a Compensation Link Set, denoted as...
[0062] Among them, L c The compensation link set is composed of node order pairs. A finite set; The compensation link is an ordered binary tuple, i.e., the set of forward nodes N. fThe i-th source forward operation node Its corresponding set of compensation nodes N c The i-th target compensation operation node The transaction rollback contract relationship between them. The set of compensated nodes is a directed acyclic graph G. f All compensation operation nodes n c A finite set; n c The general symbol representing the compensation operation node. In the compensation node set, specific compensation node instances are identified by letters with subscripts, such as... Each compensation operation node n c This represents a reverse business operation that offsets the impact of a positive operation; m represents the set of compensation nodes N. c Includes compensation operation nodes n c The total number.
[0063] Step S1300, the directed acyclic graph G f Each operation node in the graph is bound to a callable method in the transactional data source adapter, and a mapping function M is established; and the acyclic graph G is then mapped to the graph. f Compensation Link Set L c The mapping function M is then aggregated to generate a visual transaction model D. v =(G f ,L c M).
[0064] Specifically, this step aims to connect the defined abstract business model with the specific technical implementation, and to establish directly executable implementation logic for each graphical node representing a business operation.
[0065] In the specific implementation process, the directed acyclic graph G defined in step S1100 on the canvas will be... f =(N f E f All positive operation nodes n in ) f and the compensation node set N constructed in step S1200 c All compensation operation nodes n cThis process involves sequentially binding the data to the actual data source. When a developer selects any operation node, the platform's property panel lists all predefined transaction-aware data source adapters. These adapters are key architectural components used to encapsulate the access protocols, authentication methods, and data format conversions of heterogeneous data sources, such as relational databases, microservice APIs, and message queues, into a unified and standardized interface. Developers simply need to select a target adapter from the transaction-aware data source adapter set A and then select a method from its exposed method list that matches the business semantics of the current node for binding. The essence of this visual binding operation is creating a mapping function M, assigning a callable concrete implementation to each abstract node, without requiring the developer to write any code. The specific process formula is as follows:
[0066] M:(N f ∪N c )→∪ ak'∈A ({a k'}×Methods(a k' ));
[0067] Where M represents the mapping function, used for each operation node, i.e., the forward operation node n f and compensation operation node n c Specify the corresponding technical implementation. ":" represents the separator, used to separate the function name and the function's input set. (N f ∪N c A represents the union of all operation nodes on the canvas, which is the domain of the mapping function M. → represents the mapping symbol, used to point to the set of all possible output results of the mapping function M. A = {a1, a2, ..., a...} p} represents the collection of all predefined transactional data source adapters; a k' This represents the k'-th transactional data source adapter in the transactional data source adapter set A; k' represents the index of the transactional data source adapter set A, which is an integer from 1 to p; p represents the total number of predefined transactional data source adapters. Methods(a k' ) represents the k'-th transactional data source adapter a k' The set of exposed methods that can be invoked externally.
[0068] Finally, by combining the stages of steps S1100 and S1200, a structured and information-complete visual transaction model D is generated. v =(G f ,L c The visual transaction model D). vIt is a composite data structure used to encapsulate the forward execution logic, compensation and rollback logic, and implementation details related to the underlying data source involved in distributed transactions into a unified and self-consistent digital asset. Among them, G... f A directed acyclic graph (DAG) representing a forward business process is used to define all operational steps and their partial order of execution when the business is successfully executed, and is the foundation of transaction execution; L c M represents the compensation link set, used to define the correspondence between forward operations and compensation operations in a declarative contract manner, and serves as the basis for transaction rollback in abnormal situations; M represents the mapping function, used to map all abstract operation nodes in the model, including forward operation node n. f and compensation operation node n c It binds to specific executable methods in the transactional data source adapter, serving as a bridge connecting business intent and technical implementation.
[0069] S2000, Analysis and Visualization of Transaction Model D v Generate transaction step sequence T = Based on the transaction step sequence T, a finite state set Q and a state transition function δ are constructed. The finite state set Q, the state transition function δ, and other formal components are aggregated and encapsulated to generate an SAGA process state machine definition object S. def =(Q,∑,δ,q0,F).
[0070] Specifically, this step aims to use automated compilation technology to transform the visual transaction model D built in step S1000 into... v This is transformed into an SAGA process definition that conforms to the Finite State Machine (FSM) theory. This definition is encapsulated as a quintuple structure, including the state set Q, the event alphabet ∑, the state transition function δ, the initial state q0, and the final state set F, i.e., the SAGA process state machine definition object S. def =(Q,∑,δ,q0,F), which provides a formal basis for the subsequent execution of the transaction orchestration engine.
[0071] Further, step S2000 includes:
[0072] Step S2100, visualize the transaction model D. v Forward operation node n f Based on the execution edge set E f Perform topological sorting to generate a linear execution sequence, and combine it with the compensation link set L. c The mapping function M is used to match and extract positive operations for each operation node in the linear execution sequence. and compensation operations Constructing a sequence of transaction steps
[0073] Specifically, this step aims to visualize the transaction model D based on a graph structure. v The process involves parsing and linearization to generate a machine-readable and ordered sequence of instructions, providing data input for the subsequent automated generation of the state machine.
[0074] In the specific implementation process, the compiler processes the input visual transaction model D. v Perform in-depth analysis and information integration. This involves analyzing the directed acyclic graph G representing the positive business logic. f =(N f E f The topological sorting algorithm is then executed on the directed acyclic graph G. f The execution edge set E defined in f All forward operation nodes n f ∈n f The operations are arranged into a linear execution sequence that satisfies the business dependencies and is uniquely determined. The compiler then traverses this linear execution sequence and performs operations on each forward node within it. Perform the following processing operation: Query the compensation link set L c To determine whether there are paired compensation operation nodes. If a corresponding compensation operation node exists Then the forward operation node is obtained through the mapping function M. Its corresponding compensation operation node The bound, directly callable transactional data source adapter methods.
[0075] Through the above process, information scattered across graph structures, set structures, and mapping relationships is effectively integrated and ultimately constructed into a sequence of transaction steps. Where T represents the sequence of transaction steps, which is an ordered list containing all transaction stages, used to analyze the directed acyclic graph G. f Perform a topological sort. Represents the k-th step in the sequence of transaction steps T. i The k-th transaction step contains the k-th... i All the operational information required for each transaction phase, i.e., the forward operation of step i. and the compensation operation in step i This represents the index of the transaction step sequence T, with a value ranging from 1 to k. total A positive integer used to identify the current transaction step; k total This represents the total number of transaction step sequences T, and its value is equal to the directed acyclic graph G. f Forward operation node n f The total number k, i.e., k total =k. This represents the forward operation at step i, used in conjunction with the forward operation node n. f Binding is performed, and the value is resolved by the mapping function M to the corresponding forward operation node. To obtain, that is This represents the compensation operation at step i, used in conjunction with the compensation operation node. The binding is performed, and the value is obtained by parsing the corresponding compensation operation node by the mapping function M. get.
[0076] Step S2200: Define a global state based on the transaction step sequence T, and traverse each transaction step in the transaction step sequence T. Generate the corresponding local state By analyzing the global state and all local states Perform a union operation to construct a finite set of states Q.
[0077] Specifically, this step aims to construct a complete and unambiguous state space for the entire transaction process, transforming the transaction step sequence T constructed in step S2100 into a static and formalized finite state set Q.
[0078] In the specific implementation process, a finite state set Q is constructed based on the input transaction step sequence T, which serves as the core component of the finite state machine (FSM).
[0079] First, define the global states describing the process lifecycle, including the initial state q0 and the final state set F. The initial state q0 is the unique starting point for the execution of the finite state machine (FSM), i.e., the state before the transaction process begins; the final state set F... Including the transaction commit success status and transaction abort rollback status It covers all possible endpoints for the completion of a transaction.
[0080] Subsequently, each transaction step in the transaction step sequence T is traversed. And generate the corresponding local state for it. These local states Used to describe the transaction steps Key operations during execution, such as "performing a forward operation" or "performing a compensation operation".
[0081] Finally, the union of all defined global states and the local states corresponding to each transaction step is performed to form a finite set of states Q of the SAGA process state machine. The specific process formula is as follows:
[0082]
[0083] Here, Q represents a finite set of states, containing all discrete states that the SAGA process state machine may enter throughout its entire lifecycle. ∪ represents the union symbol, used to combine the initial state q0 with the set of all local states corresponding to each transaction step. The final state set F is then merged into a complete finite state set Q. q0} represents the initial state set. This represents the set of all local states, used to generate all local states corresponding to each transaction step; The union operator is represented by an index k. i Incrementing from 1 to k total The iterative process; k i The index representing the sequence of transaction steps T is consistent with the definition in step S2100; k total This represents the total number of transaction step sequences T, consistent with the definition in step S2100; Indicates the kth i Transaction steps A subset of the generated local states; Indicates the kth i Transaction steps The positive execution state is the current process executing the k-th iteration. i Transaction steps positive operation Indicates the kth i Transaction steps The compensation execution status is the current process executing the k-th iteration. i Transaction steps Compensation operation
[0084] Step S2300: Based on the finite state set Q and the predefined event alphabet ∑, according to the forward execution order and compensation logic of the transaction step sequence T, generate state transition rules for each non-terminal state in the finite state set Q, and construct the state transition function δ.
[0085] Specifically, this step aims to inject dynamic behavioral logic into the static finite state set Q constructed in step S2200, and to clarify the evolution path of the transaction process in response to external events, such as operation success or failure, by automatically generating complete transition rules.
[0086] In the specific implementation, an event alphabet ∑ is defined as the set of atomic events that can drive state changes. These events are abstracted as the deterministic results returned by each data source adapter method after execution. ∑ = {Success, Failure} contains the set of all events that can potentially trigger state transitions, namely, the mutually exclusive success and failure events.
[0087] Subsequently, based on the forward execution order and compensation logic in the transaction step sequence T, for each non-terminal state in the finite state set Q, and for each possible event in the event alphabet ∑, a state transition rule is systematically created. All state transition rules together constitute the state transition function δ, which describes all dynamic behavior paths of the SAGA process. The specific transition rules are as follows:
[0088] I. Forward Transition. This set of rules defines the state evolution path of a business process in the absence of anomalies.
[0089] For all non-final steps k i ∈[1,k total When the state machine is in a forward execution state that is not the final step, If a success event (Success) is received indicating that the operation at step k was successful, the state will deterministically transition to the next step k. i+1 positive execution state The specific state transition rule is expressed in the following formula:
[0090]
[0091] For the final step k total When the state machine is in the last step k total positive execution state Upon successful completion of this step, the state will transition to the transaction commit successful state. The specific state transition rule is expressed in the following formula:
[0092]
[0093] II. Compensation Initiation. This rule defines the key triggering conditions for the business process to transition from the forward execution path to the compensation path.
[0094] For any step k i ∈[1,k total When the state machine is at any step k i positive execution state If a failure event (Failure) is received indicating that the operation at that step failed, the process will immediately stop proceeding forward and transfer to the current step k. i The corresponding compensation execution status The specific state transition rule is expressed in the following formula:
[0095]
[0096] III. Compensation Transfer. This set of rules defines the reverse state evolution path of the business process during the rollback phase.
[0097] For all non-initial steps k i ∈(1,k total When the state machine is in any non-initial step compensation execution state If a success event (Success) is received indicating that the compensation operation in this step was successful, the state will deterministically transition to the previous step k. i-1 Compensation execution status The specific state transition rule is expressed in the following formula:
[0098]
[0099] For the initial step k i =1, when the state machine is in the compensation execution state of the first step k1. Furthermore, when this compensation operation is successfully completed, the state will transition to the transaction abort and rollback state. The specific state transition rule is expressed in the following formula:
[0100]
[0101] Step S2400: Aggregate the finite state set Q, the event alphabet ∑, the state transition function δ, the initial state q0, and the final state set F, and encapsulate them into a SAGA process state machine definition object S. def =(Q,∑,δ,q0,F).
[0102] Specifically, this step aims to aggregate and encapsulate all the discrete formal components generated in the preceding steps into a unified, self-contained, and deployable standardized software artifact, namely the SAGA process state machine definition object S. def =(Q,∑,δ,q0,F), realizing the transformation from abstract mathematical model to specific engineering implementation.
[0103] In the specific implementation process, the formal components such as the finite state set Q constructed in step S2200, the event alphabet ∑ defined in step S2300, the state transition function δ created in step S2300, and the initial state q0 and final state set F defined in step S2200 are assembled and encapsulated into a structured data structure according to predetermined rules, and encoded using industry-standard serialization formats such as JSON, XML, and YAML, thereby generating the SAGA process state machine definition object S. def =(q,∑,δ,q0,F).
[0104] S3000 generates a global transaction ID T at the start of the transaction lifecycle. idAccording to the global transaction ID T id and external business requests R in Request to load SAGA process state machine definition object S def Construct a transaction context object Ctx; serialize the transaction context object Ctx according to the Write-Ahead Log (WAL) principle to generate an initial transaction context instance Ctx. init .
[0105] Specifically, this step aims to define object S based on the SAGA process state machine generated in step S2400. def For each newly entered external business request R in Create a unique, persistent, and fault-tolerant initial transaction context instance Ctx. init This provides the necessary runtime environment for the formal launch of the SAGA process.
[0106] Further, step S3000 includes:
[0107] Step S3100: At the start of the transaction lifecycle, the ID generation service is invoked to combine the random unique identifier UUIDv4 with the monotonically increasing timestamp to generate a global transaction ID T. id .
[0108] Specifically, this step aims to address each newly initiated external business request R in Before entering business logic processing, an identifier T that is unique across the entire distributed system and has time-series attributes is generated in real time. id That is, the global transaction ID.
[0109] In the specific implementation process, as the first action in the transaction lifecycle, when the Transaction Coordinator Engine (TCE) receives an external business request R... in When this happens, the ID generation service will be invoked immediately. This service uses a composite generation algorithm to simultaneously meet the following two core requirements: First, spatial uniqueness, ensuring that the generated ID is unique in a multi-node, high-concurrency environment. id It should possess extremely high uniqueness to avoid conflicts; on the other hand, it should have temporal order, T id It should include monotonically increasing time information to enable sorting capabilities, facilitating the aggregation, retrieval, and troubleshooting of distributed logs.
[0110] To achieve the above objectives, T id A common strategy is to use a combination of a random unique identifier (UUIDv4) and a high-precision timestamp. The specific formula is as follows:
[0111] T id =Generate(UUIDv4,Timestamp);
[0112] Among them, T id The global transaction ID is a unique identifier assigned to a transaction instance; Generate(·) is the global transaction ID generation function, used to produce an identifier that satisfies both spatial uniqueness and temporal ordering; UUIDv4 is a universally unique identifier that conforms to version 4 of the standard, used to ensure the spatial uniqueness of the global transaction ID; Timestamp is a high-precision and monotonically increasing timestamp, used to provide time-series attributes for the global transaction ID.
[0113] Step S3200, based on global transaction ID T id and external business requests R in The metadata is retrieved from the definition library and the corresponding SAGA process state machine definition object S is loaded. def Instantiate the transaction context object Ctx in memory.
[0114] Specifically, this step aims to define the static SAGA process state machine object S. def Combined with the dynamic data of the transaction instance, a fully informed runtime object, namely the transaction context object Ctx, is created in memory.
[0115] In the specific implementation process, after obtaining the global transaction ID T id Afterwards, the Transaction Coordination Engine (TCE) performs the context construction task. First, based on the external business request R... in The metadata is retrieved from the predefined library and the corresponding SAGA process state machine definition object S is loaded. def Subsequently, the Transaction Coordination Engine (TCE) instantiates a Transaction Context Object (Ctx) in memory. This Transaction Context Object serves as the core control unit for the lifecycle of a transaction instance, aggregating and managing all the critical information required for transaction execution, including its identity, set of behavioral rules, initial state, execution history area, and business data payload. The specific expression formula for the Transaction Context Object (Ctx) is as follows:
[0116] Ctx={id,definition,currentState,history,payload};
[0117] Here, Ctx represents the transaction context object, which is the core control unit created in memory for a single transaction instance; id represents the unique identifier of the transaction instance, and its value is the global transaction ID T generated in step S3100. idThe definition represents the behavioral rule blueprint for a transaction, and its value is loaded from the SAGA process state machine definition object S in the definition library. def currentState represents the current state of the transaction instance, and its initial value is set to the SAGA process state machine definition object S. def The initial state q0 is defined in the code; history represents the execution history of transactions, initially an empty list used to sequentially append records of each state transition and operation result, providing a basis for auditing and troubleshooting; payload represents the business data payload, the value of which is obtained from external business requests R. in The business parameters extracted are used as input to specific methods of each transactional data source adapter during transaction execution.
[0118] Step S3300: Based on the Write-Ahead Log (WAL) principle, before the driving state machine performs the initial state transition, the transaction context object Ctx is serialized and written to the persistent storage medium, generating the initial transaction context instance Ctx. init .
[0119] Specifically, this step aims to persist the transaction context object Ctx instantiated in memory in step S3200 through the Write-Ahead Logging (WAL) mechanism, establish a reliable recovery anchor for the transaction, and ensure that the system still fully retains the execution intent of the transaction when the coordinator service is interrupted due to catastrophic failures such as crashes, thereby achieving safe recovery or orderly termination of the transaction.
[0120] In its implementation, this step, serving as a preparatory stage before the formal execution of the transaction, strictly adheres to the Write-Ahead Log (WAL) principle. Before the Transaction Coordination Engine (TCE) initiates its first business operation to the external data source—that is, before driving the state machine to perform its initial state transition—it must serialize the transaction context object (Ctx) and write it as an atomic record to a highly available and transaction-supporting persistent storage medium. Only after the persistent storage system confirms the success of this write operation is the transaction instance considered to have completed initialization and is ready to enter the execution phase. This mechanism of recording logs before executing transactions ensures that the transaction intent is reliably recorded before the operation begins, providing a basis for system recovery in the event of a crash or exception, thereby effectively avoiding data inconsistency. This persistent operation can be formally viewed as a function that maps volatile memory objects to stable storage records; the specific process formula is as follows:
[0121] Ctx init =Persist(Ctx);
[0122] Among them, Ctx initThis indicates the initial transaction context instance Ctx that was successfully written to persistent storage. init , is a stable storage record that identifies that the transaction is eligible for execution; Persist(·) represents the persistence operation function, used to return an initial transaction context instance Ctx of a record that has been persisted. init .
[0123] S4000, Load and deserialize the initial transaction context instance Ctx init Rebuild the second transaction context object Ctx' and start a state-driven execution loop with a non-terminal state as the persistence condition; in the iteration of the execution loop, perform a single-step state transition; and in the execution loop, due to the current state q current After a transaction terminates due to belonging to the final state set F, the final result R of the transaction is determined. final And archive and generate audit logs. audit .
[0124] Specifically, this step aims to utilize a state-driven execution loop based on the initial transaction context instance Ctx persisted in step S3300. init And in conjunction with the SAGA process state machine definition object S generated in step S2400 def It drives the transaction process in an orderly and reliable manner until it reaches the final state, thereby achieving transaction consistency guarantee across heterogeneous data sources at runtime.
[0125] Further, step S4000 includes:
[0126] Step S4100: Obtain and deserialize the initial transaction context instance Ctx init Reconstruct the second transaction context object Ctx' and determine the current state q of the second transaction context object Ctx'. current Does it belong to the final state set F? If the current state q current If it does not belong to the final state set F, then the current state q is used. current Based on the execution criteria, a state-driven execution loop is initiated and maintained.
[0127] Specifically, this step aims to activate a persistent initial transaction context instance Ctx. init And by loading its complete state information and definition from persistent storage into the coordinator's working memory, it reconstructs a second transaction context object Ctx', and establishes one with the current state q. current The control loop, which serves as the core driving force, provides a starting point and execution framework for the step-by-step execution of transactions.
[0128] In the specific implementation process, the Transaction Coordination Engine (TCE) obtains the initial transaction context instance (Ctx) by querying the persistent storage medium. init This acquisition operation can uniformly adapt to two types of scenarios: newly initiated transactions and transactions that need to be recovered after a system interruption. Upon successfully acquiring the initial transaction context instance Ctx... init Next, the Transaction Coordination Engine (TCE) deserializes this persistent instance data and reconstructs it in memory as a complete second transaction context object Ctx'. Then, the TCE starts a state-driven execution loop centered around the second transaction context object Ctx'. At the beginning of each loop iteration, the TCE's primary task is to read the current state to be processed, i.e., q, from the second transaction context object Ctx'. current =Ctx'.currentState, and use this as the basis for the current execution round. The duration condition of this execution loop is strictly set as follows: the current state Ctx'.currentState does not belong to the final state set F, and its formal condition is:
[0129] Step S4200, based on the current state q in the execution loop current Locate and execute the corresponding business operation to obtain the operation execution result result in the event alphabet ∑, based on the current state q. current Based on the operation execution result (result), query the state transition function δ to determine the next transition state (q). next Using the next migration state q next Update the second transaction context object Ctx' and generate the third transaction context object Ctx. final .
[0130] In the specific implementation process, this step defines and executes a single-step state transition, which serves as the atomic unit of the transaction process evolution. This is based on the current state q extracted in step S4100. current The Transaction Coordination Engine (TCE) executes an indivisible sequence of operations in the following order:
[0131] First, operation location. The Transaction Coordination Engine (TCE) determines the location based on the current state q. current The identifier, the SAGA process state machine definition object S contained in the second transaction context object Ctx' reconstructed in step S4100. def In the process, find and locate the specific operation closely related to the state, such as the forward operation in step i. Or the compensation operation in step i
[0132] Second, operation execution. The Transaction Coordination Engine (TCE) calls the corresponding transactional data source adapter method based on the mapping information of the specific operation, and waits for it to return the operation execution result `result` belonging to the event alphabet ∑ defined in step S2300. Here, `result` represents the operation execution result of the adapter operation, and its value is limited to either the success event `Success` or the failure event `Failure` in the event alphabet ∑ = {Success, Failure}.
[0133] Third, the next transition state is calculated. The Transaction Coordination Engine (TCE) will calculate the current state q. current Using the operation execution result as input, the state transition function δ created in step S2300 is queried to determine the next transition state q in a deterministic manner. next .
[0134] Fourth, context update and persistence. The transaction coordination engine TCE updates the second transaction context object Ctx' in memory, modifying the currentState field value of its transaction instance to the next migration state q. next The execution details of this operation are then appended as a log entry to the transaction's execution history field. Subsequently, the Transaction Coordination Engine (TCE) serializes the updated second transaction context object Ctx' to generate the third transaction context object Ctx. final And write back to the persistent storage medium atomically.
[0135] Through the aforementioned single-step state transition, it is ensured that the transaction context object in persistent storage maintains a clear and consistent state snapshot at all times. If the system crashes at any stage during the state transition process, the Transaction Coordination Engine (TCE) can safely resume execution based on this snapshot after recovery, thereby achieving resilient operation of the entire transaction process.
[0136] Step S4300, when the third transaction context object Ctx is detected final The current state q current When the state belongs to the final state set F, the execution loop terminates and the third transaction context object Ctx is transferred. final The final transaction context object is considered as such; the final result R of the transaction is determined based on the final transaction context object's termination state, currentState. final If the final state currentState is a successful transaction commit state, then the final result R is determined. final If the transaction has been committed and the final state currentState is a transaction abort / rollback state, then the final result R is determined. finalThe transaction has been aborted; extract the execution history from the final transaction context object to archive and generate an audit log. audit .
[0137] Specifically, this step aims to leverage the third transaction context object Ctx generated in step S4200. final By parsing its reached final states, a definite final transaction result R is generated. final And archive the complete execution history to form an audit log. audit This completes the lifecycle of the transaction instance.
[0138] In the specific implementation process, when the transaction coordination engine TCE starts the state-driven execution loop in step S4100, it loads the third transaction context object Ctx. final In the middle, its current state q was detected. current The process has now entered the final state set F, the execution loop terminates, and the process proceeds to the summary and archiving stage of this step.
[0139] At this stage, the Transaction Coordination Engine (TCE) will trigger the termination of the loop in the third transaction context object (Ctx). final Treat it as the final transaction context object and perform the following two core archiving operations:
[0140] I. Final Result Determination. The Transaction Coordination Engine (TCE) determines the final transaction result by examining the specific termination state recorded in the currentState field of the transaction instance of the final transaction context object. If the specific termination state currentState is a successful transaction commit... Then determine the final transaction result R of the transaction. final The currentState is "committed"; if the specific final state is "transaction aborted and rolled back", then it is "committed". Then determine the final transaction result R of the transaction. final It has been suspended.
[0141] II. Audit Log Extraction. The Transaction Coordination Engine (TCE) extracts the complete execution history recorded in the `history` field of the final transaction context object and archives it as the audit log for this transaction execution. audit .
[0142] Example 2
[0143] This embodiment, based on Embodiment 1, provides a data source-driven, no-code SaaS application rapid development system, such as... Figure 2As shown, it includes a visual transaction modeling module, a state machine definition generation module, a transaction instance initialization module, and a transaction process orchestration module;
[0144] The visualization transaction modeling module is used to construct a directed acyclic graph G of the forward business process. f , is the directed acyclic graph G f Forward operation node n f Establish and compensate operation node n c Semantic associations, generating a compensation link set L c All operation nodes are semantically bound to the transactional data source adapter, a mapping function M is established, and a visual transaction model D is generated by aggregation. v =(G f ,L c ,M);
[0145] The state machine definition generation module is used to parse the visual transaction model D. v Generate transaction step sequence Based on the transaction step sequence T, a finite state set Q and a state transition function δ are constructed. The finite state set Q, the state transition function δ, and other formal components are aggregated and encapsulated to generate an SAGA process state machine definition object S. def =(Q,∑,δ,q0,F);
[0146] The transaction instance initialization module is used to generate a global transaction ID T when the transaction lifecycle starts. id According to the global transaction ID T id and external business requests R in Request to load SAGA process state machine definition object S def Construct a transaction context object Ctx; serialize the transaction context object Ctx according to the Write-Ahead Log (WAL) principle to generate an initial transaction context instance Ctx. init ;
[0147] The transaction orchestration module is used to load and deserialize the initial transaction context instance Ctx. init Rebuild the second transaction context object Ctx' and start a state-driven execution loop with a non-terminal state as the persistence condition; in the iteration of the execution loop, perform a single-step state transition; and in the execution loop, due to the current state q current After a transaction terminates due to belonging to the final state set F, the final result R of the transaction is determined. final And archive and generate audit logs. audit .
[0148] The parts of the technical solutions provided in the embodiments of this application that are consistent with the implementation principles of corresponding technical solutions in the prior art have not been described in detail to avoid excessive elaboration.
[0149] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the invention. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A data source-driven, no-code SaaS application rapid development method, characterized in that, include: Construct a directed acyclic graph of the positive business process, establish semantic associations between positive operation nodes and compensation operation nodes in the directed acyclic graph, generate a compensation link set, semantically bind all operation nodes in the directed acyclic graph to a transactional data source adapter to establish a mapping function, and aggregate the directed acyclic graph, compensation link set and mapping function to generate a visual transaction model. The transaction step sequence is generated by parsing and visualizing the transaction model. Based on the transaction step sequence, a finite set of states and a state transition function are constructed. The finite set of states, the state transition function, the predefined event alphabet, the initial state and the final state set are aggregated and encapsulated to generate a SAGA process state machine definition object. The initial state is the state before the transaction process has started, and the final state set covers all possible endpoints where the transaction execution ends. At the start of the transaction lifecycle, a global transaction ID is generated. Based on the global transaction ID and the external business request, the SAGA process state machine definition object is loaded to construct a transaction context object. The transaction context object is serialized according to the write-ahead log principle to generate an initial transaction context instance. Load and deserialize the initial transaction context instance to reconstruct the second transaction context object, and start a state-driven execution loop with non-terminal state as the persistence condition; In the iteration of the execution loop, a single-step state transition is performed; After the execution loop terminates because the current state belongs to the final state set, the final result of the transaction is determined and archived to generate an audit log.
2. The method for rapid development of no-code SaaS applications based on data source-driven approaches according to claim 1, characterized in that, The aggregation and generation method of the visualized transaction model includes: Capture business logic and construct a directed acyclic graph of the positive business process. The directed acyclic graph consists of a set of positive nodes and a set of execution edges. The set of positive nodes is a finite set of all positive operation nodes in the directed acyclic graph. The set of execution edges is a set of all directed edges in the directed acyclic graph. Each directed edge is used to represent the predecessor constraint relationship between two positive operation nodes. Identify the positive operation nodes in the directed acyclic graph, and based on the associated operations captured in the graphical interface, establish the semantic association between the positive operation nodes and their corresponding compensation operation nodes to generate a compensation link set. Each operation node in the directed acyclic graph is bound to a callable method in the transactional data source adapter to establish a mapping function; the directed acyclic graph, the compensation link set, and the mapping function are then aggregated to generate a visual transaction model.
3. The method for rapid development of no-code SaaS applications based on data source drive according to claim 2, characterized in that, The method for generating the SAGA process state machine definition object includes: For the positive operation nodes in the visualized transaction model, a topological sort is performed based on the execution edge set in the directed acyclic graph to generate a linear execution sequence. Combining the compensation link set and the mapping function, positive operations and compensation operations are matched and extracted for each operation node in the linear execution sequence to construct a transaction step sequence. A global state is defined based on a sequence of transaction steps, and a corresponding local state is generated by traversing each transaction step in the sequence. A finite set of states is constructed by performing a union operation on the global state and all local states. Based on a finite set of states and a predefined event alphabet, and according to the forward execution order of the transaction step sequence and compensation logic, state transition rules are generated for each non-terminal state in the finite set of states, and a state transition function is constructed. Aggregate a finite set of states, an event alphabet, state transition functions, and initial and final state sets, and encapsulate them into a SAGA process state machine definition object.
4. The method for rapid development of no-code SaaS applications based on data source drive according to claim 3, characterized in that, The state transition rules include: When the state machine is in the forward execution state of any non-final step and receives a Success event, the state transitions to the forward execution state of the next step; when the state machine is in the forward execution state of the final step and the operation is successfully completed, the state transitions to the transaction commit successful state. When the state machine is in the forward execution state of any step and receives a Failure event, the forward process is immediately interrupted and the state is transferred to the compensation execution state corresponding to the current step. When the state machine is in the compensation execution state of any non-starting step and receives a Success event indicating successful compensation operation, the state rolls back to the compensation execution state of the previous step; when the state machine is in the starting step and compensation is successful, the state is transitioned to the transaction abort and rollback state.
5. The method for rapid development of no-code SaaS applications based on data source-driven approaches according to claim 1, characterized in that, The method for generating the initial transaction context instance includes: At the start of the transaction lifecycle, the ID generation service is invoked to combine a random unique identifier with a monotonically increasing timestamp to generate a global transaction ID. Based on the global transaction ID and the metadata of the external business request, query and load the corresponding SAGA process state machine definition object from the definition library, and instantiate the transaction context object in memory; Based on the write-ahead log principle, before the driving state machine performs the initial state transition, the transaction context object is serialized and written to the persistent storage medium to generate the initial transaction context instance.
6. The method for rapid development of no-code SaaS applications based on data source-driven approaches according to claim 1, characterized in that, The single-step state transition execution method includes: Based on the current state, locate and position the specific business operation bound to the current state in the SAGA process state machine definition object contained in the second transaction context object; Call the transactional data source adapter method corresponding to the specific business operation to obtain the operation execution result, which belongs to the predefined event alphabet and is used to represent the success or failure of the business operation. Using the current state and the operation execution result as input, query the preset state transition function to determine the next transition state corresponding to this state transition. The second transaction context object in memory is updated in the next migration state, and the details of this business operation are appended to the execution history. The updated second transaction context object is then serialized to generate the third transaction context object.
7. The method for rapid development of no-code SaaS applications based on data source-driven approaches according to claim 1, characterized in that, The method for archiving and generating audit logs includes: Obtain and deserialize the initial transaction context instance, reconstruct the second transaction context object, and determine whether the current state of the second transaction context object belongs to the final state set; if the current state does not belong to the final state set, then use the current state as the execution basis to start and maintain the state-driven execution loop. Based on the current state in the execution loop, locate and execute the corresponding business operation to obtain the operation execution result in the event alphabet. Based on the current state and the operation execution result, query the state transition function to determine the next transition state. Use the next transition state to update the second transaction context object and generate the third transaction context object. When the current state of the third transaction context object is detected to belong to the final state set, the execution loop is terminated, and the third transaction context object is regarded as the final transaction context object; the final result of the transaction is determined based on the final state of the final transaction context object; if the final state is the transaction commit successful state, the final result is determined to be committed; if the final state is the transaction abort and rollback state, the final result is determined to be aborted; the execution history in the final transaction context object is extracted and archived to generate an audit log.
8. A data source-driven no-code SaaS application rapid development system, used to implement the data source-driven no-code SaaS application rapid development method according to any one of claims 1-7, characterized in that, The system includes a visual transaction modeling module, a state machine definition generation module, a transaction instance initialization module, and a transaction process orchestration module. The visualization transaction modeling module is used to construct a directed acyclic graph of the positive business process, establish semantic associations between positive operation nodes and compensation operation nodes in the directed acyclic graph, generate a compensation link set, semantically bind all operation nodes in the directed acyclic graph to the transactional data source adapter to establish a mapping function, and aggregate the directed acyclic graph, the compensation link set and the mapping function to generate a visualization transaction model. The state machine definition generation module is used to parse the visual transaction model to generate a transaction step sequence, construct a finite state set and a state transition function based on the transaction step sequence, and aggregate and encapsulate the finite state set, state transition function, predefined event alphabet, initial state and final state set to generate a SAGA process state machine definition object. The transaction instance initialization module is used to generate a global transaction ID when the transaction lifecycle starts, and based on the global transaction ID and the external business request, request to load the SAGA process state machine definition object and construct a transaction context object; and serialize the transaction context object according to the write-ahead log principle to generate an initial transaction context instance. The transaction orchestration module is used to load and deserialize the initial transaction context instance to reconstruct the second transaction context object, and start a state-driven execution loop with a non-terminal state as the persistence condition. In the iteration of the execution loop, a single-step state transition is performed; After the execution loop terminates because the current state belongs to the final state set, the final result of the transaction is determined and archived to generate an audit log.