3 Replies Latest reply: Sep 6, 2012 4:49 AM by Chely RSS

    wfAction Reject is not working

    Chely
      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"$>
      <$wfUpdateMetaData("xsrt_bill_status","Re-Submit")$>
      <$endif$>


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

      Thanks,
      Chely

      Edited by: Chely on Sep 6, 2012 1:59 AM
        • 1. Re: wfAction Reject is not working
          Jiri.Machotka-Oracle
          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
           <$wfUpdateMetaData("xsrt_bill_status","Re-Submit")$> 
          - 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)
          • 2. Re: wfAction Reject is not working
            875117
            Put code in the entry event of first step.

            https://blogs.oracle.com/kyle/entry/dealing_with_rejection_made_ea

            Regards,
            Boris
            • 3. Re: wfAction Reject is not working
              Chely
              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.