From 47747b58abd562f1f2669aae8e79691681e96bc3 Mon Sep 17 00:00:00 2001 From: lucasward Date: Wed, 11 Feb 2009 17:04:03 +0000 Subject: [PATCH] BATCH-1069: Added section to Step chapter about standalone steps. --- docs/src/site/docbook/reference/step.xml | 38 ++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/docs/src/site/docbook/reference/step.xml b/docs/src/site/docbook/reference/step.xml index de4f3cb93..10fd3001e 100644 --- a/docs/src/site/docbook/reference/step.xml +++ b/docs/src/site/docbook/reference/step.xml @@ -123,6 +123,44 @@ directly passed from the reader to the writer. +
+ Referencing a Standalone Step + + While steps must exist within a Job to define the flow, it can + sometimes be useful to reference a 'standalone' Step. For example, if a + Step is used by multiple jobs it can be useful to declare it once and + reference it from multiple jobs. This can be achieved with the ref + attribute: + + + <job id="sampleJob"> + <step id="step1" ref="standaloneStep" /> + </job> + + <step id="standaloneStep" job-repository="jobRepository" transaction-manager="transactionManager"> + <tasklet reader="itemReader" writer="itemWriter" commit-interval="10"/> + </step> + + + + It should be noted that the id attribute is still required on the + step within the job element. This is for two reasons: + + + + The Id will be used as the step name when persisting the + StepExecution, if the same standalone step is referenced in more + than one step in the job, an error will occur. + + + + When creating job flows, as described later in this chapter, + the next attribute should be referring to the step in the flow, not + the standalone step. + + +
+
The Commit Interval