01-12-2016 08:10 AM
<activiti:taskListener event="complete" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
<activiti:field name="script">
<activiti:string><![CDATA[
…………………….
var message = 'IT LIVES';
throw message;]]></activiti:string>
</activiti:field>
</activiti:taskListener>
…
throw new Error("some text");
…
01-25-2016 09:04 AM
01-26-2016 03:25 AM
01-26-2016 03:37 AM
01-27-2016 11:23 PM
01-28-2016 02:51 AM
01-28-2016 01:40 PM
<activiti:string><![CDATA[throw new Error ("called");]]></activiti:string>
<activiti:string><![CDATA[throw new Error ("The values you entered are not correct");]]></activiti:string>
02-01-2016 07:11 AM
02-01-2016 11:08 AM
02-02-2016 04:06 AM
02-15-2018 08:43 AM
When alfresco is rendering the workflow form , it is rendering the transition button using the activiti-transition.js file.Basically this buttons are doing nothing more but submitting the workflow form.
This is how the flow is going when we submit a workflow form.
So the best to customize the error pop up is to change activiti-transition.ftl and activiti-transition.js file , to make an ajax call and handle the response as we want.
activiti-transition.js file has a function named as onClick: function ActivitiTransitions_onClick(e, p_obj).What it does is , it converts the form element in json object and finally submit that form.Below is line which is responsible for this.
Alfresco.util.submitForm(p_obj.getForm());
Inside this activiti-transition.js file if we do all this things manually and handle the server response, we will be able to handle the error message ultimately.
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.