45 lines
1.4 KiB
C#
45 lines
1.4 KiB
C#
using eSuite.Core.Miscellaneous;
|
|
|
|
namespace e_suite.Workflow.Core;
|
|
|
|
public interface IWorkflow : IStage<GeneralTaskAttribute>
|
|
{
|
|
/// <summary>
|
|
/// Client domain to which the workflow belongs.
|
|
/// </summary>
|
|
IGeneralIdRef Domain { get; set; }
|
|
|
|
/// <summary>
|
|
/// Current state of the workflow, see WorkflowState for details of the various states.
|
|
/// </summary>
|
|
[RuntimeOnly]
|
|
WorkflowState CurrentState { get; set; }
|
|
|
|
string ActivityNameTemplate { get; set; }
|
|
|
|
/// <summary>
|
|
/// Description of the workflow
|
|
/// </summary>
|
|
string Description { get; set; }
|
|
|
|
/// <summary>
|
|
/// If the workflow has been paused, will be true.
|
|
/// </summary>
|
|
bool Paused { get; }
|
|
|
|
/// <summary>
|
|
/// Called when the task status has been progressed from Pending to Active.
|
|
///
|
|
/// Note: You can use this method to set the TaskStatus to ReadyToComplete if there is no manual processing needed for this task.
|
|
/// After this method is completed, the TaskStatus must be either Active or ReadyToComplete.
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
Task OnActivateAsync();
|
|
|
|
/// <summary>
|
|
/// Called when the task status has been progressed from ReadyToComplete to Completed
|
|
/// When this method is completed the state must be either Active, or Completed.
|
|
/// </summary>
|
|
/// <returns></returns>
|
|
Task OnCompleteAsync();
|
|
} |