Provides details of the StartChildWorkflowExecution decision.

Access Control

You can use IAM policies to control this decision's access to Amazon SWF in much the same way as for the regular API:

  • Use a Resource element with the domain name to limit the decision to only specified domains.
  • Use an Action element to allow or deny permission to specify this decision.
  • Constrain the following parameters by using a Condition element with the appropriate keys.
    • tagList.member.N : TBD
    • taskList :String constraint. The key is "swf:taskList.name".
    • workflowType.name : String constraint. The key is “swf:workflowType.name”.
    • workflowType.version : String constraint. The key is “swf:workflowType.version”.

If the caller does not have sufficient permissions to invoke the action, or the parameter values fall outside the specified constraints, the action fails. The associated event attribute's cause parameter will be set to OPERATION_NOT_PERMITTED. For details and example IAM policies, see Using IAM to Manage Access to Amazon SWF Workflows .

 public void ImplicitStringNullCheck()
 {
     // This tests a bug where the null casted as a string invoked the implicit conversion with the null which caused an exception.
     StartChildWorkflowExecutionDecisionAttributes test = new StartChildWorkflowExecutionDecisionAttributes()
     {
         ChildPolicy = (string)null
     };
 }
Beispiel #2
0
 /// <summary>
 /// Sets the StartChildWorkflowExecutionDecisionAttributes property
 /// </summary>
 /// <param name="startChildWorkflowExecutionDecisionAttributes">The value to set for the StartChildWorkflowExecutionDecisionAttributes property </param>
 /// <returns>this instance</returns>
 public Decision WithStartChildWorkflowExecutionDecisionAttributes(StartChildWorkflowExecutionDecisionAttributes startChildWorkflowExecutionDecisionAttributes)
 {
     this.startChildWorkflowExecutionDecisionAttributes = startChildWorkflowExecutionDecisionAttributes;
     return(this);
 }
Beispiel #3
0
 public Decision WithStartChildWorkflowExecutionDecisionAttributes(StartChildWorkflowExecutionDecisionAttributes startChildWorkflowExecutionDecisionAttributes)
 {
     this.startChildWorkflowExecutionDecisionAttributes = startChildWorkflowExecutionDecisionAttributes;
     return this;
 }
        /// <summary>
        /// Helper method to create a new child workflow decision. 
        /// </summary>
        /// <param name="workflowContext">Workflow setup context.</param>
        /// <returns>Properly set up decision completed request.</returns>
        protected RespondDecisionTaskCompletedRequest StartChildWorkflowExecution(WorkflowSetupContext workflowContext)
        {
            var attributes = new StartChildWorkflowExecutionDecisionAttributes
            {
                WorkflowId = workflowContext.WorkflowId,
                WorkflowType = new WorkflowType
                {
                    Name = workflowContext.WorkflowName,
                    Version = workflowContext.WorkflowVersion
                },
                ChildPolicy = workflowContext.ChildPolicy,
                Control = workflowContext.Control,
                ExecutionStartToCloseTimeout = workflowContext.ExecutionStartToCloseTimeout,
                Input = workflowContext.Input,
                TagList = workflowContext.TagList,
                TaskList = new TaskList
                    {
                        Name = workflowContext.TaskList
                    },
                TaskStartToCloseTimeout = workflowContext.TaskStartToCloseTimeout,
            };

            var decisionRequest = new RespondDecisionTaskCompletedRequest
            {
                Decisions = new List<Decision>
                    {
                        new Decision
                            {
                                DecisionType = "StartChildWorkflowExecution",
                                StartChildWorkflowExecutionDecisionAttributes = attributes
                            }
                    }
            };

            Debug.WriteLine(">>> Decision: StartChildWorkflowExecution" +
                attributes.WorkflowType.Name + " (" + attributes.WorkflowType.Version + ")");
            return decisionRequest;
        }