11-03-2009 08:37 AM
11-03-2009 09:36 AM
11-03-2009 10:55 AM
11-03-2009 10:57 AM
Can you be a little more specific, please? Does that mean that I can create by hand my own xml file and give the selected people other permission when this customized workflow is started?
11-03-2009 11:05 AM
01-19-2010 08:28 AM
<?xml version="1.0" encoding="UTF-8"?>
<process-definition xmlns="urn:jbpm.org:jpdl-3.1" name="wf:adhoc">
<swimlane name="initiator"/>
<start-state name="start">
<task name="wf:submitAdhocTask" swimlane="initiator"/>
<transition name="" to="adhoc"/>
</start-state>
<swimlane name="assignee">
<assignment class="org.alfresco.repo.workflow.jbpm.AlfrescoAssignment">
<actor>#{bpm_assignee}</actor>
</assignment>
</swimlane>
<task-node name="adhoc">
<task name="wf:adhocTask" swimlane="assignee">
<event type="task-create">
<script>
if (bpm_workflowDueDate != void) taskInstance.dueDate = bpm_workflowDueDate;
if (bpm_workflowPriority != void) taskInstance.priority = bpm_workflowPriority;
</script>
</event>
</task>
<event type="node-enter">
<action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
<script>
for (var i = 0; i < bpm_package.children.length; i++)
{
var username = bpm_assignee.properties["cm:userName"];
if (logger.isLoggingEnabled()) logger.log("Setting permission Coordinator for " + username);
var document = bpm_package.children[i];
var parent = bpm_package.children[i].getParent();
/* Make it visible. */
document.setPermission("Coordinator",username);
/* Enable check-out/check-in. */
parent.setPermission("Coordinator",username);
}
</script>
</action>
</event>
<transition name="" to="completed">
<action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
<script>
if (wf_notifyMe)
{
var mail = actions.create("mail");
mail.parameters.to = initiator.properties.email;
mail.parameters.subject = "Adhoc Task " + bpm_workflowDescription;
mail.parameters.from = bpm_assignee.properties.email;
mail.parameters.text = "It's done";
mail.execute(bpm_package);
}
for (var i = 0; i < bpm_package.children.length; i++)
{
var username = bpm_assignee.properties["cm:userName"];
if (logger.isLoggingEnabled()) logger.log("Removing permission Coordinator for " + username);
var document = bpm_package.children[i];
var parent = bpm_package.children[i].getParent();
/* Hide it. */
document.removePermission("Coordinator",username);
/* Disable check-out/check-in*/
parent.removePermission("Coordinator",username);
}
</script>
</action>
</transition>
</task-node>
<task-node name="completed">
<task name="wf:completedAdhocTask" swimlane="initiator"/>
<transition name="" to="end"/>
</task-node>
<end-state name="end"/>
</process-definition>
<?xml version="1.0" encoding="UTF-8"?>
<process-definition xmlns="urn:jbpm.org:jpdl-3.1" name="wcmwf:changerequest">
<swimlane name="initiator" />
<start-state name="start">
<task name="wcmwf:submitChangeRequestTask" swimlane="initiator" />
<transition name="" to="changeRequest" />
</start-state>
<swimlane name="assignee">
<assignment class="org.alfresco.repo.workflow.jbpm.AlfrescoAssignment">
<actor>#{bpm_assignee}</actor>
</assignment>
</swimlane>
<task-node name="changeRequest">
<task name="wcmwf:changeRequestTask" swimlane="assignee" >
<assignment class="org.alfresco.repo.workflow.jbpm.AlfrescoAssignment">
<actor>#{bpm_assignee}</actor>
</assignment>
</task>
<event type="node-enter">
<action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
<script>
for (var i = 0; i < bpm_package.children.length; i++)
{
var username = bpm_assignee.properties["cm:userName"];
if (logger.isLoggingEnabled()) logger.log("Setting permission Coordinator for " + username);
var document = bpm_package.children[i];
var parent = bpm_package.children[i].getParent();
/* Make it visible. */
document.setPermission("Coordinator",username);
/* Enable check-out/check-in. */
parent.setPermission("Coordinator",username);
}
</script>
</action>
</event>
<transition name="" to="end" >
<action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
<script>
for (var i = 0; i < bpm_package.children.length; i++)
{
var username = bpm_assignee.properties["cm:userName"];
if (logger.isLoggingEnabled()) logger.log("Removing permission Coordinator for " + username);
var document = bpm_package.children[i];
var parent = bpm_package.children[i].getParent();
/* Hide it. */
document.removePermission("Coordinator",username);
/* Disable check-out/check-in*/
parent.removePermission("Coordinator",username);
}
</script>
</action>
</transition>
</task-node>
<end-state name="end" />
<event type="process-end">
<action class="org.alfresco.repo.avm.wf.AVMRemoveWFStoreHandler"/>
</event>
</process-definition>
05-20-2010 05:49 PM
The following code of mine changerequest_processdefinition.xml doesn't work:Jenn_l,
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.