Home

Display UI custom message in a workflow

You are here

18 posts / 0 new
Last post
Display UI custom message in a workflow

Hi,

I would like to know if it is possible to display a custom message like "Workflow starting" ? or custom error message ?

Many thanks for your help

Regards

uskiki85

PS: My Workflow is used in Alfresco Share only

Re: Display UI custom message in a workflow

No ideas ?

Re: Display UI custom message in a workflow

uskiki85 wrote:
No ideas ?

Not too surprising given the vague requirements in your first post. Where would you like the message displayed? And when? In response to what?

Please help people to help you by giving as much context to your problems as possible. In this case, perhaps a quick screenshot or sketch would help.

Thanks,
Mike

Mike Hatfield
Lead Engineer, Client Applications
Find me on Twitter
Get the Alfresco iOS app
Get the Alfresco Android app

Re: Display UI custom message in a workflow

Oups sorry ...

In my case, when a user starts a workflow, it moves a document from one space to another. However, some documents are quite heavy so it takes some time. The user, seeing nothing happen, launch the workflow again and again ....

I want that when the workflow has launched, a message display that the document is being moved or the workflow has started. The user can see with this way that the treatment has begun.

Re: Display UI custom message in a workflow

No idéas ?

It is strange that nobody has find or developed a solution to display custom UI message in a workflow ?

I have read in some post that it is possible with a custom constraint with addErrorMessage (java org.alfresco.web.ui.common.Utils) but i am not a java expert ...

Re: Display UI custom message in a workflow

Hi uskiki85,

Can you tell me how did you do to deploy a workflow (that works for me) and display it on Share so as to be able to start a new instance off this new custom workflow.

Thanks

Re: Display UI custom message in a workflow

zomurn, I deploy my WF using the Console with the "deploy" command but i don't understand your question with my problem ...

Nobody can help me ?

Re: Display UI custom message in a workflow

any update on this?

Re: Display UI custom message in a workflow

hello tiuser123, it seems that nobody need to display some UI custom message in their workflow ...

Re: Display UI custom message in a workflow

Aw... custom dialogs are needed if you want to throw a custom error message or alert the user during your workflow processing.

(i.e if moving a folder fails, I would like to catch the moving error (i.e permission or duplicate name) and throw my custom error and show a my custom error message in a dialog. Currently, an ugly "org.Activiti.Exception.. blah blah" message is being shown.)

Can we log a request for this in the JIRA or somewhere so that they are aware of this?

Re: Display UI custom message in a workflow

Any news ?

Re: Display UI custom message in a workflow

Any JIRA has been created ?

Re: Display UI custom message in a workflow

This topic has no success ...

So bad there is no given

So bad there is no given answer :(

I know it's late but maybe
Custom workflow exception

We also had similar problem, later we extended the AlfrescoRuntimeException to our own custom class.
In this way,we're not displaying "org.Activiti.Exception..." and we're displaying own error message like 'com.quanticate....'.

public class CustomWorkflowException extends AlfrescoRuntimeException
{
   protected static final String UNKNOWN_MESSAGE = "CustomWorkflow.exception.unknown";
   protected static final String START_MESSAGE = "CustomWorkflow.exception.start";
 
   private static final long serialVersionUID = 2163551047437476248L;
 
   private String msgId;
   private String message;
 
   /**
    * Constructor
    * 
    * @param msgId     the message id
    */
   public CustomWorkflowException(String msgId)
   {
       super(msgId);
       this.message = resolveMessage(msgId, null);
       this.msgId = msgId;
   }
 
   /**
    * Constructor
    * 
    * @param msgId     the message id
    * @param cause     the exception cause
    */
   public CustomWorkflowException(String msgId, Throwable cause)
   {
       super(msgId, cause);
       this.message = resolveMessage(msgId, null);
       this.msgId = msgId;
   }
 
   /**
    * @return the msgId
    */
   public String getMsgId()
   {
       return msgId;
   }
 
   @Override
   public String getMessage()
   {
      return getLocalizedMessage();
   }
 
   @Override
   public String getLocalizedMessage()
   {
      return message;
   }
 
   @Override
   public String toString()
   {
      return I18NUtil.getMessage(START_MESSAGE) + " " + message;
   }
 
   /**
    * Resolves the message id to the localised string.
    * <p>
    * If a localised message can not be found then the message Id is
    * returned.
    * 
    * @param messageId     the message Id
    * @param params        message parameters
    * @return              the localised message (or the message id if none found)
    */
   private static String resolveMessage(String messageId, Object[] params)
   {
       String message = I18NUtil.getMessage(messageId, params);
       if (message == null)
       {
           // If a localised string cannot be found then return the messageId
           message = messageId;
       }
 
       if (message == null || message.isEmpty())
       {
           // If there's no know message, pick the default unknown one
           message = I18NUtil.getMessage(UNKNOWN_MESSAGE);
       }
       return message;
   }
}

Hope this helps someone.

Thanks,
Murali

If this post was helpful, please click on "Mark Comment as Useful" !
Blog: www.codingfreaks.net
Community: www.meetup.com/Alfresco-Bangalore-Community
Working for : www.quanticate.com

How include this java class on alfresco

I need to include this java class inside Alfresco. How do it???. Thank

Register with surf

Hi,

You would need to register your class with the surf spring bean for it to be recognized.
Here is an example, you can always do a read up to understand more:

<beans>
 <bean id="your-bean-id" parent="baseJavaScriptExtension" class="your.package.classname">
  <property name="extensionName">
   <value>method-name</value> //The method you want to expose to your alfresco.
  </property>
 </bean>
</beans>

Give your file a name which ends with "-context.xml" and place it in the shared-extension folder.

Hope that helps.

Mark if post is useful!

DarkRedd
"Little death makes life more meaningful"
Alfresco version 4.2.2

forums index