public override WorkflowAction NextAction(WorkflowItem workflowItem) { return(WorkflowAction.ContinueWorkflow(workflowItem)); }
internal override WorkflowAction DefaultAction(IWorkflowDefaultActions defaultActions) { return(WorkflowAction.FailWorkflow("LAMBDA_FUNCTION_TIMED_OUT", TimedoutType)); }
/// <summary> /// Returns the workflow action to cancel running workflow. /// </summary> /// <param name="workflowId"></param> /// <param name="runId"></param> /// <returns></returns> public WorkflowAction ForWorkflow(string workflowId, string runId = null) { Ensure.NotNullAndEmpty(workflowId, "workflowId"); return(WorkflowAction.CancelWorkflowRequest(workflowId, runId)); }
/// <summary> /// Returns the workflow action to cancel all given workflow items- activities, timers. /// </summary> /// <param name="workflowItems"></param> /// <returns></returns> public WorkflowAction For(IEnumerable <IWorkflowItem> workflowItems) { Ensure.NotNull(workflowItems, "workflowItems"); return(WorkflowAction.Cancel(workflowItems.OfType <WorkflowItem>())); }
public void Add(WorkflowAction action) => _actions.Add(action);
/// <summary> /// Send signal to a workflow identified by workflowId and runId. /// </summary> /// <param name="workflowId"></param> /// <param name="runId"></param> /// <returns></returns> public WorkflowAction ForWorkflow(string workflowId, string runId) { Ensure.NotNullAndEmpty(workflowId, "workflowId"); return(WorkflowAction.Signal(_signalName, _input, workflowId, runId)); }
public CompositeWorkflowAction(WorkflowAction left, WorkflowAction right) { _left = left; _right = right; }
protected IEnumerable <WorkflowDecision> WorkflowDecisionsOnFalseWhen(WorkflowAction action) => action.WithTriggeredItem(this).Decisions(Workflow);
internal override WorkflowAction DefaultAction(IWorkflowDefaultActions defaultActions) { return(WorkflowAction.FailWorkflow(Reason, Details)); }
internal override WorkflowAction DefaultAction(IWorkflowDefaultActions defaultActions) { return(WorkflowAction.FailWorkflow("LAMBDA_FUNCTION_SCHEDULING_FAILED", Cause)); }
/// <summary> /// Record a marker in workflow history event. You can access all the markers by calling <see cref="AllMarkerEvents"/> API. /// </summary> /// <param name="markerName"></param> /// <param name="details"></param> /// <returns></returns> protected WorkflowAction RecordMarker(string markerName, object details) { Ensure.NotNullAndEmpty(markerName, "markerName"); return(WorkflowAction.RecordMarker(markerName, details.ToAwsString())); }
/// <summary> /// Start the workflow by scheduling all the startup item. This action is different than RestartWorkflow. Later one will restart the workflow /// by closing the current workflow execution. While this action will not close the workflow but will only schedule the start up item. /// </summary> /// <returns></returns> protected WorkflowAction StartWorkflow() { return(WorkflowAction.StartWorkflow(_allWorkflowItems)); }
/// <summary> /// Cancel the workflow. It will cause the workflow to be closed immediately on Amazon SWF with cancelled status. /// </summary> /// <param name="details"></param> /// <returns></returns> protected static WorkflowAction CancelWorkflow(string details) { return(WorkflowAction.CancelWorkflow(details)); }
/// <summary> /// Complete the workflow with given result. It will cause the workflow to be closed immediately on Amazon SWF with completed status. /// </summary> /// <param name="result"></param> /// <returns></returns> protected static WorkflowAction CompleteWorkflow(object result) { return(WorkflowAction.CompleteWorkflow(result)); }
/// <summary> /// Fail the workflow with reason and details. It will cause the workflow to be closed immediately on Amazon SWF with failed status. /// </summary> /// <param name="reason">Short reason, why workflow is failing.</param> /// <param name="details">Any detail about failure.</param> /// <returns></returns> protected static WorkflowAction FailWorkflow(string reason, object details) { return(WorkflowAction.FailWorkflow(reason, details)); }