Cohesive.Processes
0.1.0-alpha.4
See the version list below for details.
dotnet add package Cohesive.Processes --version 0.1.0-alpha.4
NuGet\Install-Package Cohesive.Processes -Version 0.1.0-alpha.4
<PackageReference Include="Cohesive.Processes" Version="0.1.0-alpha.4" />
<PackageVersion Include="Cohesive.Processes" Version="0.1.0-alpha.4" />
<PackageReference Include="Cohesive.Processes" />
paket add Cohesive.Processes --version 0.1.0-alpha.4
#r "nuget: Cohesive.Processes, 0.1.0-alpha.4"
#:package Cohesive.Processes@0.1.0-alpha.4
#addin nuget:?package=Cohesive.Processes&version=0.1.0-alpha.4&prerelease
#tool nuget:?package=Cohesive.Processes&version=0.1.0-alpha.4&prerelease
Cohesive.Processes
Declarative process definitions and runtime infrastructure for multistep workflows over entities, queries, waits, signals, and effects.
Install
dotnet add package Cohesive.Processes
Use When
- You need process definitions that coordinate entity transitions, repository reads, waits, requests, and effects.
- You want deterministic process planning and runtime state that can be interpreted by different storage or orchestration adapters.
- You need a semantic process model separate from a specific queue, workflow engine, or database.
Example
using Cohesive.Processes.Model;
using Cohesive.Relations.Queries;
[GenerateProcessDefinition(nameof(Build))]
public partial class DispatchCustomerProcess : IProcessDefinition<string, DispatchCustomerResult>
{
static readonly CustomerEntity Customers = CustomerEntity.Instance;
static readonly CarrierEntity Carriers = CarrierEntity.Instance;
static readonly QuerySource SegmentSource = QuerySource.For<SegmentReadModel>("segments");
static readonly QuerySource OrderSource = QuerySource.For<OrderReadModel>("orders");
async ProcessTask<DispatchCustomerResult> Build(
ProcessAuthoringContext<string, DispatchCustomerResult> process,
string customerId)
{
var customer = await process.Read(Customers.ReadById(customerId, snapshot =>
new CustomerReadModel(
CustomerId: snapshot.Require(entity => entity.Id),
Name: snapshot.Require(entity => entity.Name),
SegmentId: snapshot.Require(entity => entity.SegmentId))));
var profiles = await process.Query(Query
.From<CustomerReadModel>([customer], rootId: static root => root.CustomerId)
.JoinOne<CustomerReadModel, string>(
alias: "segment",
source: SegmentSource,
rootKeySelector: static root => root.SegmentId)
.JoinMany<CustomerReadModel, OrderReadModel, string>(
alias: "orders",
source: OrderSource,
rootKey: static root => root.CustomerId,
foreignKey: static order => order.CustomerId)
.Select(static join => new CustomerProfile(
CustomerId: join.RootAs<CustomerReadModel>().CustomerId,
Segment: join.RequireOne<SegmentReadModel>("segment"),
Orders: join.Many<OrderReadModel>("orders"))));
var profile = profiles[0];
var reservation = await process.Request(new ReserveCarrierRequest(
CustomerId: profile.CustomerId,
OrderCount: profile.Orders.Count));
var customerUpdate = await process.Transition(
Customers.MarkDispatched,
entityId: profile.CustomerId,
input: new(reservation.CarrierId));
var carrierUpdate = await process.Transition(
Carriers.ReserveCapacity,
entityId: reservation.CarrierId,
input: new(reservation.ReservedOrderCount));
return process.Return(new(
CustomerId: profile.CustomerId,
CarrierId: reservation.CarrierId,
CustomerVersion: customerUpdate.NewVersion,
CarrierVersion: carrierUpdate.NewVersion));
}
}
public sealed record ReserveCarrierRequest(string CustomerId, int OrderCount)
: IEffectRequest<CarrierReservation>
{
public static string RequestName => "ReserveCarrier";
}
public sealed record CarrierReservation(string CarrierId, int ReservedOrderCount);
public sealed record DispatchCustomerResult(
string CustomerId,
string CarrierId,
long CustomerVersion,
long CarrierVersion);
Related Packages
Cohesive.Transitionsfor entity transition semantics.Cohesive.Storagefor repository adapters.Cohesive.Adapters.DurableTaskfor Azure Durable Task execution.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Cohesive (>= 0.1.0-alpha.4)
- Cohesive.Relations (>= 0.1.0-alpha.4)
- Cohesive.Transitions (>= 0.1.0-alpha.4)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.0)
NuGet packages (9)
Showing the top 5 NuGet packages that depend on Cohesive.Processes:
| Package | Downloads |
|---|---|
|
Cohesive.Storage
Cohesive semantic system definition and orchestration building blocks. |
|
|
Cohesive.Api.Execution
Canonical execution-control API declarations and reference integration for Cohesive execution semantics. |
|
|
Cohesive.Host
Cohesive semantic system definition and orchestration building blocks. |
|
|
Cohesive.Adapters.DurableTask
Cohesive semantic system definition and orchestration building blocks. |
|
|
Cohesive.Adapters.Cosmos
Cohesive semantic system definition and orchestration building blocks. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.0-alpha.128 | 0 | 10/5/2026 |
| 0.1.0-alpha.127 | 0 | 10/4/2026 |
| 0.1.0-alpha.126 | 53 | 10/4/2026 |
| 0.1.0-alpha.125 | 56 | 10/4/2026 |
| 0.1.0-alpha.124 | 54 | 10/4/2026 |
| 0.1.0-alpha.123 | 57 | 10/4/2026 |
| 0.1.0-alpha.122 | 65 | 10/3/2026 |
| 0.1.0-alpha.121 | 67 | 10/2/2026 |
| 0.1.0-alpha.120 | 130 | 9/29/2026 |
| 0.1.0-alpha.119 | 102 | 9/29/2026 |
| 0.1.0-alpha.118 | 122 | 9/29/2026 |
| 0.1.0-alpha.117 | 126 | 9/27/2026 |
| 0.1.0-alpha.116 | 116 | 9/26/2026 |
| 0.1.0-alpha.115 | 145 | 9/26/2026 |
| 0.1.0-alpha.114 | 126 | 9/24/2026 |
| 0.1.0-alpha.113 | 129 | 9/24/2026 |
| 0.1.0-alpha.112 | 131 | 9/23/2026 |
| 0.1.0-alpha.111 | 122 | 9/23/2026 |
| 0.1.0-alpha.110 | 124 | 9/23/2026 |
| 0.1.0-alpha.4 | 103 | 7/13/2026 |