Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X
Hi together,
we would like send some elements as string to an external .exe Tool, and want to get the result as a return value back in acl. So we need a interaction between acl and the external exe.
Do you have an idea how we can do this via ACL?
We know the "sh" command, which starts the exe, but we cannot get a return value from this.
Best regards
Solved! Go to Solution.
I see three other options: system(), javascript() and java_static().
Here are some untested example ideas for each:
system("my.exe arg1 arg2")
javascript('runCommand("my.exe", "arg1", "arg2")')
java_static("MyClass", "MyMethod", "args")
Java works because it is built in to Arbortext. Javascript works because Arbortext uses Rhino, which is itself spawned from Java.
The Java method should use Runtime.getRuntime().exec("my.exe arg1 arg2") which returns a Process object from which you can gather the output and return values.
I see three other options: system(), javascript() and java_static().
Here are some untested example ideas for each:
system("my.exe arg1 arg2")
javascript('runCommand("my.exe", "arg1", "arg2")')
java_static("MyClass", "MyMethod", "args")
Java works because it is built in to Arbortext. Javascript works because Arbortext uses Rhino, which is itself spawned from Java.
The Java method should use Runtime.getRuntime().exec("my.exe arg1 arg2") which returns a Process object from which you can gather the output and return values.
Hi GarethOakes,
thanks for your help. After many tests with java (unfortunately not our preferred programming language) we were successfull with using java_static.
We could get a return value back from java to acl. Now we must implement our operations with C# and call the exe via Java and path is through ACL 🙂
Thank you.
Greetings from germany
Yes, there is no direct binding to the CLR available from Arbortext, so any heavy lifting must be done via Java. The only Microsoft bindings are for JScript and VBScript which allow access to Windows COM objects. If you don't wish to use Java then you can use Javascript (Rhino interpreter) which runs inside the JRE.
FWIW, our standard approach these days is to use a minimal amount of ACL and code all business logic inside Java classes.