Description change of attribute in Local Storage requires refreshing consumers

I came across with this issue recently. A simple change in the description of an entity attribute of a local storage will generate an error in runtime for consumer modules.

Although the platform doesn't flag the consumer modules to refresh the dependencies and publish it, it causes error in runtime due to this change.

Shouldn't the platform request to refresh dependencies?

mvp_badge
MVP

Hi José,

I don't think it should behave like this. Did you use the feedback button in Service Studio, to report this to OutSystems?  If not please do, then it goes straight to the backlog of the product team.

Regards,

Daniel

I will report now, I was just expecting some clarification here.

Thanks.

mvp_badge
MVP

Hi José,

With the new weak reference logic and since referencing entity structures was change to a weak reference, the platform doesn't make mandatory to refresh consumers.

In this cases you need to manually find the consumers and refresh them.

https://success.outsystems.com/Documentation/11/Developing_an_Application/Reuse_and_Refactor/Understand_Strong_and_Weak_Dependencies

Hope it helps,

Ricardo Pisco.

Hi Ricardo,

but should an error be thrown in run time because of this? 

That's the inconsistency I'm talking about.

Regards

mvp_badge
MVP

Hi José,

Yes, the error will be thrown since the producer changed.

That's the new behaviour of the platform when the weak references were introduced, now if it's a week reference you need to find all consumers and refresh it manually.

Not even Life Time refreshes weak references if any string reference was changed, this is a new way of thinking but It helps in other cases.

Bellow is a small videos explaining some gains you'll get for example in the end user canvas layers.

https://www.outsystems.com/forums/discussion/70195/outsystems-architecture-orchestration-end-user/

Hope it helps,

Ricardo Pisco.

Hi Ricardo,

There seems to be some confusion on the implications of weak references, let me try to clarify.

The platform handles as "weak references" all the elements that when changed have immediate impact in the runtime of the consumers, even before they are republished. That's the case of Screens, Entities, Service Actions and by their use in inputs/outputs of the latter, Structures as well.

Independent of that, is the concept of having modifications in the public API of an element (its signature), either compatible or incompatible. If the modifications are compatible, you can publish the consumer modules right away, without refreshing, and the platform will handle the differences by itself. That's the case when adding a new optional input, renaming an action, etc. If the modifications are incompatible on the other hand, you do need to refresh the consumers before publishing them, or the platform won't know how to (for example) fill in that new mandatory parameter that was added.

So there's these two "axis", one tells you if the change it's immediate in the consumers or not (weak vs strong reference) and the other tells you if the change requires the consumers to be adapted. Both ultimately impact the day-to-day development and the staging plans that LifeTime considers safe.

Regards,

Paulo Ferreira

Hi José,

Changing a description and getting a runtime error is definitely not expected behaviour. It falls in the group of changes that are just marked as Modified References, meaning that it's even possible to just publish the consumer without refreshing and the platform will handle that correctly.

Can you share more details about the scenario? Namely:

  • Is this a Mobile or Reactive module?
  • Did the runtime error start happening before or after you published the consumers of the attribute?
  • Was the error along the lines of "'<EntityName>' Entity is incompatible with the '<ProducerName>' module definition. Please update it.", or something else?

Thank you,

Paulo Ferreira

Hi Paulo,

  • Is this a Mobile or Reactive module?
    • It was between 2 Mobile modules.
  • Did the runtime error start happening before or after you published the consumers of the attribute?
    • The error happened before publishing the consumers. After refreshing dependencies and publishing the consumers it was fixed.
  • Was the error along the lines of "'<EntityName>' Entity is incompatible with the '<ProducerName>' module definition. Please update it.", or something else?
    • I can't recall exactly the error but it was a more generic message without naming the modules or suggesting to update modules/dependencies.

Thanks for the extra information.

Did you notice this when trying it out in the browser, or in the mobile app? Also, do you have the corresponding Error Log for the runtime error that you could share?

Regards,

Paulo

It was tried on the browser only.

Sorry but I don't have the error log, it was a month ago and I don't have access anymore.

It's okay, thanks for raising awareness to the issue in any case. If you hit the misbehaviour again, do report it.

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.