File tree Expand file tree Collapse file tree 3 files changed +37
-0
lines changed
runtime/v2/runner-test/src/test
java/com/walmartlabs/concord/runtime/v2/runner
resources/com/walmartlabs/concord/runtime/v2/runner/prefixedFunctions Expand file tree Collapse file tree 3 files changed +37
-0
lines changed Original file line number Diff line number Diff line change @@ -1746,6 +1746,20 @@ public void flowCallOutExpressionCompat() throws Exception {
17461746 assertLog (runtime .allLogs (), ".*" + Pattern .quote ("out as map with loop: [abc_0, abc_1]" ) + ".*" );
17471747 }
17481748
1749+ @ Test
1750+ public void prefixedFunctionsInExpressions () throws Exception {
1751+ deploy ("prefixedFunctions" );
1752+
1753+ save (ProcessConfiguration .builder ()
1754+ .putArguments ("name" , "world" )
1755+ .build ());
1756+
1757+ run ();
1758+
1759+ assertLog (runtime .allLogs (), ".*Hi, world!.*" );
1760+ assertLog (runtime .allLogs (), ".*Hello, world!.*" );
1761+ }
1762+
17491763 private void deploy (String name ) throws URISyntaxException , IOException {
17501764 runtime .deploy (name );
17511765 }
Original file line number Diff line number Diff line change 1+ package com .walmartlabs .concord .runtime .v2 .runner .functions ;
2+
3+ import com .walmartlabs .concord .runtime .v2 .sdk .ELFunction ;
4+
5+ import javax .inject .Named ;
6+
7+ @ Named
8+ public class TestFunction {
9+
10+ @ ELFunction ("testGreet" )
11+ public static String regularGreet (String name ) {
12+ return "Hi, " + name + "!" ;
13+ }
14+
15+ @ ELFunction ("testFunction:greet" )
16+ public static String prefixedGreet (String name ) {
17+ return "Hello, " + name + "!" ;
18+ }
19+ }
Original file line number Diff line number Diff line change 1+ flows :
2+ default :
3+ - log : " ${testGreet(name)}"
4+ - log : " ${testFunction:greet(name)}"
You can’t perform that action at this time.
0 commit comments