Package: com.ibm.jbatch.tck.tests.jslxml
Class: ParallelContextPropagationTests

testSplitFlowContextPropagation

Test introduced in TCK Version: 1.1.WORKING

Test Assertion(s)

Assertion(s)
The values of JobContext and StepContext can be accessed from an artifact running in a split-flow.

Jakarta Batch Reference(s)

Section Version Citation(s) Note(s)
10.9.1 1.0 ~ API for JobContext
10.9.2 1.0 ~ API for StepContext

API Reference(s)

Class Name Method Names Note(s)
jakarta.batch.runtime.context.JobContext ~ getProperties
~ getJobName
~ getExecutionId
~ getInstanceId
jakarta.batch.runtime.context.StepContext ~ getStepExecutionId

Issue Reference(s)

Link(s)
https://java.net/bugzilla/show_bug.cgi?id=5164

Test Strategy

Strategy
First, certain JobContext and StepContext values (properties, names, ids, etc.) are checked against hard-coded values within the executing batchlet. Then, each step within the split-flow (they all use the same batchlet) sets its exit status to a formatted String of these values. Finally, we check that the values obtained by parsing the exit statuses of the steps correspond with the values obtained from the JobExecution and StepExecutions.

Additional Comments

Comment(s)
There is no particular place in the spec that says that split-flows share the same values for the getters tested as the top-level JobContext/StepContext.