AnsweredAssumed Answered

How to recycle the advanced workflow on rejecting the doc

Question asked by harishns on May 4, 2010
Latest reply on May 5, 2010 by sebp

I am new to writing JPDL, I want to redo the review process with the same person as reviewer with updated document.
is anyone know how to write restart the workflow upon rejecting the document?

if I am not clear, this is how my workflow should be

start advance workflow –> reject the document in review process –> resend the updated document to the same person for approve/reject –> perform same operation till document get approve.

there is one reassign action which I can use it in alfresco webclient, if I did that, I don't get option to update the document and I get 'Task Done' button instead of approve/reject option on the reviewer side.

Can anyone helpme out in modifying the review-processdefinition.xml .

<process-definition xmlns="" name="wf:review">

    <swimlane name="initiator" />

    <start-state name="start">
        <task name="wf:submitReviewTask" swimlane="initiator" />
        <transition to="review" >
         <action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
              var mail = actions.create("mail");
              mail.parameters.subject = "new Review Task";
              mail.parameters.template = companyhome.childByNamePath("Data Dictionary/Email Templates/notify_user_email.ftl");
              mail.parameters.text = "A document awaiting your approval at Alfresco";

    <swimlane name="reviewer">
        <assignment class="org.alfresco.repo.workflow.jbpm.AlfrescoAssignment">

    <task-node name="review">
        <task name="wf:reviewTask" swimlane="reviewer">
            <event type="task-create">
                    if (bpm_workflowDueDate != void) taskInstance.dueDate = bpm_workflowDueDate;
                    if (bpm_workflowPriority != void) taskInstance.priority = bpm_workflowPriority;
        <transition name="approve" to="approved" />
        <transition name="reject" to="rejected" />

    <task-node name="rejected">
        <task name="wf:rejectedTask" swimlane="initiator" />
        <transition name="" to="end" />

    <task-node name="approved">
        <task name="wf:approvedTask" swimlane="initiator" />
        <transition name="" to="end" />

    <end-state name="end" />