cancel
Showing results for 
Search instead for 
Did you mean: 

add assignee button to revise task

anuradha1
Star Contributor
Star Contributor

i have added it like below, but it gives me an error.

<type name="scwf:activitiRevise">
<parent>bpm:activitiOutcomeTask</parent>
<mandatory-aspects>
<aspect>bpm:assignee</aspect>
</mandatory-aspects>
<properties>
<property name="scwf:reviseOutcome">
<type>d:text</type>
<default>Abort</default>
<constraints>
<constraint type="LIST">
<parameter name="allowedValues">
<list>
<value>Re-submit</value>
<value>Abort</value>
</list>
</parameter>
</constraint>
</constraints>
</property>
</properties>
<overrides>
<property name="bpmSmiley TongueackageActionGroup">
<default>add_package_item_actions</default>
</property>
<property name="bpmSmiley SurprisedutcomePropertyName">
<default>{http://www.someco.com/model/workflow/1.0}reviseOutcome</default>
</property>
</overrides>
</type>

<userTask id="usertask3" name="Revise" activiti:assignee="${initiator.properties.userName} " activiti:formKey="scwf:activitiRevise">
<extensionElements>
<activiti:taskListener event="complete" class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener">
<activiti:field name="script">
<activiti:string><![CDATA[if(task.getVariableLocal('scwf_reviseOutcome') == 'Re-submit') {
execution.setVariable('scwf_reSubmit1', true);
} else {
execution.setVariable('scwf_reSubmit1', false);
}
execution.setVariable("bpm_assignee", task.getVariable("bpm_assignee"));
]]></activiti:string>
</activiti:field>
</activiti:taskListener>
</extensionElements>
</userTask>

<config evaluator="task-type" condition="scwf:activitiRevise>
<forms>
<form>
<field-visibility>
<show id="bpm:workflowDescription" />
<show id="packageItems" />
<show id="bpm:assignee" />
<show id="scwf:reviseOutcome" />
<show id="transitions" />
<show id="bpm:status" />
</field-visibility>
<appearance>
<set id="" appearance="title" label-id="workflow.set.general" />
<set id="info" appearance="" template="/org/alfresco/components/form/2-column-set.ftl" />
<set id="assignee" appearance="title" label-id="workflow.set.assignee" />
<set id="items" appearance="title" label-id="workflow.set.items" />
<set id="progress" appearance="title" label-id="workflow.set.task.progress" />
<set id="response" appearance="title" label-id="workflow.set.response" />

<field id="bpm:workflowDescription" label-id="workflow.field.message">
<control template="/org/alfresco/components/form/controls/textarea.ftl">
<control-param name="style">width: 95%</control-param>
</control>
</field>
<field id="packageItems" set="items" />
<field id="bpm:assignee" label-id="workflow.field.assign_to" set="assignee" />
<field id="scwf:reviseOutcome" set="response" />
<field id="transitions" set="response" />
<field id="bpm:status" set="progress" />
</appearance>
</form>
</forms>
</config>

8 REPLIES 8

anuradha1
Star Contributor
Star Contributor

please help me

dvuika
Star Collaborator
Star Collaborator

Can you please move your question to the Process Services forum?

anuradha1
Star Contributor
Star Contributor

Ok Denys. 

Thank you for the reply.

kalpesh_c2
Star Collaborator
Star Collaborator

Hi anuradha madhushani‌ , 

You may not give bpm:assignee as mandatory-aspects.

Because it's not an aspect it's property which returns the assignee of the task.

Please share your alfresco logs.

Thanks,
Kalpesh,
ContCentric