Skip to content

Commit 0dc641d

Browse files
committed
[WIP] adjust pom.xml
Signed-off-by: Matheus Cruz <matheuscruz.dev@gmail.com>
1 parent aff74be commit 0dc641d

File tree

3 files changed

+19
-9
lines changed

3 files changed

+19
-9
lines changed

impl/core/pom.xml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,12 @@
2727
<dependency>
2828
<groupId>org.graalvm.js</groupId>
2929
<artifactId>js</artifactId>
30-
<version>24.1.1</version>
31-
</dependency>
32-
<dependency>
33-
<groupId>org.graalvm.python</groupId>
34-
<artifactId>python</artifactId>
35-
<version>24.1.1</version>
30+
<type>pom</type>
3631
</dependency>
3732
<dependency>
3833
<groupId>org.graalvm.sdk</groupId>
3934
<artifactId>graal-sdk</artifactId>
40-
<version>24.1.1</version>
35+
<type>pom</type>
4136
</dependency>
4237
</dependencies>
4338
</project>

impl/core/src/main/java/io/serverlessworkflow/impl/executors/RunScriptExecutor.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ public String getLang() {
5757

5858
public static boolean isSupported(String lang) {
5959
for (ScriptLanguage l : ScriptLanguage.values()) {
60+
System.out.println("received lang: " + lang + ", checking against: " + l.getLang());
6061
if (l.getLang().equalsIgnoreCase(lang)) {
6162
return true;
6263
}
@@ -80,12 +81,13 @@ public void init(RunScript taskConfiguration, WorkflowDefinition definition) {
8081
boolean isAwait = taskConfiguration.isAwait();
8182

8283
WorkflowApplication application = definition.application();
83-
if (language == null || ScriptLanguage.isSupported(language)) {
84+
if (language == null || !ScriptLanguage.isSupported(language)) {
8485
throw new IllegalArgumentException(
8586
"Unsupported script language: "
8687
+ language
8788
+ ". Supported languages are: "
88-
+ Arrays.toString(ScriptLanguage.values()));
89+
+ Arrays.toString(
90+
Arrays.stream(ScriptLanguage.values()).map(ScriptLanguage::getLang).toArray()));
8991
}
9092

9193
fnExecutor =

impl/pom.xml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
<version.jakarta.ws.rs>4.0.0</version.jakarta.ws.rs>
1515
<version.net.thisptr>1.6.0</version.net.thisptr>
1616
<version.org.glassfish.jersey>3.1.11</version.org.glassfish.jersey>
17+
<version.org.graalvm.sdk>24.1.1</version.org.graalvm.sdk>
1718
</properties>
1819
<dependencyManagement>
1920
<dependencies>
@@ -92,6 +93,18 @@
9293
<artifactId>serverlessworkflow-impl-openapi</artifactId>
9394
<version>${project.version}</version>
9495
</dependency>
96+
<dependency>
97+
<groupId>org.graalvm.sdk</groupId>
98+
<artifactId>graal-sdk</artifactId>
99+
<version>${version.org.graalvm.sdk}</version>
100+
<type>pom</type>
101+
</dependency>
102+
<dependency>
103+
<groupId>org.graalvm.js</groupId>
104+
<artifactId>js</artifactId>
105+
<version>${version.org.graalvm.sdk}</version>
106+
<type>pom</type>
107+
</dependency>
95108
<dependency>
96109
<groupId>net.thisptr</groupId>
97110
<artifactId>jackson-jq</artifactId>

0 commit comments

Comments
 (0)