12-13-2007 07:09 AM
<task-node name="Waiting for Artist">
<task name="wf:waitingForArtistTask" swimlane="artistsPool" />
<transition name="Send to Artist" to="Create">
<script>
<variable name="wf_reader" access="write" />
<variable name="bpm_assignee" access="read" />
<expression>
wf_reader = "New reader = " + bpm_assignee;
</expression>
</script>
</transition>
</task-node>
12-13-2007 08:29 AM
person.properties.userNamewould return the user name of the current user.
<variable name="person" access="read"/>
to your script.12-13-2007 08:43 AM
<task-node name="Waiting for Artist">
<task name="wf:waitingForArtistTask" swimlane="artistsPool" />
<transition name="Send to Artist" to="Create">
<script>
<variable name="wf_reader" access="read,write" />
<variable name="person" access="read" />
<expression>
wf_reader = "new reader = " + person.properties.userName;
</expression>
</script>
</transition>
</task-node>
12-13-2007 08:53 AM
<transition name="Continue" to="createCcr">
<condition>#{!qcp_wfIssueExist}</condition>
<action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
<script>
var logDateTime = new Date();
var ccrLogFile = companyhome.childByNamePath("CCR repository/Log files/" + qcp_wfCcrNr + ".log");
if (ccrLogFile != null)
{
var logLine = logDateTime.getFullYear() + ";" + utils.pad(logDateTime.getMonth()+1,2) + ";" + utils.pad(logDateTime.getDate(),2);
logLine += ";" + utils.pad(logDateTime.getHours(),2) + ";" + utils.pad(logDateTime.getMinutes(),2) + ";" + utils.pad(logDateTime.getSeconds(),2);
logLine += ";" + utils.pad(logDateTime.getTime(),16);
logLine += ";" + qcp_wfCcrNr;
logLine += ";" + person.properties.userName + ";" + "" + ";" + qcp_wfCycleNr;
logLine += ";" + "Issue number checked and found unique";
logLine += ";" + bpm_package.children[0].properties["qcp:previousWorkflowStatus"];
logLine += ";" + bpm_package.children[0].properties["qcp:currentWorkflowStatus"];
ccrLogFile.content += logLine + "\r\n";
}
bpm_package.children[0].properties["qcp:previousWorkflowStatus"] = "qcp:mayCreateCcr";
bpm_package.children[0].save();
if (bpm_package.children.length > 1)
for (var i = 1; i < bpm_package.children.length; i++)
if (bpm_package.children[i].parent.properties.name != bpm_package.children[0].parent.properties.name)
{
var newCopy = bpm_package.children[i].copy(bpm_package.children[0].parent);
bpm_package.removeNode(bpm_package.children[i]);
bpm_package.addNode(newCopy);
}
</script>
</action>
</transition>
So you might try to add <action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">and
</action>around your script.
<variableand
<expressiontags but that would not be the problem I guess.
12-13-2007 09:47 AM
<task-node name="Waiting for Artist">
<task name="wf:waitingForArtistTask" swimlane="artistsPool" />
<transition name="Send to Artist" to="Create">
<action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
<script>
<variable name="wf_reader" access="read,write" />
<expression>
wf_reader = person.properties.userName;
</expression>
</script>
</action>
</transition>
</task-node>
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.