Process model analysis (4)

xiaoxiao2021-03-14  198

Fourth, process combination nested model

It is now until now, the model is positioned in the "relationship between tasks." Regardless of the previous divergent operation model, or the aggregation operation model is just the task relationship inside the process, and does not involve the relationship between the flow and the process.

Please refer to the picture below, although the task is complicated, but all the tasks are limited in the same process, and in order to consolidate some of the previous operation model concepts, I deliberately contain parallel, divergent, self-circulating, identification, synchronous aggregation. Wait model.

Pic 4-1)

Let's take a look at the flow below, it looks simpler than the above process, is actually not. Look carefully, in fact, there are two processes that are running, one sub-process in one main proximity.

Figure (4-2)

Next, let's take a look at what is the relationship between the process and the process, what possible models exist.

4.1 Inclusive

The embedded model has just mentioned that in a main process, one or more subflows are embedded. Each sub-process itself may be independently running; it is also possible to be a main proximity auxiliary sub-process that cannot be operated independently.

Main process waiting method

Please refer to the figure below, when the mainstream is running to the "Router" location, the operation of a sub-process will be activated; after the subflow is running, the "Router" position of the main proxidation will be running, and the operation of the main process will continue.

Figure (4-3)

In this way, when the subflow is run, the main process will be suspended, waiting for the end of the subscription.

Main proximity is also running

Compare the figure below and 4.1.1, it will find great difference.

As with the "main process", when the main process is running to the "Router" location, the operation of a sub-process is activated. However, after the activation subflow, the main proxidation is not stopped, but is based on the operation of the predetermined process; at the same time, the activated subflow is also in the soft turn state.

Speaking of this, it is estimated that many will ask, then when will the child flow return? Although in the figure below, the information indicated to the subflow is returned to the "task A3" of the main procedure. However, there are still many problems, such as: when aggregation, how to aggregate problems; and the runtime of main proximity and sub-process does not necessarily match proper, there may be main proximity to run to Task A3, and this time is still No running, and vice versa.

This situation, most of the "synchronous polymerization": If one is not reached, the other will wait. Of course, this may involve adverse factors waiting for timeout. At this time, choose to continue waiting, or send a message, or continue to run, is the design problem of the workflow engine.

Figure (4-4)

4.2 Embedded model

Different from the embedded model, it is the subflow of the embedded, not returning to the main process. After the main process activates the subflow, the main proxidation continues to run, and does not care about the operational status of the child process or the resulting result.

Referring to the chart below, you will find that it is very similar to the "main proxidation of the main proxidation" in the embedded model, the difference is that the child process will eventually return to the main proxidation.

Figure (4-5)

转载请注明原文地址:https://www.9cbs.com/read-129224.html

New Post(0)