Hi Wmusers! Just wanted to ask about a problem I hit when upgrading an IS server from 4.6 to Fabric 7.
Some really old Java services use the old IDataHashCursor cursor class (which is deprecated but provided for backward compatibility.)
The problem in that, on Fabric 7, the IDataHashCursor.first(object_key) method seems to wrongly move the cursor to the first available IData object in the pipeline if ‘object_key’ IData object is not in the pipeline. However, on 4.6, the cursor isn’t repositioned.
The following code illustrates this – it picks 2 string values from the pipeline and outputs them back out:
IDataHashCursor pipelineCursor = pipeline.getHashCursor();
pipelineCursor.first( "A" );
String A = (String) pipelineCursor.getValue();
pipelineCursor.first( "B" );
String B= (String) pipelineCursor.getValue();
pipelineCursor.destroy();
// pipeline
IDataHashCursor pipelineCursor_1 = pipeline.getHashCursor();
pipelineCursor_1.last();
pipelineCursor_1.insertAfter( "extracted_A", A);
pipelineCursor_1.destroy();
pipelineCursor_1.insertAfter( "extracted_B", B);
pipelineCursor_1.destroy();
When the service is run in Developer with these inputs:
A = 1
B = (nothing)
(Do not click on "Include empty values for string types" )
…The output in Developer 4.6 is as expected:
extracted_A = 1
extracted_B = null
…However, the output in Developer 6.5/Fabric 7 is:
extracted_A = 1
extracted_B = 1
Similar behavior occurs if the ‘B’ input was set and the ‘A’ value was absent.
Has anyone dealt with this before?