I have a AWS step function defined in the C# CDK where one of the states is a task as defined as such:
var executeGlueJobStepFunction = new CustomState(this, "ExecuteGlueJobStepFunction", new CustomStateProps
{
StateJson = new Dictionary<string, object>
{
{ "Type", "Task" },
{ "Resource", "arn:aws:states:::states:startExecution.sync:2" },
{ "Parameters", new Dictionary<string, object>
{
{ "StateMachineArn.$", JsonPath.Format($"arn:aws:states:{Stack.Of(this).Region}:{Stack.Of(this).Account}:stateMachine:{{}}", JsonPath.StringAt("$.stepFunctionName")) },
{ "Input.$", JsonPath.EntirePayload }
}
},
{ "ResultSelector", new Dictionary<string,object>
{
{ "Output.$", "$.Output" }
}
},
},
});
This starts executing another step function that triggers a glue job run synchronously.
Now, when the caller step function fails or is aborted, the child execution (and the glue job run) continues to completion.
Is there a way I can change this behaviour so that the child execution and glue job run are terminated if the caller step function fails?