OutSystems 

  
Hi there,

I have added a web reference to my eSpace. The web service in question uses restricted string types to model enumerations:

<simpleType name="MyEnumeration"><restriction base="Alpha"><restriction base="Beta"><restriction base="Gamma"></restriction></simpleType>

However, when importing the web service, any attribute that refers to MyEnumeration is given the type 'Text', and MyEnumeration does not appear as a structure under the imported web service.

The fifth bullet point on this page seems to document this as a restriction, but as far as I can see this reduces the agility of the platform, as I must perform a mapping manually (perhaps from a static type), and if the web service changes then there is no way to see this at design time.

Two questions:
  • Is there a plan to remove this restriction?
  • What is the best practice for working around this restriction?

Many thanks in advance,

Olly
"MyEnumeration does not appear as a structure under the imported web service" - well, it wouldn't, as it isn't a structure, it's an enumeration. Simply put, the platform does not implement enumerations at all (which I think is a bit of a mis). There are static entities, which can be used as enumerations, but those are very costly in both software units and performance, and don't make much sense when not used as foreign keys in tables.

"this reduces the agility of the platform, as I must perform a mapping manually" - I'm not entirely clear why you'd want a mapping. If you want to store the data in a table, then static entities are probably the way to go (even though see above), or you can just save them as-is.

"Is there a plan to remove this restriction?" - I wouldn't call a missing feature a "restriction". I don't think OutSystems can imlement it easily, since as I said, there's no such thing as an enumeration on the platform.

"What is the best practice for working around this restriction?" - I'm still not sure why you feel you have to do anything about it. As long as you make sure that the data you send is limited to the restricted values, there's little to worry about.