Esempio n. 1
0
 public override WorkflowAction NextAction(WorkflowItem workflowItem)
 {
     return(WorkflowAction.ContinueWorkflow(workflowItem));
 }
Esempio n. 2
0
 internal override WorkflowAction DefaultAction(IWorkflowDefaultActions defaultActions)
 {
     return(WorkflowAction.FailWorkflow("LAMBDA_FUNCTION_TIMED_OUT", TimedoutType));
 }
Esempio n. 3
0
 /// <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));
 }
Esempio n. 4
0
 /// <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>()));
 }
Esempio n. 5
0
 public void Add(WorkflowAction action) => _actions.Add(action);
Esempio n. 6
0
 /// <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;
 }
Esempio n. 8
0
 protected IEnumerable <WorkflowDecision> WorkflowDecisionsOnFalseWhen(WorkflowAction action) =>
 action.WithTriggeredItem(this).Decisions(Workflow);
Esempio n. 9
0
 internal override WorkflowAction DefaultAction(IWorkflowDefaultActions defaultActions)
 {
     return(WorkflowAction.FailWorkflow(Reason, Details));
 }
Esempio n. 10
0
 internal override WorkflowAction DefaultAction(IWorkflowDefaultActions defaultActions)
 {
     return(WorkflowAction.FailWorkflow("LAMBDA_FUNCTION_SCHEDULING_FAILED", Cause));
 }
Esempio n. 11
0
 /// <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()));
 }
Esempio n. 12
0
 /// <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));
 }
Esempio n. 13
0
 /// <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));
 }
Esempio n. 14
0
 /// <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));
 }
Esempio n. 15
0
 /// <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));
 }