- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Executable-Class - Keine Ausgabe
Ich habe eine Executable-Class erstellt, in eine Library gepackt und versuche nun die Klasse per Beanshell
mittels:
#! executable-class
de.espirit.firstspirit.opt.executables.MyExecutable;
aufzurufen. Beim Aufruf scheint jedoch nichts zu passieren.
public class MyExecutable implements Executable {
public Object execute(final Map<String, Object> params) throws ExecutionException {
// TODO Auto-generated method stub
return execute(params, new PrintWriter(System.out, true), new PrintWriter(System.err, true));
}
public Object execute(final Map<String, Object> params, final Writer out, final Writer err)throws ExecutionException {
final Object scriptContext = params.get("context");
if(scriptContext instanceof GuiScriptContextImpl){
final GuiScriptContextImpl context = (GuiScriptContextImpl) scriptContext;
context.logError("ERROR");
return true;
}
return false;
}
}
Mรผsste doch formal alles korrekt sein?
- Labels:
-
Developers
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Auch hier gilt das ";" am Ende weglassen und dann sollte es auch schon funktionieren.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Punkt 1)
GuiScriptContextImpl ist keine API und sollte NICHT verwendet werden. Wenn dann, GuiScriptContext
Wo wird das Skript aufgerufen?
Wie sieht die Moduldefintion aus?
Welche FS-Version?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Das Skript wird in der Vorlagenverwaltung aufgerufen und die Moduldefinition sieht wie folgt aus:
<!DOCTYPE module SYSTEM "../lib/module.dtd">
<module>
<name>Executable</name>
<version>1.1</version>
<description>Executable for FirstSpirit</description>
<vendor>Marc Friedemann</vendor>
<components>
<library>
<name>Executable for FirstSpirit</name>
<version>1.1</version>
<description>Executable for FirstSpirit</description>
<resources>
<resource>lib/MyExecutable.jar</resource>
</resources>
</library>
</components>
</module>
FS-Version ist: 4.2.437.44763
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Auch hier gilt das ";" am Ende weglassen und dann sollte es auch schon funktionieren.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
So funktioniert es, vielen Dank!

