Package org.kie.api.runtime.process
Interface DataTransformer
-
public interface DataTransformer
Data transformation capabilities used by data input and data output transformation as part of BPMN2 process definition. It allows plugable implementations.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.Object
compile(java.lang.String expression, java.util.Map<java.lang.String,java.lang.Object> parameters)
Compiles given expression into reusable unit.java.lang.Object
transform(java.lang.Object expression, java.util.Map<java.lang.String,java.lang.Object> parameters)
Transforms the given expression object (might be compiled expression) usingparameters
as contextual information (aka bindings) used during evaluation of the expression.
-
-
-
Method Detail
-
compile
java.lang.Object compile(java.lang.String expression, java.util.Map<java.lang.String,java.lang.Object> parameters)
Compiles given expression into reusable unit. This is optional operation and in case it's not supported by given transformed it should return the same expression that was given in the input. If compilation is supported a compiled instance of the expression should be returned.- Parameters:
expression
- language specific expressionparameters
- parameters e.g. imports defined in the process- Returns:
- compiled expression instance or same as given as argument expression
- Throws:
java.lang.RuntimeException
- in case of unexpected errors during compilation
-
transform
java.lang.Object transform(java.lang.Object expression, java.util.Map<java.lang.String,java.lang.Object> parameters)
Transforms the given expression object (might be compiled expression) usingparameters
as contextual information (aka bindings) used during evaluation of the expression.- Parameters:
expression
- expression to evaluateparameters
- binding parameters- Returns:
- result of the evaluation
- Throws:
java.lang.RuntimeException
- in case of unexpected errors during evaluation of the expression
-
-