Hi
I'm struggling to configure a decision flow in my job definition. The job is triggered with TaskExecutorPartitionHandler. We are reading all the file's in from a directory. The files are processed in there own step and the configuration for reading the file is done with lazy binding.
In the directory we get files which can't be processed(wrong format) and has to be put in a error directory. The files which has been succesfuly processed are put in the done directory.
The current configuration I use:
Code:... <!--Externalize the flow definition--> <b:flow id="oneBansta"> <b:step id="bansta2Processing" > <b:tasklet> <b:chunk reader="segmentgroupreader" processor="segmentGroupProcessor" writer="segmentGroupWriter" commit-interval="5"> </b:chunk> </b:tasklet> <b:next on="*" to="moveToDoneTasklet"/> <b:next on="ERROR" to="moveToErrorTasklet"/> </b:step> </b:flow> <!-- job definition, using the batch namespace --> <b:job id="completeJob"> <!--"Transition point need all the file(s) in a directory to process"--> <b:flow id="completeJob.oneBanstaFlow" parent="oneBansta"/> </b:job> ...
After reading the book, we tought the decision flow is a good feature to handle this. I tried a few configurations and get exceptions:
Caused by: java.lang.IllegalArgumentException: Missing state for [StateTransition: [state=completeJob.oneBanstaFlow.bansta2Processing, pattern=*, next=completeJob.oneBanstaFlow.moveToDoneTasklet]]
If I define a decision I get the following ERROR.
...Code:<b:job id="completeJob"> <!--"Transition point need all the file(s) in a directory to process"--> <b:flow id="completeJob.oneBanstaFlow" parent="oneBansta"/> <b:decision id="whatEverDecision" decider="outcomeDecider"> <b:end on="*"/> <b:next on="ERROR" to="moveToErrorTasklet"/> </b:decision> ...
Caused by: org.springframework.beans.factory.parsing.BeanDefi nitionParsingException: Configuration problem: The element [whatEverDecision] is unreachable
Offending resource: class path resource [jobs/complete/complete-jobTest.xml]
Any advise would be helpfull so we could solve the problem.
Regards Dirk


Reply With Quote