AnsweredAssumed Answered

throw new Error in Alfresco workflow

Question asked by irenailievska on Jan 12, 2016
Latest reply on Feb 15, 2018 by krutik.jayswal
I want to throw error in a custom alfreso workflow, but just as a popup message to the user that he entered something wrong.
I tried to do this

<activiti:taskListener event="complete" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
          <activiti:field name="script">
            var message = 'IT LIVES';
            throw message;]]></activiti:string>

I tried doing this also

throw new Error("some text");

Since I am writing here it means it didn't work.
Please can somebody help me?
Just a simple alert window doesn't help me if the user submits the action after all. I need something to stop the user from continuing the process if the data he entered is not correct.

Thanks in advance,