for (int position = 0; position < availableProperties.size(); position++) {
ProcessProperty propertyAtPosition = availableProperties.get(position);
String key = propertyAtPosition.getName();
if (propertiesToSet.containsKey(key)) {
String desiredValue = propertiesToSet.get(key);
AccessCondition permissions = propertyAtPosition.getCurrentStepAccessCondition();
if (AccessCondition.WRITE.equals(permissions) || AccessCondition.WRITEREQUIRED.equals(permissions)) {
propertyAtPosition.setValue(desiredValue);
if (dialog.getContainer() == null || dialog.getContainer() == 0) {
dialog.setProcessProperty(propertyAtPosition);
} else