jBPM distribution 6.1.0.Beta4

org.jbpm.process.core.impl
Class DataTransformerRegistry

java.lang.Object
  extended by org.jbpm.process.core.impl.DataTransformerRegistry

public class DataTransformerRegistry
extends Object

Registry for all available on runtime DataTransformers for performing data input and output transformation. Be default it discovers and registers all available JSR 223 compliant scripting languages wrapped with JavaScriptingDataTransformer.
Discovery is based on ScriptEngineManager.getEngineFactories() thus any scripting engines should follow instructions for Java Scripting.
Each Java Scripting engine will get dedicated instance of JavaScriptingDataTransformer which will be registered under one or more key in the registry. The key will be built as follows>

For example default JavaScript scripting engine will be registered under following keys: when defining the language for transformation that of data input/output the complete key should be provided. <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 under http://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 with register method.

See Also:
JavaScriptingDataTransformer

Constructor Summary
protected DataTransformerRegistry()
           
 
Method Summary
 DataTransformer find(String languge)
           
static DataTransformerRegistry get()
           
 void register(String language, DataTransformer transformer)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataTransformerRegistry

protected DataTransformerRegistry()
Method Detail

get

public static DataTransformerRegistry get()

register

public void register(String language,
                     DataTransformer transformer)

find

public DataTransformer find(String languge)

jBPM distribution 6.1.0.Beta4

Copyright © 2001-2014 JBoss by Red Hat. All Rights Reserved.