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 and Description
    --- | ---
    `Object` | `compile(String expression, Map<String,Object> parameters)` Compiles given expression into reusable unit.
    `Object` | `transform(Object expression, Map<String,Object> parameters)` Transforms the given expression object (might be compiled expression) using `parameters` as contextual information (aka bindings) used during evaluation of the expression.

- - ### Method Detail

    - #### compile

          Object compile(String expression,
                         Map<String,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 expression
        `parameters` - parameters e.g. imports defined in the process
      Returns:
        compiled expression instance or same as given as argument expression
      Throws:
        `RuntimeException` - in case of unexpected errors during compilation

    - #### transform

          Object transform(Object expression,
                           Map<String,Object> parameters)

      Transforms the given expression object (might be compiled expression) using `parameters` as contextual information (aka bindings) used during evaluation of the expression.
      Parameters:
        `expression` - expression to evaluate
        `parameters` - binding parameters
      Returns:
        result of the evaluation
      Throws:
        `RuntimeException` - in case of unexpected errors during evaluation of the expression

Copyright © 2001–2017 JBoss by Red Hat. All rights reserved.