Phone web Offline

0
HiI have an application that is already in production with a Responsive Web profile and a Phone Web profile. Now I need to add a Phone Web Offline profile to support offline site surveys.What I did:Created a new Phone Web Offline profile.Duplicated only the pages needed for offline usage.Converted the page actions from microflows to nanoflows.Created separate nanoflows for the offline pages.However, after adding the offline profile and configuring my entities for offline synchronization, I started getting many validation errors (CE6897, CE6904, CE7079, etc.).My questions are:Why do some pages in my original Phone Web profile now show errors related to offline synchronization, even though those pages are not part of the offline profile?Why are microflows no longer accepted in some places where they worked before adding the offline profile?I use a File Dropper widget with an After Commit microflow. After enabling offline synchronization, this also causes errors. What is the recommended approach for file uploads in a Phone Web Offline profile?Is there a recommended strategy for introducing an offline profile into an existing production application without having to redesign a large part of the application?Any best practices, documentation, or experiences with migrating an existing Phone Web application to Phone Web Offline would be greatly appreciated.Mendix version: 10.24.2Scenario: Site survey application with file uploads and some REST integrations.
asked
2 answers
0

Hi

I think the issue is not with mendix but architectural decisions.

When you duplicated only some pages, Mendix validates everything that becomes reachable from the offilne navigation profile So you need to double check everything like snippets, layouts some nanoflows, and entities.

The shared pages, layouts, snippets, and navigation actions can pull more of your existing phone web model into the offline validation scope.

I'll attach some documents hope they help

https://docs.mendix.com/refguide/mobile/building-efficient-mobile-apps/offlinefirst-data/synchronization/

https://docs.mendix.com/refguide/mobile/introduction-to-mobile-technologies/progressive-web-app/


answered
0

Hi Duha Hamwi


The thing which you are currently is a issue when you mix two concepts wrongly .Once an entity is marked for offline sync, Mendix enforces offline-compatible rules across all profiles for any page/widget that uses that entity even in your online Phone Web profile. The entity's sync configuration is global, not profile-scoped, Any widget or action bound to an offline-synced entity must use nanoflows. This bleeds into your online profile if the same entity is referenced there.File upload is not supported in offline profiles. The File Dropper widget and After Commit microflows on entities will always fail offline validation.


The solution is to create a dedicated domain model subset and avoid marking shared production entities as offline-sync. if ypu are planning to use the same then in that case the sync concept should be developed using custom logic instead of mendix default. I hope this helps, If you have more question , I am happy to help

answered