additional logic to support if already set by a tasklet - the step value
is ignored
This commit is contained in:
committed by
Michael Minella
parent
5e8c1b5684
commit
c6d7a4abd6
@@ -179,11 +179,14 @@ public abstract class AbstractStepParser {
|
||||
}
|
||||
|
||||
//add the allow parser here
|
||||
// String isAllowStart = stepElement.getAttribute(ALLOW_START_ATTR);
|
||||
// if (StringUtils.hasText(isAllowStart)) {
|
||||
// //set the value as a property
|
||||
// bd.getPropertyValues().add("allowStartIfComplete", Boolean.valueOf(isAllowStart));
|
||||
// }
|
||||
String isAllowStart = stepElement.getAttribute(ALLOW_START_ATTR);
|
||||
if (StringUtils.hasText(isAllowStart)) {
|
||||
//check if the value is already set from an inner element
|
||||
if (!bd.getPropertyValues().contains("allowStartIfComplete")) {
|
||||
//set the value as a property
|
||||
bd.getPropertyValues().add("allowStartIfComplete", Boolean.valueOf(isAllowStart));
|
||||
}//end if
|
||||
}
|
||||
|
||||
stepListenerParser.handleListenersElement(stepElement, bd, parserContext);
|
||||
return bd;
|
||||
|
||||
@@ -12,7 +12,7 @@ import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.test.context.ContextConfiguration;
|
||||
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
|
||||
@Ignore
|
||||
//@Ignore
|
||||
@RunWith(SpringJUnit4ClassRunner.class)
|
||||
@ContextConfiguration
|
||||
public class TaskletStepAllowStartIfCompleteTest {
|
||||
|
||||
Reference in New Issue
Block a user