Merge pull request #9071 from ShvaykaD/feature/math-node-default-config-update
Updated default config for math node
This commit is contained in:
commit
cfe2148a0b
@ -32,9 +32,10 @@ public class TbMathNodeConfiguration implements NodeConfiguration<TbMathNodeConf
|
||||
@Override
|
||||
public TbMathNodeConfiguration defaultConfiguration() {
|
||||
TbMathNodeConfiguration configuration = new TbMathNodeConfiguration();
|
||||
configuration.setOperation(TbRuleNodeMathFunctionType.ADD);
|
||||
configuration.setArguments(Arrays.asList(new TbMathArgument("x", TbMathArgumentType.CONSTANT, "2"), new TbMathArgument("y", TbMathArgumentType.CONSTANT, "2")));
|
||||
configuration.setResult(new TbMathResult(TbMathArgumentType.MESSAGE_BODY, "result", 2, false, false, null));
|
||||
configuration.setOperation(TbRuleNodeMathFunctionType.CUSTOM);
|
||||
configuration.setCustomFunction("(t - 32) / 1.8");
|
||||
configuration.setArguments(List.of(new TbMathArgument("t", TbMathArgumentType.MESSAGE_BODY, "temperature")));
|
||||
configuration.setResult(new TbMathResult(TbMathArgumentType.MESSAGE_BODY, "temperatureCelsius", 2, false, false, null));
|
||||
return configuration;
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user