public ReceiveRequestSendResponseScope()
        {
            DelegateInArgument <Exception> propagatedException = new DelegateInArgument <Exception>();

            tryCatch = new TryCatch
            {
                //Try = Body, // it is already set above
                Catches =
                {
                    new Catch <Exception>
                    {
                        Action = new ActivityAction <Exception>
                        {
                            Argument = propagatedException,
                            Handler  = new ProtectFaultedOperation
                            {
                                PropagatedException = propagatedException,
                            },
                        },
                    },
                },
                // The Finally works differently here than in C#, it is called only when the Try/Catch blocks complete.
                // In case of exception, ProtectFaultedOperation will handle the exception and will close, won't fault.
                // So this Finally is called in case of Close, Cancel or Fault, only in case of Close or Cancel, we should check the operation task's completion state.
                Finally = new ProtectClosedOrCanceledOperation(),
            };

            Constraints.Add(OperationActivityHelper.VerifyParentIsWorkflowActivity());
            Constraints.Add(ReceiveRequestSendResponseScopeHelper.VerifyReceiveRequestSendResponseScopeChildren());
            Constraints.Add(ReceiveRequestSendResponseScopeHelper.SetWorkflowInterfaceOperationNames());
            Constraints.Add(ReceiveRequestSendResponseScopeHelper.SetReceiveRequestSendResponseScopeExecutionPropertyFactory());
        }
 public ReceiveRequest()
 {
     OperationNames         = new ObservableCollection <string>();
     requestResultEvaluator = TaskFuncEvaluator.CreateActivityDelegate();
     Constraints.Add(OperationActivityHelper.VerifyParentIsWorkflowActivity());
     Constraints.Add(OperationActivityHelper.VerifyIsOperationNameSet());
     Constraints.Add(OperationActivityHelper.SetAffectorOperationNames());
     Constraints.Add(ReceiveRequestSendResponseScopeHelper.VerifyParentIsReceiveRequestSendResponseScope());
 }
示例#3
0
 public ReceiveRequestSendResponseScope()
 {
     Constraints.Add(OperationActivityHelper.VerifyParentIsWorkflowActivity());
     Constraints.Add(ReceiveRequestSendResponseScopeHelper.VerifyReceiveRequestSendResponseScopeChildren());
     Constraints.Add(ReceiveRequestSendResponseScopeHelper.SetReceiveRequestSendResponseScopeExecutionPropertyFactory());
 }
 public SendResponse()
 {
     persist = new Persist();
     Constraints.Add(OperationActivityHelper.VerifyParentIsWorkflowActivity());
     Constraints.Add(ReceiveRequestSendResponseScopeHelper.VerifyParentIsReceiveRequestSendResponseScope());
 }