Merge branch 'feature/building-block-workflow-contract-baseline' into development
This commit is contained in:
commit
bdac1edce0
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,2 +1,4 @@
|
|||||||
.tasks/
|
.tasks/
|
||||||
.agile/
|
.agile/
|
||||||
|
**/bin/
|
||||||
|
**/obj/
|
||||||
|
|||||||
5
BuildingBlock.Workflow.slnx
Normal file
5
BuildingBlock.Workflow.slnx
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<Solution>
|
||||||
|
<Folder Name="/src/">
|
||||||
|
<Project Path="src/BuildingBlock.Workflow.Contracts/BuildingBlock.Workflow.Contracts.csproj" />
|
||||||
|
</Folder>
|
||||||
|
</Solution>
|
||||||
10
Directory.Build.props
Normal file
10
Directory.Build.props
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<Project>
|
||||||
|
<PropertyGroup>
|
||||||
|
<Authors>AgileWebs</Authors>
|
||||||
|
<Company>AgileWebs</Company>
|
||||||
|
<RepositoryType>git</RepositoryType>
|
||||||
|
<RepositoryUrl>http://192.168.68.156:3000/AgileWebs/building-block-workflow</RepositoryUrl>
|
||||||
|
<PackageProjectUrl>http://192.168.68.156:3000/AgileWebs/building-block-workflow</PackageProjectUrl>
|
||||||
|
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
|
||||||
|
</PropertyGroup>
|
||||||
|
</Project>
|
||||||
@ -0,0 +1,11 @@
|
|||||||
|
using BuildingBlock.Workflow.Contracts.Requests;
|
||||||
|
using BuildingBlock.Workflow.Contracts.Responses;
|
||||||
|
|
||||||
|
namespace BuildingBlock.Workflow.Contracts.Abstractions;
|
||||||
|
|
||||||
|
public interface IWorkflowCapabilityContract
|
||||||
|
{
|
||||||
|
Task<TransitionWorkflowStateResponse> TransitionWorkflowStateAsync(
|
||||||
|
TransitionWorkflowStateRequest request,
|
||||||
|
CancellationToken cancellationToken);
|
||||||
|
}
|
||||||
@ -0,0 +1,9 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>net10.0</TargetFramework>
|
||||||
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
</Project>
|
||||||
@ -0,0 +1,11 @@
|
|||||||
|
namespace BuildingBlock.Workflow.Contracts.Contracts;
|
||||||
|
|
||||||
|
public enum WorkflowState
|
||||||
|
{
|
||||||
|
Queued = 0,
|
||||||
|
InProgress = 1,
|
||||||
|
Blocked = 2,
|
||||||
|
Completed = 3,
|
||||||
|
Failed = 4,
|
||||||
|
Canceled = 5
|
||||||
|
}
|
||||||
@ -0,0 +1,8 @@
|
|||||||
|
namespace BuildingBlock.Workflow.Contracts.Contracts;
|
||||||
|
|
||||||
|
public sealed record WorkflowWorkItemContract(
|
||||||
|
string WorkItemId,
|
||||||
|
string WorkType,
|
||||||
|
int Priority,
|
||||||
|
DateTime RequestedAtUtc,
|
||||||
|
WorkflowState CurrentState);
|
||||||
@ -0,0 +1,9 @@
|
|||||||
|
using BuildingBlock.Workflow.Contracts.Contracts;
|
||||||
|
|
||||||
|
namespace BuildingBlock.Workflow.Contracts.Requests;
|
||||||
|
|
||||||
|
public sealed record TransitionWorkflowStateRequest(
|
||||||
|
string WorkItemId,
|
||||||
|
WorkflowState TargetState,
|
||||||
|
string RequestedBy,
|
||||||
|
DateTime RequestedAtUtc);
|
||||||
@ -0,0 +1,10 @@
|
|||||||
|
using BuildingBlock.Workflow.Contracts.Contracts;
|
||||||
|
|
||||||
|
namespace BuildingBlock.Workflow.Contracts.Responses;
|
||||||
|
|
||||||
|
public sealed record TransitionWorkflowStateResponse(
|
||||||
|
string WorkItemId,
|
||||||
|
WorkflowState PreviousState,
|
||||||
|
WorkflowState CurrentState,
|
||||||
|
bool TransitionApplied,
|
||||||
|
string? RejectionReason);
|
||||||
Loading…
Reference in New Issue
Block a user