I am facing problem while running graph with clover GUI version 1.8.2, i was able to run the graph successfully with clover gui version 1.8.1. below I have the trace. please let me know if I am missing something.
import java.util.*;
import org.jetel.data.*;
import org.jetel.graph.*;
import org.jetel.metadata.*;
import org.jetel.component.*;
import org.jetel.exception.*;
import org.jetel.data.sequence.*;
public class TransformTransformREFORMAT0 extends DataRecordTransform {
// CONSTANTS definition of input fields
private final static int IN0_NOCLI = 0;
private final static int IN0_MASTER_ID = 1;
private final static int IN0_VALUE = 2;
private final static int IN0_BLOB = 3;
private final static int IN0_CASINO_ID = 4;
// CONSTANTS definition of output fields
private final static int OUT0_NOCLI = 0;
private final static int OUT0_MASTER_ID = 1;
private final static int OUT0_VALUE = 2;
private final static int OUT0_BLOB = 3;
private final static int OUT0_CASINO_ID = 4;
private final static int OUT0_TEST = 5;
private final static int OUT0_TEST1 = 6;
/**
* Initializes reformat class/function. This method is called only once at then
* beginning of transformation process. Any object allocation/initialization should
* happen here.
*/
public boolean init() throws ComponentNotReadyException {
return true;
}
/**
* Performs reformat of source records to target records.
* This method is called as one step in transforming flow of
* records.
*/
public boolean transform(DataRecord inputRecords, DataRecord outputRecords) throws TransformException {
try {
// user’s code STARTs from here !
((IntegerDataField)outputRecords[0].getField(OUT0_NOCLI)).setValue( (((IntegerDataField)inputRecords[0].getField(IN0_NOCLI)).getInt()));
((IntegerDataField)outputRecords[0].getField(OUT0_MASTER_ID)).setValue( (((IntegerDataField)inputRecords[0].getField(IN0_MASTER_ID)).getInt()));
(outputRecords[0].getField(OUT0_VALUE)).setValue( (inputRecords[0].getField(IN0_VALUE).toString()));
((ByteDataField)outputRecords[0].getField(OUT0_BLOB)).setValue( (((ByteDataField)inputRecords[0].getField(IN0_BLOB)).getValue()));
((IntegerDataField)outputRecords[0].getField(OUT0_CASINO_ID)).setValue( (((IntegerDataField)inputRecords[0].getField(IN0_CASINO_ID)).getInt()));
((IntegerDataField)outputRecords[0].getField(OUT0_TEST)).setValue( (((IntegerDataField)inputRecords[0].getField(IN0_NOCLI)).getInt()));
(outputRecords[0].getField(OUT0_TEST1)).setValue( (inputRecords[0].getField(IN0_VALUE).toString()));
// user’s code ENDs here !
} catch(Exception e) {
throw new TransformException("Error in extern transformation class " + TransformTransformREFORMAT0.class.getName() + ": " + e.getMessage());
}
return true;
}
/**
* Method called at the end of transformation process. No more
* records will be processed. The implementing class should release
* any resource reserved during init() or runtime at this point.
*/
public void finished() {
}
}
//end of transform class
ERROR [WatchDog] - REFORMAT0 …FAILED !
Transformation code is not compilable.
reason: Error(s) when compiling: C:\DOCUME~1\sairams\LOCALS~1\Temp\TransformTransformREFORMAT0.java
at org.jetel.component.RecordTransformFactory.loadClassDynamic(RecordTransformFactory.java:205)
at org.jetel.component.RecordTransformFactory.loadClassDynamic(RecordTransformFactory.java:185)
at org.jetel.component.RecordTransformFactory.createTransform(RecordTransformFactory.java:84)
at org.jetel.component.Reformat.init(Reformat.java:236)
at org.jetel.graph.Phase.init(Phase.java:161)
at org.jetel.graph.runtime.WatchDog.executePhase(WatchDog.java:562)
at org.jetel.graph.runtime.WatchDog.run(WatchDog.java:164)
i tried with a simple graph, it does not have much logic. just i have used a DBInputTable → Reformat → DBOutput. I have used the new transformation feature, which is working fine with GUI 1.8.1 but not with GUi 1.8.2. In reformat(transform) all is one to one mapping of fields. Is there a bug with clover GUI 1.8.2?