06-23-2011 06:42 AM
<decision name="serialorparallel">
<event type="node-enter">
<script>
<variable name="wcmwf_reviewerCnt" access="write"/>
<variable name="wcmwf_approveCnt" access="write"/>
<variable name="wcmwf_reviewType" access="write"/>
<expression>
wcmwf_reviewerCnt = bpm_assignees.size();
wcmwf_approveCnt = 0;
wcmwf_reviewType = wcmwf_submitReviewType;
</expression>
</script>
</event>
<transition name="serial" to="submitserialreview" />
<transition name="parallel" to="submitparallelreview">
<condition>#{wcmwf_reviewType == "Parallel"}</condition>
</transition>
</decision> Since wcmwf_approveCnt is always 0, normally content always goes to the first user. I wanted to modify this so that wcmwf_approveCnt can be = (the current user who submitted the content) + 1. This way the content would go to the next user. I know of this –> initiator.properties["cm:name"]; but I guess that's wrong. Is there a correct way to achieve this. 06-24-2011 08:03 AM
<script>
<variable name="wcmwf_reviewerCnt" access="write"/>
<variable name="wcmwf_approveCnt" access="write"/>
<variable name="wcmwf_reviewType" access="write"/>
<variable name="initiator" access="write"/>
<variable name="count" access="write"/>
<expression>
wcmwf_reviewerCnt = bpm_assignees.size();
wcmwf_reviewType = wcmwf_submitReviewType;
initiator = initiator.properties["cm:name"];
for(count = 0; count < wcmwf_reviewerCnt; count++)
{
if(initiator == bpm_assignees.get(count))
{
break;
}
}
wcmwf_approveCnt = count + 1;
</script>
javax.faces.FacesException: Error calling action method of component with id dialog:finish-button
caused by:
javax.faces.el.EvaluationException: Exception while invoking expression #{DialogManager.finish}
caused by:
org.alfresco.error.AlfrescoRuntimeException: 05240005 Failed to submit to workflow
caused by:
org.alfresco.service.cmr.workflow.WorkflowException: 05240004 Failed to signal transition null from workflow task jbpm$20.
caused by:
org.jbpm.graph.def.DelegationException: Sourced file: inline evaluation of: `` wcmwf_reviewerCnt = bpm_assignees.size(); w . . . '' : Not an array
caused by:
Sourced file: inline evaluation of: `` wcmwf_reviewerCnt = bpm_assignees.size(); w . . . '' : Not an array : at Line: 4 : in file: inline evaluation of: `` wcmwf_reviewerCnt = bpm_assignees.size(); w . . . '' : [ "cm:name" ]06-28-2011 03:26 AM
<script>
<variable name="wcmwf_reviewerCnt" access="write"/>
<variable name="wcmwf_approveCnt" access="write"/>
<variable name="wcmwf_reviewType" access="write"/>
<variable name="initiatorName" access="write"/>
<variable name="count" access="write"/>
<expression>
wcmwf_reviewerCnt = bpm_assignees.size();
wcmwf_reviewType = wcmwf_submitReviewType;
initiatorName = initiator.properties.get("firstName");
for(count = 0; count < wcmwf_reviewerCnt; count++)
{
if(initiatorName == bpm_assignees.get(count))
{
break;
}
}
wcmwf_approveCnt = count +1;
</expression>
</script>Now any content I submit gets rejected and comes back to the initiator. I guess this is because of the incorrect comparison in the if part. if(initiatorName == bpm_assignees.get(count))What does bpm_assignees contain. First Names or Last Names. 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.