Scripting module - bluesoft-rnd/aperte-workflow-core GitHub Wiki

Module manages installed scripting engine implementations, provided as plugins. Other modules, e.g. widgets, can access installed engines and allow to run scripts on them.

Available engines

Aperte Workflow currently provides support for Groovy and Drools languages. Plugins are available in separate project: aperte-workflow-plugins.

Custom engines

Another language processor can be added by implementing interface:

package org.aperteworkflow.scripting;

public interface ScriptProcessor {

    Map<String, Object> process(Map<String, Object> vars, InputStream script) throws Exception;

    void validate(InputStream script) throws ScriptValidationException;
}

Implementation of the interface should be bundled with necessary dependencies. OSGi bundle /META-INF/MANIFEST.MF file should contain Script-Processor-Classes instruction with qualified names of classes implementing ScriptProcessor interface, for example:

Script-Processor-Classes: org.aperteworkflow.contrib.script.groovy.GroovyScriptProcessor