Skip to main content

I have a FeatureReader for WFS. Because I want it to work with any WFS source I have parameterised the Dataset and "Feature types to read" fields and set the output to Single Output port.This means that I have to use the Generic output port.

Further down the workspace I have some transformers that do logging. I have a ListBuilder followed by a ListElementCounter, so I can log the number of records returned by the WFS service. I also have an UpdateDetector with the same arrangement.

Before I started using the generic output port, everything was OK. But since I have used the Generic port, some ListElementCounters are showing problems. (The one connected to the WFS reader and also the one connected to the Unchanged port of the UpdateDetector. Others are OK.) The ListAttribute fields are showing up as red and they don't seem to be able to read the _list{} attribute that should be supplied by the ListBuilder.

If I run the workspace, it seems to still work, but of course I get a warning about invalid parameters.

I'm guessing the problem might be that since I stopped using a strongly-typed reader the ListBuilder doesn't know what its input is and whether it can be turned into a list. Is there anything I can do to get rid of the red fields?

Hi @rohan, FME Workbench won't automatically expose attribute names under the <Generic> port of the FeatureReader, since the schema of unknown feature type cannot be detected when creating the workspace. In the situation, the ListBuilder too doesn't expose list name and therefore it makes the List Attribute field in the following ListElementCounter red. I think it's the reason for the symptom you have encountered.

To resolve the symptom, try exposing one or more known attribute name manually with the Attributes to Expose parameter in the FeatureReader (see Output / Attribute and Geometry Handling / <Generic> Port section in the parameters dialog).


Hi @rohan, FME Workbench won't automatically expose attribute names under the <Generic> port of the FeatureReader, since the schema of unknown feature type cannot be detected when creating the workspace. In the situation, the ListBuilder too doesn't expose list name and therefore it makes the List Attribute field in the following ListElementCounter red. I think it's the reason for the symptom you have encountered.

To resolve the symptom, try exposing one or more known attribute name manually with the Attributes to Expose parameter in the FeatureReader (see Output / Attribute and Geometry Handling / <Generic> Port section in the parameters dialog).

Here. Nesting of the parameter groups here might be too deep... @DanAtSafe, how do you think?

 


That is correct, the generic port does not automatically expose the attributes and manually entering them usually solves this kind of issues.


Thanks for the suggestion. I think it has solved my problem.


Reply