public void Does_not_populates_external_workflow_properties_when_not_generated_by_external_workflow()
        {
            var cancellationRequestedEvent = new WorkflowCancellationRequestedEvent(_builder.WorkflowCancellationRequestedEvent("cause"));

            Assert.That(cancellationRequestedEvent.Cause, Is.EqualTo("cause"));
            Assert.That(cancellationRequestedEvent.ExternalWorkflowRunid, Is.Null);
            Assert.That(cancellationRequestedEvent.ExternalWorkflowId, Is.Null);
        }
        public void Setup()
        {
            _builder = new EventGraphBuilder();

            var cancellationRequestedEvent = _builder.WorkflowCancellationRequestedEvent("cause", "runid", "id");

            _cancellationRequestedEvent = new WorkflowCancellationRequestedEvent(cancellationRequestedEvent);
        }
示例#3
0
        public void Cancel_request_for_multiple_items_can_be_returned_as_workflow_action()
        {
            var workflow = new WorkflowtoReturnCancelActionForMultipleItems();

            workflow.NewExecutionFor(new WorkflowHistoryEvents(new[] { new HistoryEvent() }));
            var cancelRequestEvent = new WorkflowCancellationRequestedEvent(_builder.WorkflowCancellationRequestedEvent("cause"));

            var workflowAction = cancelRequestEvent.Interpret(workflow).GetDecisions();

            Assert.That(workflowAction, Is.EquivalentTo(new WorkflowDecision[] { new CancelActivityDecision(Identity.New(_activityName, _activityVersion)), new CancelTimerDecision(Identity.Timer(_timerName)) }));
        }
 protected WorkflowAction OnCancellationRequested(WorkflowCancellationRequestedEvent workflowCancellationRequestedEvent)
 {
     return(_workflowAction);
 }