additional logic to support if already set by a tasklet - the step value

is ignored
This commit is contained in:
Will Schipp
2013-01-17 13:53:25 -05:00
committed by Michael Minella
parent 5e8c1b5684
commit c6d7a4abd6
2 changed files with 9 additions and 6 deletions

View File

@@ -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;

View File

@@ -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 {