Community Commons: storeURLToFileDocument, check if URL exists
I'm using storeURLToFileDocument to retrieve a avatar from a public website. The URL of the avatar is based on a memberid. Some members don't have a avatar and thus the URL will give a File Doesn't Exist error in the browser. storeURLToFileDocument also gives an error. Is there a way to check if the URL exists? So I can add this before I do the storeURLToFileDocument action? ------------------- com.mendix.core.CoreException: com.mendix.modules.microflowengine.MicroflowException: com.mendix.core.CoreRuntimeException: com.mendix.systemwideinterfaces.MendixRuntimeException: java.io.FileNotFoundException: http://www......nl/beheer/files/crossfit-limes/member/14-profile.jpg at CFL_Beheer.AfterStartUp_CFL_Beheer.nested.502b679f-4969-48e1-b8fe-aea078b3666b [8 of 491] (JavaAction : 'storeURLToFileDocument') at CFL_Beheer.AfterStartUp_CFL_Beheer (NestedLoopedMicroflow : '') at AppCloudServices.StartAppCloudServices (SubMicroflow : 'AfterStartUp_CFL_Beheer')
Bob van der Panne
It is possible you could do a java action to make this web service call, but I think you can leverage the activity you are already using. Why not use some custom without rollback error handling behavior on that java action? In your error handling flow you could create a log message or pop up a screen to a user letting them know that the URL doesn't exist.