Introduction to the design of traditional workflow engines

Source: Internet
Author: User

The traditional workflow engine can be designed from three main aspects: static structure, dynamic structure, and coupling structure:

1. static structure: the data structure after workflow activity persistence determines the workflow engine driving algorithm;

2. Dynamic structure: the object graph structure of the workflow engine in the memory determines the driving capability of the workflow engine;

3. Coupling Structure: the coupling between the workflow engine and the business flow determines the application capability of the workflow engine;

The preceding three aspects are described as follows:

1. static structure: After workflow activity persistence (taking database persistence as an example), several records are displayed in the database, such as the current workflow instance, referenced template, and current activity, the data structure stored by the current executor determines the implementation method of the driving algorithm and the complexity of the activity association structure;

2. dynamic Structure: The workflow engine loads persistent activities into the memory and uses the template definition to restore them to a complete object graph. A series of sequential structures are inserted before/after the current activity, it can control the flow of activities and trigger events before and after the activities are executed. The dynamic structure must fully utilize the advanced features of the development language, such as reflection, dynamic compilation, and Script Host, to enhance the drive capability of the workflow engine;

3. coupling Structure: The workflow engine runs under the business flow, and adopts the interface and implementation separation for the business flow driver. The process-driven and data-driven methods are separated, the so-called separation of interfaces and implementations means that the workflow engine shields application differences through interfaces, flow-driven and data separation means that the workflow engine controls the business-driven (including the collection of series of events built on it). The data access of the business is implemented by various applications. For example: business Object definition standards (provided by engines), specific implementation of business objects (provided by applications), etc.

Recommendation: The Design Philosophy of Microsoft Workflow Foundation has benefited me a lot in the future. It is worth learning.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.