store.put(domain, mapResource);
} else {
map = mapResource.getMap();
}
map.put(ControlComposer.VALIDATE, new BooleanValue(validate));
map.put(Process.STEP, new StringValue(targetStep));
map.putAll(parameter);
if ( validate ) {
// 2. Validate parameters
Processor processor = ProcessorManager.getInstance().getProcessor(actionURI);
try {
// Validate only given parameters to enable wizard like forms
ParameterDescriptor[] parameterDescriptors = processor.getParameterDescriptors();
for ( int i = 0; i < parameterDescriptors.length; i++ ) {
String parameterName = parameterDescriptors[i].getName();
if ( involvedParamters.contains(parameterName) ) {
map.put(parameterName, ProcessorManager.prepareValue(parameterDescriptors[i], parameter.get(parameterName), context));
}
}
if ( wizard ) {
// Don't validate target step form
map.put(ControlComposer.VALIDATE, BooleanValue.FALSE);
}
} catch ( ValidationException exception ) {
// 3. Go back to form step if validation failes
map.put(Process.STEP, new StringValue(lastStep));
}
}
// 4. Launch target step if validation is successfull
Processor formProcess = ProcessorManager.getInstance().getProcessor(new URIValue(domain));
map.remove(RESULT);