// the encoded FlowDefinitionRedirect should look something like
// "flowDefinitionId?param0=value0¶m1=value1"
// now parse that and build a corresponding view selection
int index = encodedRedirect.indexOf('?');
String flowDefinitionId;
LocalAttributeMap executionInput = null;
if (index != -1) {
flowDefinitionId = encodedRedirect.substring(0, index);
String[] parameters = StringUtils.delimitedListToStringArray(encodedRedirect.substring(index + 1), "&");
executionInput = new LocalAttributeMap(parameters.length, 1);
for (int i = 0; i < parameters.length; i++) {
String nameAndValue = parameters[i];
index = nameAndValue.indexOf('=');
if (index != -1) {
executionInput.put(nameAndValue.substring(0, index), nameAndValue.substring(index + 1));
} else {
executionInput.put(nameAndValue, "");
}
}
} else {
flowDefinitionId = encodedRedirect;
}