Resumen. Resumen. Resumen. Resumen. Resumen. Resumen.
Resumen. Resumen. Resumen. Resumen. Resumen. Resumen.
Texto texto texto texto texto texto texto texto texto texto texto texto texto texto texto texto. Texto texto texto texto texto texto texto texto texto texto texto texto texto texto texto texto.
Texto texto texto texto texto texto texto texto texto texto texto texto texto texto texto texto. Texto texto texto texto texto texto texto texto texto texto texto texto texto texto texto texto.
Sección 3
Un Subproceso Ad-Hoc agrupa Actividades que generalmente están desconectadas, no tienen relaciones de secuencia entre ellas.
Las Actividades dentro del Subproceso Ad-Hoc generalmente están desconectadas entre sí. Durante la ejecución, una o más de las Actividades pueden estar activas y puede realizarse varias veces. En cada ejecución se determina cuándo comenzarán las Actividades, cuál será la próxima, etc.
Aunque el Proceso no tiene una estructura explícita, se pueden agregar dependencias de datos entre Actividades: los datos producidos por una Actividad son consumidos por otra, qque sólo puede comenzar cuando han llegado los datos. También puede haber Flujos de Secuencia entre algunas Actividades. Esto no significa que la segunda Actividad tiene que realizarse inmediatamente, pero sí que la segunda se debe ejecutar después de la primera.
Un Subproceso Ad-Hoc tiene en su parte inferior central un símbolo de tilde (∼), el que se puede combinar con cualquiera de los otros Marcadores de Subproceso.
Un ejemplo de Subproceso Ad-Hoc es escribir un libro. Las Actividades serían: investigar el tema, crear los personajes, crear la historia principal y las secundarias, escribir texto, editar texto, etc. Puede haber dependencias temporales entre ellas, por ejemplo, hay que escribir el texto antes de editarlo, pero hay necesariamente una correlación directa entre ambas Actividades. Para algunos capítulos la edición podría ocurrir una vez que ha sido escrito, en otros casos podrían editarse varios capítulos.
Los Subprocesos Ad-Hoc tienen algunas restricciones en el uso de elementos BPMN con respecto a los demás Subprocesos.
- Debe contener Actividades.
- Puede contener Objetos de Datos, Flujo de Secuencia, Asociaciones, Asociaciones de Datos, Grupos, Flujos de Mensaje (como origen o destino), Compuertas y Eventos intermedios. (Para que tengan algún significado, los eventos intermedios deben tener Flujos de Secuencia salientes, y se pueden activar varias veces mientras el Subproceso Ad-Hoc está activo.)
- No puede contener Eventos Iniciales ni Finales.
Las Actividades se ejecutan secuencialmente o en paralelo, se pueden ejecutar varias veces, las únicas restricciones son los Flujos de Secuencia, las Compuertas y las conexiones de Datos que hubiere.
Es un desafío para un motor BPM monitorear el estado de los Subprocesos Ad-Hoc, generalmente este tipo de Procesos se manejan a través de aplicaciones de trabajo en grupo (como el correo electrónico), pero BPMN permite el modelado de Procesos que no son necesariamente ejecutables, aunque existen algunos motores de proceso que pueden seguir un Subproceso Ad-Hoc. Dado esto, en algún momento el Subproceso Ad-Hoc se habrá completado y esto se puede determinar evaluando una condición de finalización que evalúa los atributos del Proceso que habrán sido actualizados por una Actividad en el Proceso.
Semántica Operational
En cualquier momento, un subconjuto de la Actividades del Subproceso Ad-Hoc está habilitas.
Una Actividad está habilitada si no tiene Flujo de Secuencia de Entrada y tampoco restricciones de Datos, o si los Datos están disponibles y hay Tokens en sus Flujos de Secuencia de Entrada.
Inicialmente, todas las Actividades sin Flujos de Secuencia entrantes y con Datos disponibles están habilitadas.
Las Actividades habilitadas son seleccionadas para su ejecución, esto lo hace una persona. Hay dos posibles escenarios: (1) orden secuencial, y (2) orden paralelo (por defecto). En el primer caso, se va seleccionado una a una las Actividades habilitadas. En el segundo caso, puede haber varias actividades en ejecución en paralelo, incluso varias instancias de una misma Actividad.
Cada vez que termina una Actividad:
- Se evalúa una condición de finalización. Si es verdadera el Subproceso termina. Si hay otras Actividades en ejecución éstas son canceladas.
- Cuando se completa una actividad interna con Flujos de Secuencia salientes, se producen varios tokens en sus flujos de secuencia salientes, los que pueden habilitar otra Actividades, o activar Compuertas y/o Eventos Intermedios.
Workflow patterns: WCP-17 Interleaved parallel routing.
Especificación BPMN
An Ad-Hoc Sub-Process is a specialized type of Sub-Process that is a group of Activities that have no REQUIRED sequence relationships. A set of Activities can be defined for the Process, but the sequence and number of performances for the Activities is determined by the performers of the Activities.
A Sub-Process is marked as being ad-hoc with a “tilde” symbol placed at the bottom center of the Sub-Process shape (see Figure 10.35 and Figure 10.36).
The Ad-Hoc Marker MAY be used in combination with any of the other markers.
Activities within the Process are generally disconnected from each other. During execution of the Process, any one or more of the Activities MAY be active and they MAY be performed multiple times. The performers determine when Activities will start, what the next Activity will be, and so on.
Examples of the types of Processes that are Ad-Hoc include computer code development (at a low level), sales support, and writing a book chapter. If we look at the details of writing a book chapter, we could see that the Activities within this Process include: researching the topic, writing text, editing text, generating graphics, including graphics in the text, organizing references, etc. (see Figure 10.37). There MAY be some dependencies between Tasks in this Process, such as writing text before editing text, but there is not necessarily any correlation between an instance of writing text to an instance of editing text. Editing can occur infrequently and based on the text of many instances of the writing text Task.
Although there is no explicit Process structure, some sequence and data dependencies can be added to the details of the Process. For example, we can extend the book chapter Ad-Hoc Sub-Process shown above and add Data Objects, Data Associations, and even Sequence Flows (Figure 10.38).
Ad-Hoc Sub-Processes restrict the use of BPMN elements that would normally be used in Sub-Processes.
- The list of BPMN elements that MUST be used in an Ad-Hoc Sub-Process: Activity.
- The list of BPMN elements that MAY be used in an Ad-Hoc Sub-Process: Data Object, Sequence Flow, Association, Data Association, Group, Message Flow (as a source or target), Gateway, and Intermediate Event.
- The list of BPMN elements that MUST NOT be used in an Ad-Hoc Sub-Process: Start Event, End Event, Conversations (graphically), Conversation Links (graphically), and Choreography Activities.
The Data Objects as inputs into the Tasks act as an additional constraint for the performance of those Tasks. The performers still determine when the Tasks will be performed, but they are now constrained in that they cannot start the Task without the appropriate input. The addition of Sequence Flows between the Tasks (e.g., between “Generate Graphics” and “Include Graphics in Text”) creates a dependency where the performance of the first Task MUST be followed by a performance of the second Task. This does not mean that the second Task is to be performed immediately, but there MUST be a performance of the second Task after the performance of the first Task.
It is a challenge for a BPM engine to monitor the status of Ad-Hoc Sub-Processes, usually these kind of Processes are handled through groupware applications (such as e-mail), but BPMN allows modeling of Processes that are not necessarily executable, although there are some process engines that can follow an Ad-Hoc Sub-Process. Given this, at some point the Ad-Hoc Sub-Process will have complete and this can be determined by evaluating a completionCondition that evaluates Process attributes that will have been updated by an Activity in the Process.
An Ad-Hoc Sub-Process or Process contains a number of embedded inner Activities and is intended to be executed with a more flexible ordering compared to the typical routing of Processes. Unlike regular Processes, it does not contain a complete, structured BPMN diagram description—i.e., from Start Event to End Event. Instead the Ad-Hoc Sub-Process contains only Activities, Sequence Flows, Gateways, and Intermediate Events. An Ad-Hoc Sub-Process MAY also contain Data Objects and Data Associations. The Activities within the Ad-Hoc Sub-Process are not REQUIRED to have incoming and outgoing Sequence Flows. However, it is possible to specify Sequence Flows between some of the contained Activities. When used, Sequence Flows will provide the same ordering constraints as in a regular Process. To have any meaning, Intermediate Events will have outgoing Sequence Flows and they can be triggered multiple times while the Ad-Hoc Sub-Process is active.
The contained Activities are executed sequentially or in parallel, they can be executed multiple times in an order that is only constrained through the specified Sequence Flows, Gateways, and data connections.
- At any point in time, a subset of the embedded Activities is enabled. Initially, all Activities without incoming Sequence Flows are enabled. One of the enabled Activities is selected for execution. This is not done by the implementation but usually by a Human Performer. If the ordering attribute is set to sequential, another enabled Activity can be selected for execution only if the previous one has terminated. If the ordering attribute is set to parallel, another enabled Activity can be selected for execution at any time. This implies the possibility of the multiple parallel instances of the same inner Activity.
- After each completion of an inner Activity, a condition specified through the completionCondition attribute is evaluated:
- If false, the set of enabled inner Activities is updated and new Activities can be selected for execution.
- If true, the Ad-Hoc Sub-Process completes without executing further inner Activities. In case the ordering attribute is set to parallel and the attribute cancelRemainingInstances is true, running instances of inner Activities are canceled. If cancelRemainingInstances is set to false, the Ad-Hoc Sub-Process completes after all remaining inner instances have completed or terminated.
- When an inner Activity with outgoing Sequence Flows completes, a number of tokens are produced on its outgoing Sequence Flows. This number is specified through its attribute completionQuantity. The resulting state MAY contain also other tokens on incoming Sequence Flows of either Activities, converging Parallel or Complex Gateways, or an Intermediate Event. Then all tokens are propagated as far as possible, i.e., all activated Gateways are executed until no Gateway and Intermediate Event is activated anymore. Consequently, a state is obtained where each token is on an incoming Sequence Flow of either an inner Activity, a converging Parallel or Complex Gateway or an Intermediate Event. An inner Activity is now enabled if it has either no incoming Sequence Flows or there are sufficiently many tokens on its incoming Sequence Flows (as specified through startQuantity).