4 Replies Latest reply on Apr 4, 2014 1:38 PM by Maciej Swiderski

    Service Task: Assign data object parameter directly to task input variable

    Marc J Novice

      Hey guys,


      lets assume that I've created a data object A with parameters A.valA and A.valB via the KIE WB Data Modeler. In addition, I did create a custom service task with an DataInputSet variable named in_task_variable and a DataOutputSet variable out_task_variable. The sample process simply consists of this task. Object A is correctly integrated into the process.


      I'd like to know whether it is possible to assign a data object parameter directly to a task input variable. I tried the following within the editor for data assignments of the service task:

      From Object: in_task_variable          Assignment Type: is equal to           To Value: ((com.playground.a)kcontext.getVariable("a")).getValA();


      I also tried to achieve the direct mapping via a "On Entry Action" like this; kcontext.setVariable("in_task_variable", ((com.playground.A)kcontext.getVariable("a")).getValA());


      Is there any possibility to achieve a direct assignment?