Skip to content

Commit

Permalink
Review fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
gmokki committed Apr 27, 2020
1 parent ee682d1 commit 4fa6a7d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,12 @@ public abstract class ResourceBase {
new SimpleEntry<>(actionStateVariables, WorkflowInstanceInclude.ACTION_STATE_VARIABLES),
new SimpleEntry<>(childWorkflows, WorkflowInstanceInclude.CHILD_WORKFLOW_IDS))
.collect(toMap(Entry::getKey, Entry::getValue)));
protected static final String QUERY_ARCHIVED_DEFAULT_S = "false";
protected static final boolean QUERY_ARCHIVED_DEFAULT = Boolean.parseBoolean(QUERY_ARCHIVED_DEFAULT_S);
protected static final String QUERY_ARCHIVED_DEFAULT_STR = "false";
protected static final boolean QUERY_ARCHIVED_DEFAULT = Boolean.parseBoolean(QUERY_ARCHIVED_DEFAULT_STR);

public List<ListWorkflowDefinitionResponse> listWorkflowDefinitions(final List<String> types,
final WorkflowDefinitionService workflowDefinitions, final ListWorkflowDefinitionConverter converter,
final WorkflowDefinitionDao workflowDefinitionDao) {
final WorkflowDefinitionService workflowDefinitions, final ListWorkflowDefinitionConverter converter,
final WorkflowDefinitionDao workflowDefinitionDao) {
List<AbstractWorkflowDefinition<? extends WorkflowState>> definitions = workflowDefinitions.getWorkflowDefinitions();
Set<String> reqTypes = new HashSet<>(types);
Set<String> foundTypes = new HashSet<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public ResponseEntity<?> updateWorkflowInstance(@ApiParam("Internal id for workf
public ResponseEntity<?> fetchWorkflowInstance(@ApiParam("Internal id for workflow instance") @PathVariable("id") long id,
@RequestParam(value = "include", required = false) @ApiParam(value = INCLUDE_PARAM_DESC, allowableValues = INCLUDE_PARAM_VALUES, allowMultiple = true) String include,
@RequestParam(value = "maxActions", required = false) @ApiParam("Maximum number of actions returned for each workflow instance") Long maxActions,
@RequestParam(value = "queryArchive", required = false, defaultValue = QUERY_ARCHIVED_DEFAULT_S) @ApiParam("Query also the archive if not found from main tables") boolean queryArchive) {
@RequestParam(value = "queryArchive", required = false, defaultValue = QUERY_ARCHIVED_DEFAULT_STR) @ApiParam("Query also the archive if not found from main tables") boolean queryArchive) {
return handleExceptions(
() -> ok(super.fetchWorkflowInstance(id, include, maxActions, queryArchive, this.workflowInstances, this.listWorkflowConverter)));
}
Expand All @@ -129,7 +129,7 @@ public ResponseEntity<?> listWorkflowInstances(
@RequestParam(value = "include", required = false) @ApiParam(value = INCLUDE_PARAM_DESC, allowableValues = INCLUDE_PARAM_VALUES, allowMultiple = true) String include,
@RequestParam(value = "maxResults", required = false) @ApiParam("Maximum number of workflow instances to be returned") Long maxResults,
@RequestParam(value = "maxActions", required = false) @ApiParam("Maximum number of actions returned for each workflow instance") Long maxActions,
@RequestParam(value = "queryArchive", required = false, defaultValue = QUERY_ARCHIVED_DEFAULT_S) @ApiParam("Query also the archive if not enough results found from main tables") boolean queryArchive) {
@RequestParam(value = "queryArchive", required = false, defaultValue = QUERY_ARCHIVED_DEFAULT_STR) @ApiParam("Query also the archive if not enough results found from main tables") boolean queryArchive) {
return handleExceptions(
() -> ok(super.listWorkflowInstances(ids, types, parentWorkflowId, parentActionId, states, statuses, businessKey,
externalId, include, maxResults, maxActions, queryArchive, this.workflowInstances, this.listWorkflowConverter).iterator()));
Expand Down

0 comments on commit 4fa6a7d

Please sign in to comment.