SDK 3 - ActivitiException: Unknown property

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Established Member II

SDK 3 - ActivitiException: Unknown property

Jump to solution

Hi,

i have renamed some fields and add other one in workflow-validation-model.xml , example:

<property name="wfvd:reviewOutcome"> has been renamed <property name="wfvd:reviewOutcomeMed">

In my bpmn file, i have updated the flow :

${wfvd_reviewOutcome == 'VALIDATION MEDECIN'}   =>  ${wfvd_reviewOutcomeMed == 'DEMANDE'}

When i place a document in folder concerned i got the following error :

 this is my bpmn file (new value in bold):

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlnsSmiley Surprisedmgdc="http://www.omg.org/spec/DD/20100524/DC" xmlnsSmiley Surprisedmgdi="http://www.omg.org/spec/DD/20100524/DI" xmlns:tns="http://activiti.org/bpmn20" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" expressionLanguage="http://www.w3.org/1999/XPath" id="review-definitions" name="" targetNamespace="http://activiti.org/bpmn20" typeLanguage="http://www.w3.org/2001/XMLSchema">
<process id="activitiValidationDocumed" isClosed="false" isExecutable="true" name="Validation Documed" processType="None">
<extensionElements>
<activiti:executionListener class="org.alfresco.repo.workflow.activiti.listener.ScriptExecutionListener" event="start">
<activiti:field name="script">
<activiti:string><![CDATA[execution.setVariable('wf_approveCount', 100);
execution.setVariable('wf_actualPercent', 100);
execution.setVariable('wf_reviewerCount', bpm_assignees.size());
execution.setVariable('wf_requiredPercent', wf_requiredApprovePercent);]]></activiti:string>
</activiti:field>
</activiti:executionListener>
</extensionElements>
<startEvent activiti:formKey="wf:submitParallelReviewTask" id="start"/>
<sequenceFlow id="flow1" sourceRef="start" targetRef="validationSecretaire"/>
<userTask activiti:assignee="${reviewAssignee.properties.userName}" activiti:exclusive="true" activiti:formKey="wfvd:activitiReviewTask" id="validationSecretaire" name="Validation secrétaire">
<extensionElements>
<activiti:taskListener class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener" event="create">
<activiti:field name="script">
<activiti:string><![CDATA[if (typeof bpm_workflowDueDate != 'undefined') task.setVariableLocal('bpm_dueDate', bpm_workflowDueDate);
if (typeof bpm_workflowPriority != 'undefined') task.priority = bpm_workflowPriority;

logger.system.out("task.getVariable(reviewAssignee) onCreate : "+task.getVariable("reviewAssignee"));]]></activiti:string>
</activiti:field>
</activiti:taskListener>
<activiti:taskListener class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener" event="complete">
<activiti:field name="script">
<activiti:string><![CDATA[<import resource="classpath:alfresco/extension/workflows/js/validation-documed.js">

mainValidationSecretaire();]]></activiti:string>
</activiti:field>
</activiti:taskListener>
</extensionElements>
<multiInstanceLoopCharacteristics activiti:collection="bpm_assignees" activiti:elementVariable="reviewAssignee" isSequential="false">
<completionCondition><![CDATA[${wf_actualPercent >= wf_requiredApprovePercent}]]></completionCondition>
</multiInstanceLoopCharacteristics>
</userTask>
<sequenceFlow id="flow2" sourceRef="validationSecretaire" targetRef="reviewDecision"/>
<exclusiveGateway gatewayDirection="Unspecified" id="reviewDecision" name="Review Decision"/>
<sequenceFlow id="flow3" sourceRef="reviewDecision" targetRef="validationMedecin">
<conditionExpression xsi:type="tFormalExpression"><![CDATA[${wfvd_reviewOutcomeMed == 'DEMANDE'}]]></conditionExpression>
</sequenceFlow>
<userTask activiti:assignee="${wfvd_medecin.properties.userName}" activiti:exclusive="true" activiti:formKey="wfvd:activitiReviewTaskMedecin" id="validationMedecin" name="Validation Médecin">
<documentation id="validationMedecin_D_1"><![CDATA[The document was reviewed and approved.]]></documentation>
<extensionElements>
<activiti:taskListener class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener" event="create">
<activiti:field name="script">
<activiti:string><![CDATA[<import resource="classpath:alfresco/extension/workflows/js/validation-documed.js">
if (typeof bpm_workflowDueDate != 'undefined') task.setVariableLocal('bpm_dueDate', bpm_workflowDueDate);
if (typeof bpm_workflowPriority != 'undefined') task.priority = bpm_workflowPriority;

OncreateValidationMedecin();]]></activiti:string>
</activiti:field>
</activiti:taskListener>
<activiti:taskListener class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener" event="complete">
<activiti:field name="script">
<activiti:string><![CDATA[<import resource="classpath:alfresco/extension/workflows/js/validation-documed.js">

mainValidationMedecin();]]></activiti:string>
</activiti:field>
</activiti:taskListener>
</extensionElements>
</userTask>
<endEvent id="end"/>
<sequenceFlow id="flow6" sourceRef="reviewDecision" targetRef="end"/>
<exclusiveGateway gatewayDirection="Unspecified" id="exclusivegateway1" name="Exclusive Gateway"/>
<sequenceFlow id="flow7" sourceRef="validationMedecin" targetRef="exclusivegateway1"/>
<sequenceFlow id="flow8" sourceRef="exclusivegateway1" targetRef="end">
<conditionExpression xsi:type="tFormalExpression"><![CDATA[${wfvd_reviewOutcomeMedecinDpe == 'DPE'}]]></conditionExpression>
</sequenceFlow>
<userTask activiti:assignee="${bpm_assignee.properties.userName}" activiti:exclusive="true" activiti:formKey="wfvd_activitiReviewTaskRefusSecretaire" id="validationRefusSecretaire" name="Validation refus secrétaire">
<extensionElements>
<activiti:taskListener class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener" event="create">
<activiti:field name="script">
<activiti:string><![CDATA[if (typeof bpm_workflowDueDate != 'undefined') task.setVariableLocal('bpm_dueDate', bpm_workflowDueDate);
if (typeof bpm_workflowPriority != 'undefined') task.priority = bpm_workflowPriority;

task.setVariable("bpm_workflowDescription",execution.getVariable("bpm_workflowDescription"));
task.setVariable("bpm_priority",execution.getVariable("bpm_priority"));]]></activiti:string>
</activiti:field>
</activiti:taskListener>
<activiti:taskListener class="org.alfresco.repo.workflow.activiti.tasklistener.ScriptTaskListener" event="complete">
<activiti:field name="script">
<activiti:string><![CDATA[<import resource="classpath:alfresco/extension/workflows/js/validation-documed.js">

mainValidationSecretaire();]]></activiti:string>
</activiti:field>
</activiti:taskListener>
</extensionElements>
</userTask>
<sequenceFlow id="flow9" sourceRef="exclusivegateway1" targetRef="validationRefusSecretaire">
<conditionExpression xsi:type="tFormalExpression"><![CDATA[${wfvd_reviewOutcomeMedecinReturn == 'RETOUR'}]]></conditionExpression>
</sequenceFlow>
<exclusiveGateway gatewayDirection="Unspecified" id="exclusivegateway2" name="Exclusive Gateway"/>
<sequenceFlow id="flow10" sourceRef="validationRefusSecretaire" targetRef="exclusivegateway2"/>
<sequenceFlow id="flow11" sourceRef="exclusivegateway2" targetRef="validationMedecin">
<conditionExpression xsi:type="tFormalExpression"><![CDATA[${wfvd_reviewOutcomeMed == 'DEMANDE'}]]></conditionExpression>
</sequenceFlow>
<sequenceFlow id="flow12" sourceRef="exclusivegateway2" targetRef="end"/>
</process>

graphical mode :

this is the associated model :

I have :

- deleted database

- created site

- I have cleared cache.

Nothing has changed !!

Thank's for your help !

1 Solution

Accepted Solutions
Highlighted
Established Member II

Re: SDK 3 - ActivitiException: Unknown property

Jump to solution

solved by using  ${execution.getVariable('wfvd_reviewOutcomeMed') == 'DEMANDE'}

View solution in original post

1 Reply
Highlighted
Established Member II

Re: SDK 3 - ActivitiException: Unknown property

Jump to solution

solved by using  ${execution.getVariable('wfvd_reviewOutcomeMed') == 'DEMANDE'}

View solution in original post