3 Replies Latest reply on Sep 6, 2012 9:49 AM by Chely

    wfAction Reject is not working

      I have two steps in the workflow....If the document is rejected in the 2nd step, one meta data value should be updated as below:

      <if wfAction like "REJECT"$>

      I have tried this code in the entry and exit events of step 2. but it's not working.


      Edited by: Chely on Sep 6, 2012 1:59 AM
        • 1. Re: wfAction Reject is not working
          REJECTs are a bit tricky.

          First of all, when a user reject a content item in a step N, it leaves this step immediately (neither EXIT, not UPDATE events are called, so whatever code you place there, it won't be executed).

          As stated in the manual, "If any reviewer rejects the content, it goes back to the most recent Review/Edit Revision or Review/New Revision step. If there is no such step, the content goes back to the original author (the Auto-Contribution step)."

          Therefore, you'd have to place you code to the ENTRY event of the previous step; provided that it is Review/Edit Revision or Review/New Revision.

          Particularly for your use case, there is also a workaround:

          - place this code to the ENTRY of the 2nd Step
          - place also that code to the EXIT of the 2nd Step
           <$wfUpdateMetaData("xsrt_bill_status","other value")$> 
          (this means that the value will be restored unless REJECT occurs). It is not exactly what you intended (as long as the item is in the 2nd step - for all UPDATEs - the value of the metadata field is set incorrectly)
          1 person found this helpful
          • 2. Re: wfAction Reject is not working
            Put code in the entry event of first step.


            • 3. Re: wfAction Reject is not working
              Thanks Tombo...

              My problem iis solved now...actually at the time of rejection...it immediately goes back,without executing any of the Entry, Update,Exit events. So we need to handle the rejection in it's previous step.