Skip to content

Commit

Permalink
Add all inputs for external operation
Browse files Browse the repository at this point in the history
  • Loading branch information
dumitral committed Aug 6, 2019
1 parent d391b89 commit 4a4906e
Showing 1 changed file with 14 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,20 @@ public CloudSlangSequentialExecutionParametersProviderImpl(
@Override
public Object[] getExecutionParameters() {
Map<String, Value> execParams = new HashMap<>();
for (SeqStep step : seqSteps) {
String args = step.getArgs();
if (StringUtils.startsWith(args, SEQUENTIAL_PARAMETER)) {
String paramName = substring(args, SEQUENTIAL_PARAMETER.length(), args.length() - 1)
.replaceAll("^\"|\"$", "");
Value value = currentContext.get(paramName);
if (value != null) {
execParams.put(paramName, value);

if (external) {
// External seq operation doesn't require step args filtering since all the inputs are external
execParams = currentContext;
} else {
for (SeqStep step : seqSteps) {
String args = step.getArgs();
if (StringUtils.startsWith(args, SEQUENTIAL_PARAMETER)) {
String paramName = substring(args, SEQUENTIAL_PARAMETER.length(), args.length() - 1)
.replaceAll("^\"|\"$", "");
Value value = currentContext.get(paramName);
if (value != null) {
execParams.put(paramName, value);
}
}
}
}
Expand Down

0 comments on commit 4a4906e

Please sign in to comment.