That's all we wanted to do and we achieved it in a single batch step: reading, processing,
and writing. In the chunk-oriented approach, we will have three separate mechanisms for
this. Let's add our new step to externalSystem.xml from src/main/re-
<job id="externalSystem" xmlns="http://xmlns.jcp.org/xml/ns/
<property name="logFile" value="log.txt" />
<property name="bitcoinFile" value="bitcoins.txt"
<step id="processData" next="checkBitcoins" > 
<reader ref="externalSystemReader" />
<processor ref="seatProcessor" />
<writer ref="seatWriter" />
<step id="checkBitcoins"> 
<batchlet ref="bitcoinTask" />
There are three new things to notice in the XML file. First, we added a new property,
which we referenced earlier in our batchlet  . Next, we defined that after our chunk
processing step, we would like to invoke another one, checkBitcoins  . Finally,
we created a new step in which we referenced our batchlet class.
You can once again start your job, and after it is completed, a bitcoins.txt file
should appear in WildFly's bin directory.
We've covered the foundation of the batching framework, which allows you to fulfill most
of the frequent requirements defined for enterprise applications. However, there is a lot
more inside the specification, such as splits, partitions, and workflow-related elements
(statuses and decisions) that you can explore if a more sophisticated mechanism is re-
quired by the business processes that you're implementing.
Search WWH ::