Package org.jbpm.process.core.impl
Class DataTransformerRegistry
- java.lang.Object
-
- org.jbpm.process.core.impl.DataTransformerRegistry
-
public class DataTransformerRegistry extends Object
Registry for all available on runtimeDataTransformer
s for performing data input and output transformation. Be default it discovers and registers all available JSR 223 compliant scripting languages wrapped withJavaScriptingDataTransformer
.
Discovery is based onScriptEngineManager.getEngineFactories()
thus any scripting engines should follow instructions for Java Scripting.
Each Java Scripting engine will get dedicated instance ofJavaScriptingDataTransformer
which will be registered under one or more key in the registry. The key will be built as follows>- constant prefix for URI like syntax : http://www.java.com/
- names provided by given ScriptEngineFactory - JavaScript, js,....
- http://www.java.com/js
- http://www.java.com/rhino
- http://www.java.com/JavaScript
- http://www.java.com/javascript
- http://www.java.com/ECMAScript
- http://www.java.com/ecmascript
<dataInputAssociation>
<sourceRef>s</sourceRef>
<targetRef>_2_param</targetRef>
<transformation language="http://www.java.com/javascript">s.toUpperCase()</transformation>
</dataInputAssociation>
Besides JSR 223 scripting engine, there is MVEL based transformer available out of the box that is registered underhttp://www.mvel.org/2.0
key.
Custom implementations can be provided and if they are compliant with JSR 223 then follows above registration approach otherwise they need to be registered manually withregister
method.- See Also:
JavaScriptingDataTransformer
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
DataTransformerRegistry()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description org.kie.api.runtime.process.DataTransformer
find(String languge)
static DataTransformerRegistry
get()
void
register(String language, org.kie.api.runtime.process.DataTransformer transformer)
-
-
-
Method Detail
-
get
public static DataTransformerRegistry get()
-
register
public void register(String language, org.kie.api.runtime.process.DataTransformer transformer)
-
find
public org.kie.api.runtime.process.DataTransformer find(String languge)
-
-