AnsweredAssumed Answered

transitions button error

Question asked by davidedge on Jun 11, 2014
Hi everybody,
these are pieces of code of my custom workflow.


<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://www.activiti.org/test">
  <process id="collaborazione" name="collaborazione" isExecutable="true">

    <startEvent id="alfrescoStartevent1" name="Alfresco start" activiti:formKey="wf:avviaOrdine"></startEvent>
    <userTask id="alfrescoUsertask1" name="specifica categoria prodotto" activiti:formKey="wf:specificaCategoria">
      <extensionElements>
        <activiti:taskListener event="complete" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
          <activiti:field name="script">
            <activiti:string>
               execution.setVariable('wf_categoria', task.getVariable('wf_categoria'));
               execution.setVariable('wf_param_prezzo', task.getVariable('wf_param_prezzo'));
               execution.setVariable('wf_param_affidabilita', task.getVariable('wf_param_affidabilita'));
               execution.setVariable('wf_param_custom', task.getVariable('wf_param_custom'));
               execution.setVariable('wf_param_consegna', task.getVariable('wf_param_consegna'));
               execution.setVariable('wf_param_assistenza', task.getVariable('wf_param_assistenza'));
               execution.setVariable('wf_param_comunicazione', task.getVariable('wf_param_comunicazione'));
         </activiti:string>
          </activiti:field>
        </activiti:taskListener>
      </extensionElements>
    </userTask>
….



file share-workflow-form-config

   <config evaluator="task-type" condition="wf:specificaCategoria">
      <forms>
         <form>
            <field-visibility>
               <show id="wf:categoria" />
               <show id="wf:prezzo" />
               <show id="wf:affidabilita" />
               <show id="wf:custom" />
               <show id="wf:consegna" />
               <show id="wf:assistenza" />
               <show id="wf:comunicazione" />
               <show id="transitions" />
            </field-visibility>
            <appearance>
               <set id="other" appearance="title" label-id="Categoria" />
               <set id="parameter" appearance="title" label-id="Parametri dell'ordine" />
               <set id="response" appearance="title" label-id="workflow.set.response" />
               <field id="wf:categoria" label="Categoria prodotto" set="other" />
               <field id="wf:prezzo" label="Adeguatezza prezzo" set="parameter" />
               <field id="wf:affidabilita" label="Affidabilità" set="parameter" />
               <field id="wf:custom" label="Livello di customizzazione" set="parameter" />
               <field id="wf:consegna" label="Rispetto tempi di consegna" set="parameter" />
               <field id="wf:assistenza" label="Assistenza post-consegna" set="parameter" />
               <field id="wf:comunicazione" label="Comunicazione" set="parameter" />
               <field id="transitions" set="response" />
            
            </appearance>
         </form>
      </forms>   
   </config>



The wf start, but when i click on transitions button (in UserTask) i receive a pop-up window with this error:
"java.lang.IllegalArgumentException: The field 'script' should be set on the TaskListener".
What is? Where is error?

Outcomes