30 lines
1.2 KiB
C#
30 lines
1.2 KiB
C#
using Caspian.WorkflowFramework.Models;
|
|
|
|
namespace Caspian.WorkflowFramework.Contracts
|
|
{
|
|
public interface IWorkflowService
|
|
{
|
|
/// <summary>
|
|
/// Create and executes a new workflow instance.
|
|
/// </summary>
|
|
/// <param name="input"></param>
|
|
/// <returns>A new <see cref="WorkflowResponse<WorkflowModel>"/> object.</returns>
|
|
/// <remarks>Create a new workflow instance and executes it and waits for it to complete or reach a suspend point.</remarks>
|
|
Task<WorkflowResponse<WorkflowModel>> CreateAndExecuteAsync(CreateAndExecuteWorkflowModel input);
|
|
|
|
/// <summary>
|
|
/// Publishes the specified event.
|
|
/// </summary>
|
|
/// <param name="input"></param>
|
|
/// <returns>A new <see cref="WorkflowResponse<WorkflowModel>"/> object.</returns>
|
|
Task<WorkflowResponse<WorkflowModel>> PublishEventAsync(PublishEventModel input);
|
|
|
|
/// <summary>
|
|
/// Inquiry last state of workflow instance.
|
|
/// </summary>
|
|
/// <param name="input"></param>
|
|
/// <returns>A new <see cref="WorkflowResponse<WorkflowModel>"/> object.</returns>
|
|
Task<WorkflowResponse<WorkflowModel>> InquiryStateAsync(InquiryStateModel input);
|
|
}
|
|
}
|