Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space PRINSAG and version 9.0
Sv translation
languageen

No concurrency control

The following example rule set is composed of two loops. Each loop uses the Write To File action to write several lines of text to a text file with a small delay between the writing of each line.

 

If a single instance is run, the output looks like this:

************************* Starting Loop 1 *****************************
Loop 1 - Iteration: 1
Loop 1 - Iteration: 2
Loop 1 - Iteration: 3
************************* End of Loop 1 *******************************
####################### Start of Loop 2 ###############################
Loop 2 - iteration: 1
Loop 2 - iteration: 2
Loop 2 - iteration: 3
####################### End of Loop 2 #################################

 

If however multiple instances are run in quick succession, the output looks like this:

************************* Starting Loop 1 *************************
Loop 1 - Iteration: 1
************************* Starting Loop 1 *************************
Loop 1 - Iteration: 1
************************* Starting Loop 1 *************************
Loop 1 - Iteration: 1
Loop 1 - Iteration: 2
Loop 1 - Iteration: 2
Loop 1 - Iteration: 2
Loop 1 - Iteration: 3
Loop 1 - Iteration: 3
Loop 1 - Iteration: 3
************************* End of Loop 1 ***************************
************************* End of Loop 1 ***************************
************************* End of Loop 1 ***************************
####################### Start of Loop 2 ###########################
Loop 2 - iteration: 1
####################### Start of Loop 2 ###########################
Loop 2 - iteration: 1
####################### Start of Loop 2 ###########################
Loop 2 - iteration: 1
Loop 2 - iteration: 2
Loop 2 - iteration: 2
Loop 2 - iteration: 2
Loop 2 - iteration: 3
Loop 2 - iteration: 3
Loop 2 - iteration: 3
####################### End of Loop 2 #############################
####################### End of Loop 2 #############################
####################### End of Loop 2 #############################

Because each instance is writing to the file at the same time, the output from the instances is interleaved.

 

Limit Concurrency only

In the following example only the Limit Concurrency action is used. It is configured to allow only a single instance to run. The limiter is named LimitConcurrencyOnlyExample


From the time the Limit Concurrency action executes until the rule chain completes, no other instances of the rule chain will run. They will instead queue at the Limit Concurrency action until the currently executing instances completes. If there are multiple rule chain instances queued at the Limit Concurrency action, they will be released in the same order that they were queued: 


If the above rule set is enabled in a job and triggered three times in quick succession, a text file, which contains the following output, is generated:

************************* Starting Loop 1 *************************

Loop 1 - Iteration: 1
Loop 1 - Iteration: 2
Loop 1 - Iteration: 3
************************* End of Loop 1 ***************************
##################### Start Loop 2 ###############################
Loop 2 - repetition: 1
Loop 2 - repetition: 2
Loop 2 - repetition: 3
##################### End of Loop 2 ###############################
************************* Starting Loop 1 *************************
Loop 1 - Iteration: 1
Loop 1 - Iteration: 2
Loop 1 - Iteration: 3
************************* End of Loop 1 ***************************
###################### Start Loop 2 ##############################
Loop 2 - repetition: 1
Loop 2 - repetition: 2
Loop 2 - repetition: 3
###################### End of Loop 2 ##############################
************************* Starting Loop 1 *************************
Loop 1 - Iteration: 1
Loop 1 - Iteration: 2
Loop 1 - Iteration: 3
************************* End of Loop 1 ***************************
##################### Start Loop 2 ###############################
Loop 2 - repetition: 1
Loop 2 - repetition: 2
Loop 2 - repetition: 3
##################### End of Loop 2 ###############################

 

Note that only one instance of the chain was allowed to write to the file at once. Each instance completed both loops before the next instance was allowed to proceed. This is because when each instance acquires the limiter at the Limit Concurrency action, it holds it until it completes both loops. At the end of the second loop the limiter is automatically released because it is the end of the rule chain. The next instance waiting at the Limit Concurrency action is then able to acquire the limiter and proceed.

 

Limit Concurrency and Release Concurrency

In the following example both the Limit Concurrency action and the Release Concurrency action are used. The regions of the rule chain delimited by the Limit Concurrency and Release Concurrency action pair will be limited to a single instance running. Any other instances will queue at the Limit Concurrency action until the currently executing instances reaches the Release Concurrency action. The next waiting instance will then begin executing the actions within the Limit Concurrency to Release Concurrency region. 


If the above rule set is enabled in a job and triggered three times in quick succession, a text file, which contains the following output, is generated:

************************* Starting Loop 1 *************************
Loop 1 - Iteration: 1
Loop 1 - Iteration: 2
Loop 1 - Iteration: 3
************************* End of Loop 1 ***************************
************************* Starting Loop 1 *************************
Loop 1 - Iteration: 1
Loop 1 - Iteration: 2
Loop 1 - Iteration: 3
************************* End of Loop 1 ***************************
************************* Starting Loop 1 *************************
Loop 1 - Iteration: 1
Loop 1 - Iteration: 2
Loop 1 - Iteration: 3
************************* End of Loop 1 ***************************
##################### Start Loop 2 ###############################
Loop 2 - repetition: 1
Loop 2 - repetition: 2
Loop 2 - repetition: 3
##################### End of Loop 2 ###############################
###################### Start Loop 2 ##############################
Loop 2 - repetition: 1
Loop 2 - repetition: 2
Loop 2 - repetition: 3
###################### End of Loop 2 ##############################
##################### Start Loop 2 ###############################
Loop 2 - repetition: 1
Loop 2 - repetition: 2
Loop 2 - repetition: 3
##################### End of Loop 2 ###############################

 

Note that as in the previous example, the output within the loop is not interleaved as it was in the first example. But it is different from the previous example in that each instance was allowed to complete the first loop before the first instance was allowed to proceed with the second loop. This is because between the two loops the instance is releasing and re-acquiring the limiter which results in it effectively going to the end of the queue and having to wait its turn for the limiter again.

 

Sv translation
languagede

Anchor
Bookmark164_concept_98EC49FE83064A9ABF6A
Bookmark164_concept_98EC49FE83064A9ABF6A
Keine Steuerung der Nebenläufigkeit
Die folgende Beispielregelsammlung besteht aus zwei Schleifen. Jede Schleife verwendet die Aktion In Datei schreiben, um mehrere Zeilen Text in eine Textdatei zu schreiben – mit einer kleinen Verzögerung zwischen dem Schreiben der einzelnen Zeilen.
Wenn eine einzelne Instanz ausgeführt wird, sieht die Ausgabe wie folgt aus:

                                                  • Starting Loop 1 *****************************
                                                    Loop 1 - Iteration: 1
                                                    Loop 1 - Iteration: 2
                                                    Loop 1 - Iteration: 3
                                                  • End of Loop 1 *******************************
                                              1. Start of Loop 2 ###############################
                                                Loop 2 - iteration: 1
                                                Loop 2 - iteration: 2
                                                Loop 2 - iteration: 3
                                              2. End of Loop 2 #################################
                                                Wenn jedoch mehrere Instanzen in schneller Abfolge ausgeführt werden, sieht die Ausgabe wie folgt aus:
                                                  • Starting Loop 1 *************************
                                                    Loop 1 - Iteration: 1
                                                  • Starting Loop 1 *************************
                                                    Loop 1 - Iteration: 1
                                                  • Starting Loop 1 *************************
                                                    Loop 1 - Iteration: 1
                                                    Loop 1 - Iteration: 2
                                                    Loop 1 - Iteration: 2
                                                    Loop 1 - Iteration: 2
                                                    Loop 1 - Iteration: 3
                                                    Loop 1 - Iteration: 3
                                                    Loop 1 - Iteration: 3
                                                  • End of Loop 1 ***************************
                                                  • End of Loop 1 ***************************
                                                  • End of Loop 1 ***************************
                                              3. Start of Loop 2 ###########################
                                                Loop 2 - iteration: 1
                                              4. Start of Loop 2 ###########################
                                                Loop 2 - iteration: 1
                                              5. Start of Loop 2 ###########################
                                                Loop 2 - iteration: 1
                                                Loop 2 - iteration: 2
                                                Loop 2 - iteration: 2
                                                Loop 2 - iteration: 2
                                                Loop 2 - iteration: 3
                                                Loop 2 - iteration: 3
                                                Loop 2 - iteration: 3
                                              6. End of Loop 2 #############################
                                              7. End of Loop 2 #############################
                                              8. End of Loop 2 #############################
                                                Da jede Instanz zur gleichen Zeit in die Datei schreibt, überlappt sich die Ausgabe der Instanzen.
                                                Nur Nebenläufigkeit begrenzen
                                                Im folgenden Beispiel wird nur die Aktion Nebenläufigkeit begrenzen verwendet. Es ist so konfiguriert, dass nur eine Instanz ausgeführt wird. Der Begrenzer trägt den Namen LimitConcurrencyOnlyExample.
                                                Von dem Zeitpunkt an, an dem die Aktion Nebenläufigkeit begrenzen ausgeführt wird, bis die Regelkette abgeschlossen ist, werden keine anderen Instanzen der Regelkette ausgeführt. Sie werden stattdessen bei der Aktion Nebenläufigkeit begrenzen auf eine Warteschlange gesetzt, bis die derzeit ausgeführten Instanzen abgeschlossen sind. Wenn sich mehrere Artikelketteninstanzen bei der Aktion Nebenläufigkeit begrenzen in der Warteschlange befinden, werden sie in der gleichen Reihenfolge freigegeben, in der sie die Warteschlange betreten haben:
                                                Wenn die oben genannte Regelsammlung in einem Job aktiviert ist und in schneller Folge drei Mal ausgelöst wird, wird eine Textdatei mit folgender Ausgabe erzeugt:
                                                  • Starting Loop 1 *************************
                                                    Loop 1 - Iteration: 1
                                                    Loop 1 - Iteration: 2
                                                    Loop 1 - Iteration: 3
                                                  • End of Loop 1 ***************************
                                          1. Start Loop 2 ###############################
                                            Loop 2 - repetition: 1
                                            Loop 2 - repetition: 2
                                            Loop 2 - repetition: 3
                                          2. End of Loop 2 ###############################
                                                  • Starting Loop 1 *************************
                                                    Loop 1 - Iteration: 1
                                                    Loop 1 - Iteration: 2
                                                    Loop 1 - Iteration: 3
                                                  • End of Loop 1 ***************************
                                            1. Start Loop 2 ##############################
                                              Loop 2 - repetition: 1
                                              Loop 2 - repetition: 2
                                              Loop 2 - repetition: 3
                                            2. End of Loop 2 ##############################
                                                  • Starting Loop 1 *************************
                                                    Loop 1 - Iteration: 1
                                                    Loop 1 - Iteration: 2
                                                    Loop 1 - Iteration: 3
                                                  • End of Loop 1 ***************************
                                          3. Start Loop 2 ###############################
                                            Loop 2 - repetition: 1
                                            Loop 2 - repetition: 2
                                            Loop 2 - repetition: 3
                                          4. End of Loop 2 ###############################
                                            Beachten Sie, dass nur jeweils eine Instanz der Kette zur gleichen Zeit in die Datei schreiben konnte. Jede Instanz hat beide Schleifen abgeschlossen, bevor die nächste Instanz weiter machen konnte. Dies liegt daran, dass jede Instanz, die den Begrenzer bei der Aktion Nebenläufigkeit festlegen erhält, angehalten wird, bis beide Schleifen abgeschlossen wurden. Am Ende der zweiten Schleife wird der Begrenzer automatisch freigegeben, weil das Ende der Regelkette erreicht wurde. Die nächste Instanz, die bei der Aktion Nebenläufigkeit begrenzen wartet, ist dann in der Lage, den Begrenzer zu erhalten und fortzufahren.
                                            „Nebenläufigkeit begrenzen" und „Nebenläufigkeit freigeben"
                                            Im folgenden Beispiel werden die Aktionen Nebenläufigkeit begrenzen und Nebenläufigkeit freigeben beide verwendet. Die Regionen der Regelkette, die durch die Aktionen Nebenläufigkeit begrenzen und Nebenläufigkeit freigeben begrenzt werden, werden auf eine einzige ausgeführte Instanz begrenzt. Alle anderen Instanzen werden bei der Aktion Nebenläufigkeit begrenzen in die Warteschlange gesetzt, bis die derzeit ausgeführten Instanzen die Aktion Nebenläufigkeit freigeben erreicht haben. Die nächste wartende Instanz beginnt dann mit dem Ausführen der Aktionen innerhalb der Region Nebenläufigkeit begrenzen zu Nebenläufigkeit freigeben.
                                            Wenn die oben genannte Regelsammlung in einem Job aktiviert ist und in schneller Folge drei Mal ausgelöst wird, wird eine Textdatei mit folgender Ausgabe erzeugt:
                                                  • Starting Loop 1 *************************
                                                    Loop 1 - Iteration: 1
                                                    Loop 1 - Iteration: 2
                                                    Loop 1 - Iteration: 3
                                                  • End of Loop 1 ***************************
                                                  • Starting Loop 1 *************************
                                                    Loop 1 - Iteration: 1
                                                    Loop 1 - Iteration: 2
                                                    Loop 1 - Iteration: 3
                                                  • End of Loop 1 ***************************
                                                  • Starting Loop 1 *************************
                                                    Loop 1 - Iteration: 1
                                                    Loop 1 - Iteration: 2
                                                    Loop 1 - Iteration: 3
                                                  • End of Loop 1 ***************************
                                          5. Start Loop 2 ###############################
                                            Loop 2 - repetition: 1
                                            Loop 2 - repetition: 2
                                            Loop 2 - repetition: 3
                                          6. End of Loop 2 ###############################
                                            1. Start Loop 2 ##############################
                                              Loop 2 - repetition: 1
                                              Loop 2 - repetition: 2
                                              Loop 2 - repetition: 3
                                            2. End of Loop 2 ##############################
                                          7. Start Loop 2 ###############################
                                            Loop 2 - repetition: 1
                                            Loop 2 - repetition: 2
                                            Loop 2 - repetition: 3
                                          8. End of Loop 2 ###############################
                                            Beachten Sie, dass sich die Ausgabe in der Schleife wie im ersten Beispiel überlappt. Sie unterscheidet sich aber vom vorherigen Beispiel, weil jeder Instanz erlaubt wurde, die erste Schleife abzuschließen, bevor der ersten Instanz erlaubt wurde, die zweite Schleife zu beginnen. Das liegt daran, weil die Instanz zwischen den beiden Schleifen den Begrenzer freigibt und neu erlangt, was dazu führt, dass sie ans Ende der Warteschlange gestellt wird und wieder darauf warten muss, den Begrenzer zu erhalten.
Sv translation
languagezh

Anchor
Bookmark164_concept_98EC49FE83064A9ABF6A
Bookmark164_concept_98EC49FE83064A9ABF6A
无并发控制
下面的示例规则集包括两个循环。 每个循环使用将文本写入文件操作将多行文本写入文本文件,在每行文字之间有小幅延迟。
如果一个实例正在运行,输出看起来像这样:

                                                  • Starting Loop 1 *****************************
                                                    Loop 1 - Iteration: 1
                                                    Loop 1 - Iteration: 2
                                                    Loop 1 - Iteration: 3
                                                  • End of Loop 1 *******************************
                                              1. Start of Loop 2 ###############################
                                                Loop 2 - iteration: 1
                                                Loop 2 - iteration: 2
                                                Loop 2 - iteration: 3
                                              2. End of Loop 2 #################################
                                                但如果多个实例在快速连续运行,输出看起来会类似这样:
                                                  • Starting Loop 1 *************************
                                                    Loop 1 - Iteration: 1
                                                  • Starting Loop 1 *************************
                                                    Loop 1 - Iteration: 1
                                                  • Starting Loop 1 *************************
                                                    Loop 1 - Iteration: 1
                                                    Loop 1 - Iteration: 2
                                                    Loop 1 - Iteration: 2
                                                    Loop 1 - Iteration: 2
                                                    Loop 1 - Iteration: 3
                                                    Loop 1 - Iteration: 3
                                                    Loop 1 - Iteration: 3
                                                  • End of Loop 1 ***************************
                                                  • End of Loop 1 ***************************
                                                  • End of Loop 1 ***************************
                                              3. Start of Loop 2 ###########################
                                                Loop 2 - iteration: 1
                                              4. Start of Loop 2 ###########################
                                                Loop 2 - iteration: 1
                                              5. Start of Loop 2 ###########################
                                                Loop 2 - iteration: 1
                                                Loop 2 - iteration: 2
                                                Loop 2 - iteration: 2
                                                Loop 2 - iteration: 2
                                                Loop 2 - iteration: 3
                                                Loop 2 - iteration: 3
                                                Loop 2 - iteration: 3
                                              6. End of Loop 2 #############################
                                              7. End of Loop 2 #############################
                                              8. End of Loop 2 #############################
                                                因为每个实例都同时写入文件,而实例的输出是交错的。
                                                仅限制并发
                                                在下面的例子中,仅使用了限制并发操作。 它被配置为仅允许一个实例运行。 限制名为 LimitConcurrencyOnlyExample。
                                                从执行限制并发操作的时间起,直到规则链完成间,不会运行规则链的其他实例。 这些实例将在限制并发操作处排队,直到当前正在执行的实例完成。 如果有多个规则链实例在限制并发操作处排队,它们将以与排队相同的顺序被释放:
                                                如果上述规则集在作业中启用,并快速连续触发三次,将生成一个文本文件,其中包含以下输出:
                                                  • Starting Loop 1 *************************
                                                    Loop 1 - Iteration: 1
                                                    Loop 1 - Iteration: 2
                                                    Loop 1 - Iteration: 3
                                                  • End of Loop 1 ***************************
                                          1. Start Loop 2 ###############################
                                            Loop 2 - repetition: 1
                                            Loop 2 - repetition: 2
                                            Loop 2 - repetition: 3
                                          2. End of Loop 2 ###############################
                                                  • Starting Loop 1 *************************
                                                    Loop 1 - Iteration: 1
                                                    Loop 1 - Iteration: 2
                                                    Loop 1 - Iteration: 3
                                                  • End of Loop 1 ***************************
                                            1. Start Loop 2 ##############################
                                              Loop 2 - repetition: 1
                                              Loop 2 - repetition: 2
                                              Loop 2 - repetition: 3
                                            2. End of Loop 2 ##############################
                                                  • Starting Loop 1 *************************
                                                    Loop 1 - Iteration: 1
                                                    Loop 1 - Iteration: 2
                                                    Loop 1 - Iteration: 3
                                                  • End of Loop 1 ***************************
                                          3. Start Loop 2 ###############################
                                            Loop 2 - repetition: 1
                                            Loop 2 - repetition: 2
                                            Loop 2 - repetition: 3
                                          4. End of Loop 2 ###############################
                                            注意,一次只允许规则链的一个实例写入文件中。 每个实例都要完成两个循环,然后才允许下一个实例继续执行。 这是因为当每个实例都在限制并发操作处获得限制时,它将保持限制直到完成两个循环。 在第二次循环结束时,限制将自动释放,因为这是规则链的结尾。 然后在限制并发操作处等待的下一个实例将能够获得限制并继续。
                                            限制并发和释放并发
                                            以下示例中,同时使用了限制并发操作和释放并发操作。 限制并发释放并发操作对界定的规则链区域将限制为单实例运行。 任何其他实例将在限制并发操作处排队,直到当前正在执行的实例到达释放并发操作。 然后下一个等待实例将开始执行限制并发释放并发区域内的操作。
                                            如果上述规则集在作业中启用,并快速连续触发三次,将生成一个文本文件,其中包含以下输出:
                                                  • Starting Loop 1 *************************
                                                    Loop 1 - Iteration: 1
                                                    Loop 1 - Iteration: 2
                                                    Loop 1 - Iteration: 3
                                                  • End of Loop 1 ***************************
                                                  • Starting Loop 1 *************************
                                                    Loop 1 - Iteration: 1
                                                    Loop 1 - Iteration: 2
                                                    Loop 1 - Iteration: 3
                                                  • End of Loop 1 ***************************
                                                  • Starting Loop 1 *************************
                                                    Loop 1 - Iteration: 1
                                                    Loop 1 - Iteration: 2
                                                    Loop 1 - Iteration: 3
                                                  • End of Loop 1 ***************************
                                          5. Start Loop 2 ###############################
                                            Loop 2 - repetition: 1
                                            Loop 2 - repetition: 2
                                            Loop 2 - repetition: 3
                                          6. End of Loop 2 ###############################
                                            1. Start Loop 2 ##############################
                                              Loop 2 - repetition: 1
                                              Loop 2 - repetition: 2
                                              Loop 2 - repetition: 3
                                            2. End of Loop 2 ##############################
                                          7. Start Loop 2 ###############################
                                            Loop 2 - repetition: 1
                                            Loop 2 - repetition: 2
                                            Loop 2 - repetition: 3
                                          8. End of Loop 2 ###############################
                                            注意,和上一个示例中医院,循环中的输出不会交错,因为它在第一个示例中。 但它与上一个示例的区别在于,每个实例都被允许完成第一个循环,然后允许第一个实例继续执行第二个循环。 这是因为这两个循环之间实例被释放并重新获得限制,使得它有效地到达队列的末尾,然后必须等待再次获得限制。
Sv translation
languagees

Anchor
Bookmark164_concept_98EC49FE83064A9ABF6A
Bookmark164_concept_98EC49FE83064A9ABF6A
Sin control de simultaneidad
El conjunto de reglas del ejemplo siguiente está compuesto por dos bucles. Cada bucle utiliza la acción Escribir texto en archivo para escribir varias líneas de texto en un archivo de texto con un pequeño retraso entre la escritura de cada línea.
Si se ejecuta una sola instancia, la salida tendrá este aspecto:

                                                  • Starting Loop 1 *****************************
                                                    Loop 1 - Iteration: 1
                                                    Loop 1 - Iteration: 2
                                                    Loop 1 - Iteration: 3
                                                  • End of Loop 1 *******************************
                                              1. Start of Loop 2 ###############################
                                                Loop 2 - iteration: 1
                                                Loop 2 - iteration: 2
                                                Loop 2 - iteration: 3
                                              2. End of Loop 2 #################################
                                                Sin embargo, si se ejecutan varias instancias en rápida sucesión, la salida tendrá el siguiente aspecto:
                                                  • Starting Loop 1 *************************
                                                    Loop 1 - Iteration: 1
                                                  • Starting Loop 1 *************************
                                                    Loop 1 - Iteration: 1
                                                  • Starting Loop 1 *************************
                                                    Loop 1 - Iteration: 1
                                                    Loop 1 - Iteration: 2
                                                    Loop 1 - Iteration: 2
                                                    Loop 1 - Iteration: 2
                                                    Loop 1 - Iteration: 3
                                                    Loop 1 - Iteration: 3
                                                    Loop 1 - Iteration: 3
                                                  • End of Loop 1 ***************************
                                                  • End of Loop 1 ***************************
                                                  • End of Loop 1 ***************************
                                              3. Start of Loop 2 ###########################
                                                Loop 2 - iteration: 1
                                              4. Start of Loop 2 ###########################
                                                Loop 2 - iteration: 1
                                              5. Start of Loop 2 ###########################
                                                Loop 2 - iteration: 1
                                                Loop 2 - iteration: 2
                                                Loop 2 - iteration: 2
                                                Loop 2 - iteration: 2
                                                Loop 2 - iteration: 3
                                                Loop 2 - iteration: 3
                                                Loop 2 - iteration: 3
                                              6. End of Loop 2 #############################
                                              7. End of Loop 2 #############################
                                              8. End of Loop 2 #############################
                                                Como cada instancia se está escribiendo en el archivo al mismo tiempo, la salida de las instancias estará intercalada.
                                                Solo Limit Concurrency (Limitar simultaneidad)
                                                En el siguiente ejemplo solo se utiliza la acción Limit Concurrency (Limitar simultaneidad). Está configurada para permitir que se ejecute solo una instancia. El limitador se denomina LimitConcurrencyOnlyExample.
                                                Desde el momento en que se ejecuta la acción Limit Concurrency (Limitar simultaneidad) hasta que se completa la cadena de reglas, no se ejecutará ninguna otra instancia de la regla. En lugar de ello, se pondrán en cola en la acción Limit Concurrency (Limitar simultaneidad) hasta que se completen las instancias que están actualmente en ejecución. Si hay varias instancias de cadenas de reglas en la cola en la acción Limit Concurrency (Limitar simultaneidad), se liberarán en el mismo orden en el que se pusieron en cola:
                                                Si el conjunto de reglas anterior está activado en un trabajo y se desencadena tres veces en rápida sucesión, se genera un archivo de texto, que contiene la siguiente salida:
                                                  • Starting Loop 1 *************************
                                                    Loop 1 - Iteration: 1
                                                    Loop 1 - Iteration: 2
                                                    Loop 1 - Iteration: 3
                                                  • End of Loop 1 ***************************
                                          1. Start Loop 2 ###############################
                                            Loop 2 - repetition: 1
                                            Loop 2 - repetition: 2
                                            Loop 2 - repetition: 3
                                          2. End of Loop 2 ###############################
                                                  • Starting Loop 1 *************************
                                                    Loop 1 - Iteration: 1
                                                    Loop 1 - Iteration: 2
                                                    Loop 1 - Iteration: 3
                                                  • End of Loop 1 ***************************
                                            1. Start Loop 2 ##############################
                                              Loop 2 - repetition: 1
                                              Loop 2 - repetition: 2
                                              Loop 2 - repetition: 3
                                            2. End of Loop 2 ##############################
                                                  • Starting Loop 1 *************************
                                                    Loop 1 - Iteration: 1
                                                    Loop 1 - Iteration: 2
                                                    Loop 1 - Iteration: 3
                                                  • End of Loop 1 ***************************
                                          3. Start Loop 2 ###############################
                                            Loop 2 - repetition: 1
                                            Loop 2 - repetition: 2
                                            Loop 2 - repetition: 3
                                          4. End of Loop 2 ###############################
                                            Tenga en cuenta que solo se puede escribir una instancia de la cadena en el archivo a la vez. Cada instancia ha completado ambos bucles antes de que se permitiera continuar a la instancia siguiente. Esto se debe a que, cuando cada instancia adquiere el limitador en la acción Limit Concurrency (Limitar simultaneidad), se mantiene hasta que se completen los dos bucles. Al final del segundo bucle, el limitador se libera automáticamente porque es el final de la cadena de reglas. La siguiente instancia en espera en la acción Limit Concurrency (Limitar simultaneidad) es capaz de adquirir el limitador y continuar.
                                            Limit Concurrency (Limitar simultaneidad) y Release Concurrency (Liberar simultaneidad)
                                            En el siguiente ejemplo se utilizan las acciones Limit Concurrency (Limitar simultaneidad) y Release Concurrency (Liberar simultaneidad). Las regiones de la cadena de reglas delimitadas por el par de acciones Limit Concurrency (Limitar simultaneidad) y Release Concurrency (Liberar simultaneidad) se limitarán a una sola instancia en ejecución. Cualquier otra instancia se pondrá en la cola en la acción Limit Concurrency (Limitar simultaneidad) hasta que las instancias actualmente en ejecución lleguen a la acción Release Concurrency (Liberar simultaneidad). La siguiente instancia en espera empezará en ese momento a ejecutar las acciones dentro de la región, de Limit Concurrency (Limitar simultaneidad) a Release Concurrency (Liberar simultaneidad).
                                            Si el conjunto de reglas anterior está activado en un trabajo y se desencadena tres veces en rápida sucesión, se genera un archivo de texto que contiene la siguiente salida:
                                                  • Starting Loop 1 *************************
                                                    Loop 1 - Iteration: 1
                                                    Loop 1 - Iteration: 2
                                                    Loop 1 - Iteration: 3
                                                  • End of Loop 1 ***************************
                                                  • Starting Loop 1 *************************
                                                    Loop 1 - Iteration: 1
                                                    Loop 1 - Iteration: 2
                                                    Loop 1 - Iteration: 3
                                                  • End of Loop 1 ***************************
                                                  • Starting Loop 1 *************************
                                                    Loop 1 - Iteration: 1
                                                    Loop 1 - Iteration: 2
                                                    Loop 1 - Iteration: 3
                                                  • End of Loop 1 ***************************
                                          5. Start Loop 2 ###############################
                                            Loop 2 - repetition: 1
                                            Loop 2 - repetition: 2
                                            Loop 2 - repetition: 3
                                          6. End of Loop 2 ###############################
                                            1. Start Loop 2 ##############################
                                              Loop 2 - repetition: 1
                                              Loop 2 - repetition: 2
                                              Loop 2 - repetition: 3
                                            2. End of Loop 2 ##############################
                                          7. Start Loop 2 ###############################
                                            Loop 2 - repetition: 1
                                            Loop 2 - repetition: 2
                                            Loop 2 - repetition: 3
                                          8. End of Loop 2 ###############################
                                            Tenga en cuenta que, como en el ejemplo anterior, la salida del bucle no se intercala como ocurría en el primer ejemplo. Sin embargo, se diferencia del ejemplo anterior en que cada instancia ha podido completar el primer bucle antes de permitir a la primera instancia continuar con el segundo bucle. La razón es que, entre los dos bucles, la instancia libera y vuelve a adquirir el limitador, lo que hace que la instancia vaya al final de la cola y tenga que esperar su turno de nuevo para el limitador.
Sv translation
languagefr

Anchor
Bookmark164_concept_98EC49FE83064A9ABF6A
Bookmark164_concept_98EC49FE83064A9ABF6A
Aucun contrôle de la simultanéité
Dans l'exemple suivant, le jeu de règles est composé de deux boucles. Chaque boucle utilise l'action Écrire le texte dans un fichier pour écrire plusieurs lignes de texte dans un fichier texte avec un léger délai entre l'écriture de chaque ligne.
Si une seule instance est exécutée, le résultat ressemble à ceci :

                                                  • Starting Loop 1 *****************************
                                                    Loop 1 - Iteration: 1
                                                    Loop 1 - Iteration: 2
                                                    Loop 1 - Iteration: 3
                                                  • End of Loop 1 *******************************
                                              1. Start of Loop 2 ###############################
                                                Loop 2 - iteration: 1
                                                Loop 2 - iteration: 2
                                                Loop 2 - iteration: 3
                                              2. End of Loop 2 #################################
                                                En revanche, si plusieurs instances sont exécutées à brefs intervalles, le résultat ressemble à ceci :
                                                  • Starting Loop 1 *************************
                                                    Loop 1 - Iteration: 1
                                                  • Starting Loop 1 *************************
                                                    Loop 1 - Iteration: 1
                                                  • Starting Loop 1 *************************
                                                    Loop 1 - Iteration: 1
                                                    Loop 1 - Iteration: 2
                                                    Loop 1 - Iteration: 2
                                                    Loop 1 - Iteration: 2
                                                    Loop 1 - Iteration: 3
                                                    Loop 1 - Iteration: 3
                                                    Loop 1 - Iteration: 3
                                                  • End of Loop 1 ***************************
                                                  • End of Loop 1 ***************************
                                                  • End of Loop 1 ***************************
                                              3. Start of Loop 2 ###########################
                                                Loop 2 - iteration: 1
                                              4. Start of Loop 2 ###########################
                                                Loop 2 - iteration: 1
                                              5. Start of Loop 2 ###########################
                                                Loop 2 - iteration: 1
                                                Loop 2 - iteration: 2
                                                Loop 2 - iteration: 2
                                                Loop 2 - iteration: 2
                                                Loop 2 - iteration: 3
                                                Loop 2 - iteration: 3
                                                Loop 2 - iteration: 3
                                              6. End of Loop 2 #############################
                                              7. End of Loop 2 #############################
                                              8. End of Loop 2 #############################
                                                Chaque instance étant écrite en même temps dans le fichier, le résultat des instances est mélangé.
                                                Limiter la simultanéité uniquement
                                                Dans l'exemple suivant, seule l'action Limiter la simultanéité est utilisée. Elle est configurée pour n'autoriser l'exécution que d'une seule instance. Le nom du délimiteur est LimitConcurrencyOnlyExample.
                                                Du moment où l'action Limiter la simultanéité est exécutée jusqu'à la fin de la chaîne de règles, aucune des autres instances de la chaîne de règles n'est exécutée. Elles sont placées dans la file d'attente de l'action Limiter la simultanéité jusqu'à ce que l'instance en cours d'exécution soit terminée. Si plusieurs instances de la chaîne de règles sont dans la file d'attente de l'action Limiter la simultanéité, elles en sortent dans le même ordre qu'elles y ont été placées :
                                                Si le jeu de règles ci-dessus est activé dans un travail et déclenché trois fois à brefs intervalles, un fichier contenant le texte suivant est généré :
                                                  • Starting Loop 1 *************************
                                                    Loop 1 - Iteration: 1
                                                    Loop 1 - Iteration: 2
                                                    Loop 1 - Iteration: 3
                                                  • End of Loop 1 ***************************
                                          1. Start Loop 2 ###############################
                                            Loop 2 - repetition: 1
                                            Loop 2 - repetition: 2
                                            Loop 2 - repetition: 3
                                          2. End of Loop 2 ###############################
                                                  • Starting Loop 1 *************************
                                                    Loop 1 - Iteration: 1
                                                    Loop 1 - Iteration: 2
                                                    Loop 1 - Iteration: 3
                                                  • End of Loop 1 ***************************
                                            1. Start Loop 2 ##############################
                                              Loop 2 - repetition: 1
                                              Loop 2 - repetition: 2
                                              Loop 2 - repetition: 3
                                            2. End of Loop 2 ##############################
                                                  • Starting Loop 1 *************************
                                                    Loop 1 - Iteration: 1
                                                    Loop 1 - Iteration: 2
                                                    Loop 1 - Iteration: 3
                                                  • End of Loop 1 ***************************
                                          3. Start Loop 2 ###############################
                                            Loop 2 - repetition: 1
                                            Loop 2 - repetition: 2
                                            Loop 2 - repetition: 3
                                          4. End of Loop 2 ###############################
                                            Notez qu'une seule instance de la chaîne à la fois n'est autorisée à écrire dans le fichier. Chaque instance termine les deux boucles avant que l'instance suivante ne puisse continuer. Cela est dû au fait que lorsque chaque instance obtient le délimiteur au moment de l'action Limiter la simultanéité, elle le conserve jusqu'à ce que les deux boucles soient terminées. À la fin de la deuxième boucle, le délimiteur est automatiquement désactivé, car l'instance est arrivée à la fin de la chaîne de règles. L'instance suivante mise en attente au niveau de l'action Limiter la simultanéité peut ensuite s'exécuter avec le délimiteur.
                                            Limiter la simultanéité et Annuler la limitation de simultanéité
                                            Dans l'exemple suivant, les deux actions Limiter la simultanéité et Annuler la limitation de simultanéité sont utilisées. Les portions de la chaîne de règles délimitées par les deux actions Limiter la simultanéité et Annuler la limitation de simultanéité sont limitées à l'exécution d'une seule instance. Toutes les autres instances sont placées dans la file d'attente de l'action Limiter la simultanéité jusqu'à ce que l'instance actuellement exécutée atteigne l'action Annuler la limitation de simultanéité. L'instance en attente suivante commence alors à exécuter les actions au sein de la portion délimitée par les actions Limiter la simultanéité Annuler la limitation de simultanéité.
                                            Si le jeu de règles ci-dessus est activé dans un travail et déclenché trois fois à brefs intervalles, un fichier contenant le texte suivant est généré :
                                                  • Starting Loop 1 *************************
                                                    Loop 1 - Iteration: 1
                                                    Loop 1 - Iteration: 2
                                                    Loop 1 - Iteration: 3
                                                  • End of Loop 1 ***************************
                                                  • Starting Loop 1 *************************
                                                    Loop 1 - Iteration: 1
                                                    Loop 1 - Iteration: 2
                                                    Loop 1 - Iteration: 3
                                                  • End of Loop 1 ***************************
                                                  • Starting Loop 1 *************************
                                                    Loop 1 - Iteration: 1
                                                    Loop 1 - Iteration: 2
                                                    Loop 1 - Iteration: 3
                                                  • End of Loop 1 ***************************
                                          5. Start Loop 2 ###############################
                                            Loop 2 - repetition: 1
                                            Loop 2 - repetition: 2
                                            Loop 2 - repetition: 3
                                          6. End of Loop 2 ###############################
                                            1. Start Loop 2 ##############################
                                              Loop 2 - repetition: 1
                                              Loop 2 - repetition: 2
                                              Loop 2 - repetition: 3
                                            2. End of Loop 2 ##############################
                                          7. Start Loop 2 ###############################
                                            Loop 2 - repetition: 1
                                            Loop 2 - repetition: 2
                                            Loop 2 - repetition: 3
                                          8. End of Loop 2 ###############################
                                            Notez que comme dans l'exemple précédent, le résultat de la boucle n'est pas mélangé, contrairement au premier exemple. Mais cet exemple est différent du précédent, car chaque instance est autorisée à terminer la première boucle avant que la première instance ne soit autorisée à passer à la deuxième boucle. Cela est dû au fait qu'entre les deux boucles, l'instance se débarrasse du délimiteur, puis le récupère. Elle se retrouve donc à la fin de la file d'attente et doit attendre pour récupérer le délimiteur.
Sv translation
languageja

Anchor
Bookmark164_concept_98EC49FE83064A9ABF6A
Bookmark164_concept_98EC49FE83064A9ABF6A
並列実行を制御しない
次の例のルール セットは 2 つのループで構成されます。 各ループは、ファイルへのテキスト書き込みアクションを使用して、複数のテキスト行をテキスト ファイルに書き込みますが、各行の書き込みの間に短い遅延があります。
1 つのインスタンスが実行された場合、出力は次のようになります。

                                                  • Starting Loop 1 *****************************
                                                    Loop 1 - Iteration: 1
                                                    Loop 1 - Iteration: 2
                                                    Loop 1 - Iteration: 3
                                                  • End of Loop 1 *******************************
                                              1. Start of Loop 2 ###############################
                                                Loop 2 - iteration: 1
                                                Loop 2 - iteration: 2
                                                Loop 2 - iteration: 3
                                              2. End of Loop 2 #################################
                                                しかし、複数のインスタンスが連続して実行された場合、出力は次のようになります。
                                                  • Starting Loop 1 *************************
                                                    Loop 1 - Iteration: 1
                                                  • Starting Loop 1 *************************
                                                    Loop 1 - Iteration: 1
                                                  • Starting Loop 1 *************************
                                                    Loop 1 - Iteration: 1
                                                    Loop 1 - Iteration: 2
                                                    Loop 1 - Iteration: 2
                                                    Loop 1 - Iteration: 2
                                                    Loop 1 - Iteration: 3
                                                    Loop 1 - Iteration: 3
                                                    Loop 1 - Iteration: 3
                                                  • End of Loop 1 ***************************
                                                  • End of Loop 1 ***************************
                                                  • End of Loop 1 ***************************
                                              3. Start of Loop 2 ###########################
                                                Loop 2 - iteration: 1
                                              4. Start of Loop 2 ###########################
                                                Loop 2 - iteration: 1
                                              5. Start of Loop 2 ###########################
                                                Loop 2 - iteration: 1
                                                Loop 2 - iteration: 2
                                                Loop 2 - iteration: 2
                                                Loop 2 - iteration: 2
                                                Loop 2 - iteration: 3
                                                Loop 2 - iteration: 3
                                                Loop 2 - iteration: 3
                                              6. End of Loop 2 #############################
                                              7. End of Loop 2 #############################
                                              8. End of Loop 2 #############################
                                                各インスタンスが同時にファイルに書き込むため、インスタンスからの出力がインターリーブされます。
                                                並列実行のみを制限する
                                                次の例では、並列実行の制限アクションのみが使用されます。 アクションは 1 つのインスタンスの実行のみを許可するように設定されます。 リミッタの名前は LimitConcurrencyOnlyExample です。
                                                並列実行の制限アクションが実行されてからルール チェーンが完了するまでの間、ルール チェーンの他のインスタンスは実行されません。 それらは代わりに、並列実行の制限アクションで、現在実行されているインスタンスが完了するまでキューに入れられます。 複数のルール チェーンのインスタンスが並列実行の制限アクションでキューに入れられている場合、それらはキューに入れられたのと同じ順序でリリースされます。
                                                上記のルール セットがジョブで有効になっていて、3 回連続して実行された場合、次のような出力を含むテキスト ファイルが生成されます。
                                                  • Starting Loop 1 *************************
                                                    Loop 1 - Iteration: 1
                                                    Loop 1 - Iteration: 2
                                                    Loop 1 - Iteration: 3
                                                  • End of Loop 1 ***************************
                                          1. Start Loop 2 ###############################
                                            Loop 2 - repetition: 1
                                            Loop 2 - repetition: 2
                                            Loop 2 - repetition: 3
                                          2. End of Loop 2 ###############################
                                                  • Starting Loop 1 *************************
                                                    Loop 1 - Iteration: 1
                                                    Loop 1 - Iteration: 2
                                                    Loop 1 - Iteration: 3
                                                  • End of Loop 1 ***************************
                                            1. Start Loop 2 ##############################
                                              Loop 2 - repetition: 1
                                              Loop 2 - repetition: 2
                                              Loop 2 - repetition: 3
                                            2. End of Loop 2 ##############################
                                                  • Starting Loop 1 *************************
                                                    Loop 1 - Iteration: 1
                                                    Loop 1 - Iteration: 2
                                                    Loop 1 - Iteration: 3
                                                  • End of Loop 1 ***************************
                                          3. Start Loop 2 ###############################
                                            Loop 2 - repetition: 1
                                            Loop 2 - repetition: 2
                                            Loop 2 - repetition: 3
                                          4. End of Loop 2 ###############################
                                            ファイルへの書き込み許可されるチェーンのインスタンスは一度に 1 つだけです。 次のインスタンスの続行が許可される前に、各インスタンスが両方のループを完了します。 これは、各インスタンスが並列実行の制限アクションでリミッタを取得し、両方のループが完了するまでそれを保持するためです。 2 番目のループが終わると、ルール チェーンも終わるので、そこでリミッタが自動的にリリースされます。 次に、並列実行の制限アクションで待機していた次のインスタンスがリミッタを取得して続行できます。
                                            並列実行の制限および並列実行制限の解除
                                            次の例では、並列実行の制限アクションと並列実行制限の解除アクションの両方が使用されます。 並列実行の制限並列実行制限の解除アクションのペアによって区切られるルール チェーンの領域は、1 つのインスタンスの実行に制限されます。 他のインスタンスは、現在実行中のインスタンスが並列実行制限の解除に到達するまで並列実行の制限アクションでキューに入れられます。 その後、待機している次のインスタンスが並列実行の制限から並列実行制限の解除までの領域でアクションの実行を開始します。
                                            上記のルール セットがジョブで有効になっていて、3 回連続して実行された場合、次のような出力を含むテキスト ファイルが生成されます。
                                                  • Starting Loop 1 *************************
                                                    Loop 1 - Iteration: 1
                                                    Loop 1 - Iteration: 2
                                                    Loop 1 - Iteration: 3
                                                  • End of Loop 1 ***************************
                                                  • Starting Loop 1 *************************
                                                    Loop 1 - Iteration: 1
                                                    Loop 1 - Iteration: 2
                                                    Loop 1 - Iteration: 3
                                                  • End of Loop 1 ***************************
                                                  • Starting Loop 1 *************************
                                                    Loop 1 - Iteration: 1
                                                    Loop 1 - Iteration: 2
                                                    Loop 1 - Iteration: 3
                                                  • End of Loop 1 ***************************
                                          5. Start Loop 2 ###############################
                                            Loop 2 - repetition: 1
                                            Loop 2 - repetition: 2
                                            Loop 2 - repetition: 3
                                          6. End of Loop 2 ###############################
                                            1. Start Loop 2 ##############################
                                              Loop 2 - repetition: 1
                                              Loop 2 - repetition: 2
                                              Loop 2 - repetition: 3
                                            2. End of Loop 2 ##############################
                                          7. Start Loop 2 ###############################
                                            Loop 2 - repetition: 1
                                            Loop 2 - repetition: 2
                                            Loop 2 - repetition: 3
                                          8. End of Loop 2 ###############################
                                            前の例と同じように、ループ内の出力はインターリーブされません。これは最初の例とは異なります。 しかし、各インスタンスで、最初のインスタンスが 2 番目のループの続行を許可される前に最初のループの完了を許可される点が前の例と異なっています。 これは、2 つのループの間に、インスタンスがリミッタをリリースして再び取得し、結果として効果的にキューの末尾に進んでリミッタの順番を待つ必要があるためです。