Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#228 rm input empty string default value #705

Merged
merged 2 commits into from
Sep 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,8 @@
//3. simulate previous data for merging and removing JSON.null values
final JSONObject previousData = this.serializationService.initialize(new JSONObject(definition.getJsonSchema()).toString());
final Map<String, Object> clearedData = this.serializationService.merge(filteredData, previousData);
//4. merge with default values
final JSONObject defaultValue = this.serializationService.initialize(new JSONObject(definition.getJsonSchema()).toString());
final Map<String, Object> serializedData = this.serializationService.merge(new JSONObject(clearedData), defaultValue);
//5. map to engine data and return
return this.engineDataMapper.mapObjectsToVariables(serializedData);
return this.engineDataMapper.mapObjectsToVariables(clearedData);

Check warning on line 71 in digiwf-engine/digiwf-engine-service/src/main/java/de/muenchen/oss/digiwf/process/definition/domain/service/ServiceDefinitionDataService.java

View check run for this annotation

Codecov / codecov/patch

digiwf-engine/digiwf-engine-service/src/main/java/de/muenchen/oss/digiwf/process/definition/domain/service/ServiceDefinitionDataService.java#L71

Added line #L71 was not covered by tests
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,8 @@
val taskData = this.engineDataMapper.mapToData(task.getPayload());
val targetData = this.serializationService.deserializeData(schema.asMap(), taskData);
val serializedData = this.serializationService.merge(filteredData, new JSONObject(targetData));
val defaultValue = this.serializationService.initialize(new JSONObject(schema.getSchema()).toString());
val serializedDataWithDefaultValues = this.serializationService.merge(new JSONObject(serializedData), defaultValue);

return this.engineDataMapper.mapObjectsToVariables(serializedDataWithDefaultValues);
return this.engineDataMapper.mapObjectsToVariables(serializedData);

Check warning on line 34 in digiwf-task/digiwf-tasklist-service/src/main/java/de/muenchen/oss/digiwf/task/service/adapter/out/schema/JsonSchemaValidationAdapter.java

View check run for this annotation

Codecov / codecov/patch

digiwf-task/digiwf-tasklist-service/src/main/java/de/muenchen/oss/digiwf/task/service/adapter/out/schema/JsonSchemaValidationAdapter.java#L34

Added line #L34 was not covered by tests
}

@Override
Expand Down
Loading