Execution Lifecycle

Introduction

This page describes the runtime execution flow visible in the current code base. It focuses on the actual collaboration between the application, request handlers, and the router.

Step-by-Step Flow

  1. The host or UI resolves a request handler from the application using a compiled registration key.
  2. The application signs into the handler's RequestServiceEvent.
  3. The handler receives an ITransitionContext and treats it as both request and initial response context.
  4. ProcessRequest performs local work for the current layer.
  5. If execution should continue, the handler raises RequestToNextLayerEventArgs.
  6. BPUAApplication receives the service request event and resolves the matching BPUA service from the registry.
  7. TransitionContextRouter calculates the next layer and invokes the next transition handler.
  8. The nested handler repeats the same pattern until no next layer exists.
  9. On the way back, handlers perform ProcessResponse and optional asynchronous response processing.

Why This Flow Matters

The important architectural idea is that transition execution is neither a direct call chain nor a controller pipeline. It is a request-handler pipeline coordinated through events, registry-based service lookup, and explicit layer progression.

Transition Context as the Carrier

The transition context is the thing that moves through the lifecycle. The router augments it with request metadata while the handlers use it as the carrier of process state and response state. This page does not redefine transition context conceptually; it shows its runtime role in the current implementation.

Summary

The execution lifecycle is the runtime form of BPUA's transition pipeline. Each layer performs its work, delegates through the router, and then participates in the response path.

Table of Content BPUA Chapter Previous: Validation Subsystem Next: Exit States

 


Business Process Programming in .Net
© 2004-2026 Laskarzhevsky Software Inc.
Unless otherwise noted, the content of this website is licensed under the Creative Commons Attribution 4.0 International License (CC BY 4.0).
Code examples are provided under the MIT License.
You are free to share and adapt the material provided that appropriate credit is given and any modifications are clearly indicated.
The information provided on this website is for educational purposes only.
The author and publisher make no warranties regarding the completeness or suitability of the information and are not responsible for any damages resulting from its use.