Cronus Documentation
  • Introduction
  • Getting Started
    • Quick Start
      • Setup
      • Persist First Event
      • Explore Projections
  • Cronus Framework
    • Concepts
      • Domain Driven Design
      • Event Sourcing
      • Command Query Responsibility Segregation
    • Domain Modeling
      • Bounded Context
      • Multitenancy
      • Aggregate
      • Entity
      • Value Object
      • IDs
      • Published Language
      • Messages
        • Commands
        • Events
        • Public Events
        • Signals
      • Handlers
        • Application Services
        • Sagas
        • Projections
        • Ports
        • Triggers
        • Gateways
    • Event Store
      • EventStore Player
      • Migrations
        • Copy EventStore
    • Workflows
    • Indices
    • Jobs
    • Cluster
    • Messaging
      • Serialization
    • Configuration
    • Unit testing
Powered by GitBook
On this page

Was this helpful?

Export as PDF
  1. Cronus Framework

Workflows

PreviousCopy EventStoreNextIndices

Last updated 2 years ago

Was this helpful?

Workflows are the center of message processing. It is very similar to the .

With a workflow you can:

  • define what logic will be executed when a message arrives

  • execute an action before or after the actual execution

  • override or stop a workflow pipeline

Default workflows

By default, all messages are handled in an isolated fashion via using scopes. Once the scope is created then the next workflow () is invoked with the current message and scope. In addition, wraps the entire pipeline bringing insights into the performance of the message handling pipeline.

ScopedMessageWorkflow

The primary focus of the workflow is to prepare an isolated scope and context within which a message is being processed. Usually, you should not interact with this workflow directly.

The workflow creates an instance of which allows using Dependency Injection in a familiar to a dotnet developer way. In addition, the workflow initializes an instance of which holds information about the current handling the message.

Additionally, Cronus uses structured logging and a new log scope is created every time a new message arrives so you could co-relate log messages.

Read more about the and if this is a new concept for you.

MessageHandleWorkflow

TODO: Explain message handling workflow responsibilities

https://github.com/Elders/Cronus/issues/266
ASP.NET middleware pipeline
ScopedMessageWorkflow
MessageHandleWorkflow
DiagnosticsWorkflow
IServiceScope
CronusContext
tenant
Dependency Injection
service lifetimes