cancel
Showing results for 
Search instead for 
Did you mean: 

Customize/change message box issued by error in workflows dialogs

eleaese
Confirmed Champ
Confirmed Champ
Could we change the default actions with workflow errors ?. Currently Alfresco show a messagebox with the failing class name:

View screenshot at http://www.i2t.cl/downloads/alfresco-wf-messabox.jpg

Is there a way to override this behaviour ?.

Thanks in advance
1 REPLY 1

lementree
Champ on-the-rise
Champ on-the-rise
yes, you can handle this in <strong>Alfresco\tomcat\webapps\alfresco\WEB-INF\classes\alfresco\templates\webscripts\org\alfresco\repository\forms\form.post.json.js</strong>

catch (error)
    {
        var msg = error.message;
      
        if (logger.isLoggingEnabled())
            logger.log(msg);
      
        // determine if the exception was a FormNotFoundException, if so return
        // 404 status code otherwise return 500
        if (msg.indexOf("FormNotFoundException") != -1)
        {
            status.setCode(404, msg);
         
            if (logger.isLoggingEnabled())
                logger.log("Returning 404 status code");
        }
        else
        {
            status.setCode(500, msg);
         
            if (logger.isLoggingEnabled())
                logger.log("Returning 500 status code");
        }
      
        return;
    }
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.