1. Get rid of all advertisements and get unlimited access to documents by upgrading to Premium Membership. Upgrade to Premium Now and also get a Premium Badge!

How to Expires the Document in workflows at UCM

Discussion in 'Oracle Webcenter Suite (formerly Oracle ECM)' started by yaznesh, Mar 6, 2009.

  1. yaznesh

    yaznesh Forum Advisor

    Messages:
    61
    Likes Received:
    2
    Trophy Points:
    160
    Location:
    Hyderabad
    Hi all,

    In a criteria workflow, based on condition How to expires the checkin content in worflows
    by using UCM content server??

    The secnario : 1) In a step, if approves the document , it should be Released.

    2) If Rejects the document , it should be expired the document ( it should not visible the document including without any notification and also do not stay in review status ).

    i tried out ,update metafield

    it did not work even it was not effected while i tested the condition.

    I also tried out below code , its not working

    $dOutDate=dInDate()$

    again, i had tried the expire date put in like currentdate(-1)$ , its also not working

    After checkin document, i had not found expiration date in content information its not effected in checkIn content..

    anyhelp greatly appriciated. anybody please resolve the above mentioned issue.

    its urgent Requirement.......please do needful

    Regards
    yaznesh
     
  2. markH

    markH Forum Advisor

    Messages:
    88
    Likes Received:
    10
    Trophy Points:
    180
    Location:
    Kansas
    you say you tried update metadata but it's not working, could we see your code? the ideal way is to get the current action from wfAction and use wfupdateMetaData to set the expiration date.

    tell us your exact steps with exact code.
     
  3. yaznesh

    yaznesh Forum Advisor

    Messages:
    61
    Likes Received:
    2
    Trophy Points:
    160
    Location:
    Hyderabad
    hi,

    anybody, please help this issue,

    Regarding Expires the content criteria workflow, my Scenario like Below.

    1) step 1 CC : if cc approves the content, if should go to CEO Review. and
    if cc rejects the content document should publish the content.

    2) step2 CEO: if CEO approves the content, as usual it should publish the content (ie.Release the content), if CEO feels that content is invalid then he rejects the content, it should be expired the content. .

    Note: in the CEO step , if he rejects it should not goes to contributor step. it should not appear anywhere and even the content should not in Review state. also.


    please resolve this issue, any help highly apprciated,

    do need ful

    regards,
    yaznesh
     
  4. Sadik

    Sadik Community Moderator Forum Guru

    Messages:
    1,906
    Likes Received:
    252
    Trophy Points:
    1,455
    Hi you will have to define a Jump condition on this. I don't see any other way. Regarding what you will jump on, it has to be a metadata field.
    Here you can use update metadata dOutDate (the expiration date) on condition CEO reject as mentioned in another post.

    If something is not working, please post the code then we can help better.
     
  5. yaznesh

    yaznesh Forum Advisor

    Messages:
    61
    Likes Received:
    2
    Trophy Points:
    160
    Location:
    Hyderabad
    hi,

    still i am unable to expire document.

    certain code not working. so i unable to provide code
    so, those who are aware in this secnario...

    i need script code , so give script code with description
    any body can help me ...
     
  6. yaznesh

    yaznesh Forum Advisor

    Messages:
    61
    Likes Received:
    2
    Trophy Points:
    160
    Location:
    Hyderabad
    hi,

    still i am unable to expire document.

    certain code not working. so i unable to provide code
    so, those who are aware in this secnario...

    i need script code , so give script code with description
    any body can help me ...

    always do need ful

    Regards,
    yaznesh
     
  7. yaznesh

    yaznesh Forum Advisor

    Messages:
    61
    Likes Received:
    2
    Trophy Points:
    160
    Location:
    Hyderabad
    Please help me out !!!

    hi all,

    i need to expires the content while Rejects the approver.

    i mean to say ..simply expires the content in a single step at criteria workflow.

    if any body knows , please give code logic

    i need code....plz give me

    its very urgent ... plz help me out .


    Regards,
    yaznesh
     
  8. Sadik

    Sadik Community Moderator Forum Guru

    Messages:
    1,906
    Likes Received:
    252
    Trophy Points:
    1,455
    Hi Yaznesh,

    Please don't expect that it's "needful" for anyone to resolve your problem. Have you raised an SR with oracle? Have you tried out all possibilities yourself?

    I can give you a guideline that "can work" for you. Try to follow the instructions below.

    There is something called "Events" in workflows. Events are of 3 types, Entry, update and Exit. You can put your custom code for a document in workflow in either of the 3 Events. When a document enters a particular step in workflow, Entry Code is executed. When the document's metadata is updated, the Update Event is executed. Again when the step is finished the Exit event is executed.

    Now the problem is metadata fields like Security Group, Author, Release Date, Expiration Date etc cannot be updated within a workflow script. Any custom Metadata script can be updated though. SO to workaround you need an extra MetaData field which will store that document was rejected at Step 2.

    so the code will be something like this. Put this is the Entry event of Step 1.
    Code (Text):

    <$if wfAction like "REJECT"$>
    <$wfUpdateMetaData("xABC", "REJECT")$>
    <$wfReleaseDocument()$>
    <$endif$>
     
    So what you are doing is that if your document is rejected at Step 2, release it!. And at the same time you are updating custom Metadata with value "REJECT".

    Now to expire this content, we need a custom rule that has activation condition
    Code (Text):

    #active.xABC like "REJECT"
     
    In Fields tab, select Expiration Date and put Derived Value as Current Date
    Code (Text):

    <$dprDerivedValue=dateCurrent()$>
     
    See if this expires the document for you.
     
  9. jbecerra

    jbecerra Active Member

    Messages:
    6
    Likes Received:
    1
    Trophy Points:
    65
    Hi Sadik,

    Have you tested this solution?....I have tried but it doesn't work, the rule is applied if I manually edit the content but not automatically after leaving the workflow, am I doing something wrong?

    Regards,
    Juan
     
  10. jbecerra

    jbecerra Active Member

    Messages:
    6
    Likes Received:
    1
    Trophy Points:
    65
    For the record:

    1) When trying to update the dOutDate using wfupdateMetaData in the workflow step, Failed.
    wfupdateMetaData only works for custom metadata fields

    2) When tyring to use the profiles: Failed,
    The solution works only if someone edits the file, the profiles and rules are activated when the checkin page is displayed, when the document is rejected the content is published until it is updated again.

    3) What worked for me:
    After rejection, the workflow goes back to the previous contribution step.
    In the entry script of the contribution step, I check if wfAction is Rejected, then set a custom metadata field "Xrejection" using the wfupdateMetaData function.
    I also clear some other metadata values so the content is not shown in the serches (i.e. xwebsitesection)
    Then i make the ducment exit the workflow, (wfExit), this publishes the file.
    Then, I created 2 archived jobs:
    The first job exports all CS files where Xrejection is "TRUE". this job is set to automatically replicate pointing to the second job
    The second imports the files into the same CS, but sets the value of dOutDate to dateCurrent() in the fields maps.

    Regards,
    Juan
     
    Sadik likes this.
  11. Sadik

    Sadik Community Moderator Forum Guru

    Messages:
    1,906
    Likes Received:
    252
    Trophy Points:
    1,455
    Thanks Juan for the sharing your solution.