File tree 6 files changed +32
-1
lines changed
java/com/walmartlabs/concord/it/runtime/v2
resources/com/walmartlabs/concord/it/runtime/v2/scriptJs
src/main/java/com/walmartlabs/concord/runtime/v2/runner/script
6 files changed +32
-1
lines changed Original file line number Diff line number Diff line change @@ -79,6 +79,22 @@ public void testGroovyScripts() throws Exception {
79
79
proc .assertLog (".*log from script: 123.*" );
80
80
}
81
81
82
+ /**
83
+ * Js script execution.
84
+ */
85
+ @ Test
86
+ public void testJsScripts () throws Exception {
87
+ Payload payload = new Payload ()
88
+ .archive (resource ("scriptJs" ))
89
+ .arg ("arg" , "12345" )
90
+ .arg ("pattern" , ".234." );
91
+
92
+ ConcordProcess proc = concord .processes ().start (payload );
93
+ expectStatus (proc , ProcessEntry .StatusEnum .FINISHED );
94
+
95
+ proc .assertLog (".*matches: true.*" );
96
+ }
97
+
82
98
/**
83
99
* Test the process metadata.
84
100
*/
Original file line number Diff line number Diff line change
1
+ configuration :
2
+ runtime : concord-v2
3
+
4
+ flows :
5
+ default :
6
+ - script : js
7
+ body : |
8
+ print("matches: " + arg.matches(pattern));
Original file line number Diff line number Diff line change 242
242
<transformer implementation =" org.apache.maven.plugins.shade.resource.AppendingTransformer" >
243
243
<resource >META-INF/sisu/javax.inject.Named</resource >
244
244
</transformer >
245
+ <transformer implementation =" org.apache.maven.plugins.shade.resource.AppendingTransformer" >
246
+ <resource >META-INF/services/com.oracle.truffle.api.TruffleLanguage$Provider</resource >
247
+ </transformer >
245
248
<transformer implementation =" org.apache.maven.plugins.shade.resource.ManifestResourceTransformer" >
246
249
<mainClass >com.walmartlabs.concord.runner.Main</mainClass >
247
250
</transformer >
Original file line number Diff line number Diff line change 290
290
<transformer implementation =" org.apache.maven.plugins.shade.resource.AppendingTransformer" >
291
291
<resource >META-INF/sisu/javax.inject.Named</resource >
292
292
</transformer >
293
+ <transformer implementation =" org.apache.maven.plugins.shade.resource.AppendingTransformer" >
294
+ <resource >META-INF/services/com.oracle.truffle.api.TruffleLanguage$Provider</resource >
295
+ </transformer >
293
296
<transformer implementation =" org.apache.maven.plugins.shade.resource.ManifestResourceTransformer" >
294
297
<mainClass >com.walmartlabs.concord.runtime.v2.runner.Main</mainClass >
295
298
</transformer >
Original file line number Diff line number Diff line change @@ -125,6 +125,7 @@ private ScriptEngine getEngine(String language) {
125
125
ScriptEngine engine = GraalJSScriptEngine .create (Engine .newBuilder ()
126
126
.allowExperimentalOptions (true )
127
127
.option ("engine.WarnInterpreterOnly" , "false" )
128
+ .option ("js.nashorn-compat" , "true" )
128
129
.build (),
129
130
org .graalvm .polyglot .Context .newBuilder ("js" )
130
131
.allowHostAccess (access ));
Original file line number Diff line number Diff line change 20
20
<aopalliance .version>1.0</aopalliance .version>
21
21
<aws .version>1.11.475</aws .version>
22
22
<bouncycastle .version>1.67</bouncycastle .version>
23
- <bpm .version>1.0.0 </bpm .version>
23
+ <bpm .version>1.0.1 </bpm .version>
24
24
<commons .beanutils.version>1.9.4</commons .beanutils.version>
25
25
<commons .collections.version>3.2.2</commons .collections.version>
26
26
<commons .compress.version>1.21</commons .compress.version>
You can’t perform that action at this time.
0 commit comments