Feedback from code reviews

This commit is contained in:
2022-09-06 09:29:24 -05:00
parent 9a8b49f1a7
commit 12925127b2
5 changed files with 22 additions and 6 deletions

View File

@ -198,12 +198,30 @@ public class QProcessMetaData implements QAppChildMetaData
**
*******************************************************************************/
public QProcessMetaData addStep(QStepMetaData step)
{
int index = 0;
if(this.stepList != null)
{
index = this.stepList.size();
}
addStep(index, step);
return (this);
}
/*******************************************************************************
** add a step to the stepList (at the specified index) and the step map
**
*******************************************************************************/
public QProcessMetaData addStep(int index, QStepMetaData step)
{
if(this.stepList == null)
{
this.stepList = new ArrayList<>();
}
this.stepList.add(step);
this.stepList.add(index, step);
if(this.steps == null)
{

View File

@ -33,7 +33,6 @@ import com.kingsrook.qqq.backend.core.model.actions.tables.count.CountInput;
import com.kingsrook.qqq.backend.core.model.actions.tables.count.CountOutput;
import com.kingsrook.qqq.backend.core.model.actions.tables.query.QQueryFilter;
import com.kingsrook.qqq.backend.core.model.actions.tables.query.QueryInput;
import com.kingsrook.qqq.backend.core.utils.CollectionUtils;
import com.kingsrook.qqq.backend.core.utils.JsonUtils;

View File

@ -127,7 +127,7 @@ public class StreamedETLWithFrontendProcess
.withInputData(new QFunctionInputMetaData()
.withField(new QFieldMetaData(FIELD_SOURCE_TABLE, QFieldType.STRING).withDefaultValue(defaultFieldValues.get(FIELD_SOURCE_TABLE)))
.withField(new QFieldMetaData(FIELD_DESTINATION_TABLE, QFieldType.STRING).withDefaultValue(defaultFieldValues.get(FIELD_DESTINATION_TABLE)))
.withField(new QFieldMetaData(FIELD_SUPPORTS_FULL_VALIDATION, QFieldType.BOOLEAN).withDefaultValue(defaultFieldValues.getOrDefault(FIELD_SUPPORTS_FULL_VALIDATION, false)))
.withField(new QFieldMetaData(FIELD_SUPPORTS_FULL_VALIDATION, QFieldType.BOOLEAN).withDefaultValue(defaultFieldValues.getOrDefault(FIELD_SUPPORTS_FULL_VALIDATION, true)))
.withField(new QFieldMetaData(FIELD_DEFAULT_QUERY_FILTER, QFieldType.STRING).withDefaultValue(defaultFieldValues.get(FIELD_DEFAULT_QUERY_FILTER)))
.withField(new QFieldMetaData(FIELD_EXTRACT_CODE, QFieldType.STRING).withDefaultValue(new QCodeReference(extractStepClass)))
.withField(new QFieldMetaData(FIELD_TRANSFORM_CODE, QFieldType.STRING).withDefaultValue(new QCodeReference(transformStepClass)))

View File

@ -24,6 +24,7 @@ package com.kingsrook.qqq.backend.core.processes.implementations.etl.streamedwit
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@ -246,7 +247,7 @@ public class StreamedETLWithFrontendProcessTest
///////////////////////////////////////////////////////////////////////////
// run the process - breaking on the first instance of the Review screen //
///////////////////////////////////////////////////////////////////////////
RunProcessOutput runProcessOutput = runProcess(instance, process, Map.of(StreamedETLWithFrontendProcess.FIELD_SUPPORTS_FULL_VALIDATION, true), new Callback(), RunProcessInput.FrontendStepBehavior.BREAK);
RunProcessOutput runProcessOutput = runProcess(instance, process, Collections.emptyMap(), new Callback(), RunProcessInput.FrontendStepBehavior.BREAK);
assertThat(runProcessOutput.getProcessState().getNextStepName()).hasValue("review");
////////////////////////////////////////////////////////

View File

@ -72,7 +72,6 @@ import com.kingsrook.qqq.backend.module.filesystem.local.model.metadata.Filesyst
import com.kingsrook.qqq.backend.module.rdbms.model.metadata.RDBMSBackendMetaData;
import com.kingsrook.sampleapp.dashboard.widgets.PersonsByCreateDateBarChart;
import com.kingsrook.sampleapp.processes.clonepeople.ClonePeopleTransformStep;
import io.github.cdimascio.dotenv.Dotenv;
/*******************************************************************************
@ -445,7 +444,6 @@ public class SampleMetaDataProvider
Map<String, Serializable> values = new HashMap<>();
values.put(StreamedETLWithFrontendProcess.FIELD_SOURCE_TABLE, TABLE_NAME_PERSON);
values.put(StreamedETLWithFrontendProcess.FIELD_DESTINATION_TABLE, TABLE_NAME_PERSON);
values.put(StreamedETLWithFrontendProcess.FIELD_SUPPORTS_FULL_VALIDATION, true);
values.put(StreamedETLWithFrontendProcess.FIELD_PREVIEW_MESSAGE, "This is a preview of what the clones will look like.");
QProcessMetaData process = StreamedETLWithFrontendProcess.defineProcessMetaData(