using Caspian.WorkflowFramework.Models; namespace Caspian.WorkflowFramework.Contracts { public interface IWorkflowService { /// /// Create and executes a new workflow instance. /// Task> CreateAndExecuteAsync(CreateAndExecuteWorkflowModel input); /// /// Create a new workflow instance if it does not exist or get the running instance. /// Task> CreateOrGetInstanceAsync(CreateAndExecuteWorkflowModel input); /// /// Publishes the specified event to a workflow instance. /// Task> PublishEventAsync(PublishEventModel input); /// /// Inquiry last state of workflow instance. /// Task> InquiryStateAsync(InquiryStateModel input); /// /// Gets all active workflow instances for a specific user. /// Task>> GetActiveInstancesAsync(GetActiveInstancesModel input); /// /// Gets all active workflow instance IDs for a specific user. /// Task>> GetActiveInstanceIdsAsync(GetActiveInstancesModel input); /// /// Gets the latest active workflow instance for a specific user and workflow name. /// Task> GetLatestActiveInstanceAsync(GetLatestActiveInstanceModel input); /// /// Gets the ID of the latest active workflow instance for a specific user and workflow name. /// Task> GetLatestActiveInstanceIdAsync(GetLatestActiveInstanceModel input); /// /// Cancels the specified workflow instance. /// Task> CancelInstanceAsync(CancelWorkflowInstanceModel input); } }