AnsweredAssumed Answered

Custom Workflow

Question asked by lakshya on Mar 26, 2009
Hello, I have created one custom workflow as per the steps given in
http://wiki.alfresco.com/wiki/WorkflowAdministration

I am able to assign a task to a User2 by  User1. I can see the task in 'Completed Task' list of User1 but not able to see the task in 'Task To Do' list of User2.

The process definition I am using is
<?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 actor-id="#{bpm_assignee.properties['cm:userName']}"/>
  </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>
    <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["cm:email"];
            mail.parameters.subject = "Adhoc Task " + bpm_workflowDescription;
            mail.parameters.from = bpm_assignee.properties["cm:email"];
            mail.parameters.text = "It's done";
            mail.execute(bpm_package);
          }
        </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"/>

  <event type="process-end">
     <action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
        <script>
           if (logger.isLoggingEnabled())
              logger.log("End of process.  Cancelled: " + cancelled);
        </script>
     </action>
  </event>
  
</process-definition>


Any pointers will be appreciated…

Also, can anyone provide me link for creating approve / reject workflow.

Outcomes