mirror of
https://github.com/Kingsrook/qqq.git
synced 2025-07-18 13:10:44 +00:00
Flow table name down
This commit is contained in:
@ -117,9 +117,19 @@ public class RunRecordScriptLoadStep extends AbstractLoadStep implements Process
|
|||||||
Integer scriptId = runBackendStepInput.getValueInteger("scriptId");
|
Integer scriptId = runBackendStepInput.getValueInteger("scriptId");
|
||||||
StoreScriptLogAndScriptLogLineExecutionLogger scriptLogger = new StoreScriptLogAndScriptLogLineExecutionLogger(null, null); // downstream these will get set!
|
StoreScriptLogAndScriptLogLineExecutionLogger scriptLogger = new StoreScriptLogAndScriptLogLineExecutionLogger(null, null); // downstream these will get set!
|
||||||
|
|
||||||
|
GetInput getInput = new GetInput();
|
||||||
|
getInput.setTableName(Script.TABLE_NAME);
|
||||||
|
getInput.setPrimaryKey(scriptId);
|
||||||
|
GetOutput getOutput = new GetAction().execute(getInput);
|
||||||
|
if(getOutput.getRecord() == null)
|
||||||
|
{
|
||||||
|
throw (new QException("Could not find script by id: " + scriptId));
|
||||||
|
}
|
||||||
|
|
||||||
RunAdHocRecordScriptInput input = new RunAdHocRecordScriptInput();
|
RunAdHocRecordScriptInput input = new RunAdHocRecordScriptInput();
|
||||||
input.setRecordList(runBackendStepInput.getRecords());
|
input.setRecordList(runBackendStepInput.getRecords());
|
||||||
input.setCodeReference(new AdHocScriptCodeReference().withScriptId(scriptId));
|
input.setCodeReference(new AdHocScriptCodeReference().withScriptId(scriptId));
|
||||||
|
input.setTableName(getOutput.getRecord().getValueString("tableName"));
|
||||||
input.setLogger(scriptLogger);
|
input.setLogger(scriptLogger);
|
||||||
RunAdHocRecordScriptOutput output = new RunAdHocRecordScriptOutput();
|
RunAdHocRecordScriptOutput output = new RunAdHocRecordScriptOutput();
|
||||||
Exception caughtException = null;
|
Exception caughtException = null;
|
||||||
|
@ -117,6 +117,7 @@ public class TestScriptProcessStep implements BackendStep
|
|||||||
RunAdHocRecordScriptInput runAdHocRecordScriptInput = new RunAdHocRecordScriptInput();
|
RunAdHocRecordScriptInput runAdHocRecordScriptInput = new RunAdHocRecordScriptInput();
|
||||||
runAdHocRecordScriptInput.setRecordList(queryOutput.getRecords());
|
runAdHocRecordScriptInput.setRecordList(queryOutput.getRecords());
|
||||||
runAdHocRecordScriptInput.setLogger(executionLogger);
|
runAdHocRecordScriptInput.setLogger(executionLogger);
|
||||||
|
runAdHocRecordScriptInput.setTableName(tableName);
|
||||||
runAdHocRecordScriptInput.setCodeReference(new AdHocScriptCodeReference().withScriptRevisionRecord(scriptRevision.toQRecord()));
|
runAdHocRecordScriptInput.setCodeReference(new AdHocScriptCodeReference().withScriptRevisionRecord(scriptRevision.toQRecord()));
|
||||||
RunAdHocRecordScriptOutput runAdHocRecordScriptOutput = new RunAdHocRecordScriptOutput();
|
RunAdHocRecordScriptOutput runAdHocRecordScriptOutput = new RunAdHocRecordScriptOutput();
|
||||||
new RunAdHocRecordScriptAction().run(runAdHocRecordScriptInput, runAdHocRecordScriptOutput);
|
new RunAdHocRecordScriptAction().run(runAdHocRecordScriptInput, runAdHocRecordScriptOutput);
|
||||||
|
Reference in New Issue
Block a user