08-31-2009 01:27 AM
var workflow = actions.create("start-workflow");
workflow.parameters.workflowName = "jbpm$wf:parallelgroupreview";
workflow.parameters.requiredApprovePercent = 20;
workflow.parameters["bpm:workflowDescription"] = "Please review and approve: " + document.name;
workflow.parameters["bpm:groupAssignee"] = people.getGroup("GROUP_reviewers");
09-02-2009 08:44 AM
<transition name="approve" to="approved">
<condition>#{wf_actualPercent >= wf_requiredApprovePercent}</condition>
<action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
<script>
var dest = companyhome.childByNamePath("draft");
bpm_context.move(dest);
</script>
</action>
</transition>
09-02-2009 11:53 AM
var dest = companyhome.childByNamePath("draft");
bpm_package.children[0].move(dest);
09-03-2009 02:45 AM
09-03-2009 09:21 AM
if (wf_department != "")
{
var departmentSpace = companyhome.childByNamePath("Departments");
var department = departmentSpace.childByNamePath(wf_department);
if ( department != null)
{
var newFolder = department.childByNamePath(bpm_workflowDescription);
if ( newFolder == null )
{
if ( !department.hasPermission("CreateChildren") )
{
var mail = actions.create( "mail" );
mail.parameters.to = initiator.properties.email;
mail.parameters.subject = bpm_workflowDescription + " workflow error.";
mail.parameters.from = "oscar@alfresco.bedfordstmartins.com";
mail.parameters.text = " You do not have the necessary permissions to create files in the " + wf_department + " Space.";
mail.execute( bpm_package );
}
else
{
newFolder = department.createFolder(bpm_workflowDescription);
}
}
for (var i = 0; i < bpm_package.children.length; i++)
{
bpm_package.children[i].move(newFolder);
}
}
}
09-04-2009 05:58 AM
<action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
<runas>admin</runas>
<script>
var dest= companyhome.childByNamePath("Approved");
bpm_package.children[0].move(dest);
</script>
</action>
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.