Get the latest approved version of a content management resource

Hi I am using EP 6 with Content management.
I my application I need to get resources form content management, approval process is enabled for the content items.
I use this code
RID rid = RID.getRID(path);
          if (rid != null) {
               try {
                    resource = rf.getResource(rid, context);
} catch (ResourceException e1) {
     //errorhandling
where rf is a com.sapportals.wcm.repository.IResourceFactory
created from a service user and a service context
which work fine, When the resource has been approved.
however if I change the specified content Item and do not approve it, the above code returns null as resource.
I would expect the api to return the latest approved version of the resource.
Have I misunderstood soemthing here or should I use another API?

I solved my problem...
first of all.
Versioning was enabled for the folder but apparently it didnt work so i disabled it and enabled it again. Then I got the correct reource instead of null.
second thing
later in mycode I used this to get the path of the resource
resource.getRID().getPath();
but this gives the path to where the version of the document can be found... something like /documents/~System/xx/xxxxx/xxxx
where x is numbers
after doing a little debugging I found out that
resource.getAccessRID().getPath()
returns the path to where in CM the resource is stored.
I hope My experience here can help others.
I am glad that I solved my problem, but I find it extremely worrying that some settings in CM apparently stops working without any apparent reason.
We have experienced this with other properties like Manual Ordering, Approval process, have any one else had these problems and found the cause then I would like to hear about it

Similar Messages

  • How to get the url of a document in content management?

    Hello,
    I have used API  'SKWF_PHIO_CONTENT_URL_GET to get the url of a file in CRM content management. But when I tried to open this url in explorer got error message "SSF error: Decoding not possible". Could any one please help me to resolve this problem.
    Thanks
    Nisha

    Thanks for replying - unfortunately, there is not much
    support on these forums.
    I wish there was some way to emulate the mouse from
    Javascript to click the play, pause, and slider buttons... but one
    would't even know, programmatically, the location on screen of the
    play, pause, and slider buttons.
    quote:
    Originally posted by:
    davexnet
    You'll notice that questions like this don't get answered on
    this
    forum. The Flash player has a philosophy that skews the power
    over almost everything about it to the content providers,
    and precious little control, if at all, to the client player.
    It's a crappy situation - I use Flashblock in Firefox and
    only view the
    content *I* want to see.
    It works for me, particularly since I'm using an older
    (slower )
    computer that really gets bogged down by aggressive Flash
    content.

  • Getting the latest patch list without Sun Update Manager

    Hi,
    I think this is not the best practice but merely exploring possibilities.
    My boss wants to know if there is a way to get a list of the latest patches online. We just need the list and not an automated download and patching tool like Sun Update Manager. Based on the list, we can then manually download and apply the patches one-by-one.
    We have used Sun Explorer and Sun Checkup/Griffon to come up with the list before. However, the list only includes the patches available in the EIS DVD and not the most current list available online.
    Can somebody help?
    Thank you.

    configure and use use sun update manager
    /usr/bin/updatemanager

  • I have 2 ipod touch's that both have frozen screens and will not reset or show up in itunes. They both froze after trying to update to the latest software version. How do I get them to work?

    I have 2 touch's that froze when trying to update to the latest ios version. Neither respond to restarting the devices. They are also not recognized in windows or itunes. How do I get these to work. I followed all of the instructions on  the apple website and they still don't work. I have verified that I have apple support for mobile devices installed in itunes and my version of itunes is 11.0.1. I am running windows 7 64bit with service pack 1 installed and all of my updates are current. Is anybody else having this problem with their apple devices?

    Try:
    - iOS: Not responding or does not turn on
    - Also try DFU mode after try recovery mode
    How to put iPod touch / iPhone into DFU mode « Karthik's scribblings
    - If not successful and you can't fully turn the iOS device fully off, let the battery fully drain. After charging for an least an hour try the above again.
    - If still not successful that usually indicates a hardware problem and an appointment at the Genius Bar of an Apple store is in order.

  • Does anyone know if Apple are planning on releasing a new version of the iPad in 2013? I want to buy one, but would rather wait to get the latest one if they are planning on a release of a newer version later this year.

    BEFORE JUST REJECTING MY QUERY, AS A POTENTIALLY NEW CUSTOMER I WOULD APPRECIATE SOME FORM OF AN ANSWER!!
    I want to buy an iPad (my first one), but would rather wait a couple of months to get the latest one if they are planning on a release of a newer version later this year. I certainly cannot afford to buy one now and then update when a newer model comes out, especially if it's released only a couple of months from now.

    The latest one came out just 4 months ago. Doubt one is coming out soon.
    There are always going to be people who are one day out of their return period when a new device comes out, and that's just that. No one can predict. And we are all just users here who would have no idea. But I would get an iPad now given the last one came out four months ago.

  • While installing the latest iTunes version I get the following msg:"Service Apple Mobile Device failed to start.Verify that you have sufficient privileges to start system services. I already tried it from the installer Running it as Administrator

    While installing the latest iTunes version I get the following msg:"Service Apple Mobile Device failed to start.Verify that you have sufficient privileges to start system services. I already tried it from the installer Running it as Administrator and still get the same message.  I click "ignore" and finish the installation but when I try to open it I get this "Runtime Error! R6034 An application has made an attempt to load the C runtime library incorrectly."  I already uninstalled iTunes and all other applications involved and re-installed itunes from the itunes site and the problem persists. Please help!

    Solving MSVCR80 issue and Windows iTunes install issues.

  • How can we get the Latest Resource Assigned in the Approval Form

    I was wondering if there is any way to get the Latest Assigned Resources to a User in my Approval Form.
    I tried this <ref>waveset.resourceAssignments</ref> but it returned all the Resources assigned to a User. While creating a User with Resource Assigned it won�t be problem. While Update when a User is assigned a Resource & it comes for Approval to the owner, all the Previously assigned resources shows up. How can I get only the Latest Resource Assigned.
    Can anyone provide some hints on this..

    idm_guy, if you could elaborate more on what you mean with latest resource assigned it would help - but there are a number of options (if i interprent you correctly to solvethis). My guess is that the easiest way would be to determine if:
    waveset.accounts[<iterate through resources>].created = true or false
    and if
    waveset.accounts[<resource>].lastPasswordUpdate = <last updated date>
    The latter is of course only applicable to resource where you set a password. This value will be updated whenever you set the password and could be a possible value to check against.
    If the account is not created yet but assigned it might be another possibility to check, but again - clairfy a bit about what you mean with "Latest Resource Assigned".
    /Anders

  • I have a mac  book pro that i bought in late 2009. My current software is snow leopard version 10.5.8. I would like to get the new lion operating system but I cant without first getting the latest version of snow leopard. it doesnt show on software updat

    I have a mac book pro that i bought in late 2009. My current software is snow leopard version 10.5.8. I would like to get the new lion operating system but I cant without first getting the latest version of snow leopard. however when I go to update my software it doesnt show that any update is available.

    10.5.8 is Leopard, not Snow Leopard. You need the Snow Leopard DVD;
    You can get it only by phone now from Apple.
    In the US, call 1-800-MY-APPLE and ask for a sales assistant. Last quoted price was $19.99 for the single-user and $29.99 for the family licence.
    For other countries, check here; http://support.apple.com/kb/HE57
    Don't forget to ask for Sales; the tech support guys can't help.
    If you want Lion, rather than Mountain Lion, the same Sales team can give you a download code to use at the Mac AppStore.
    To get the App Store, you need to update your new Snow Leopard from 10.6.3 (which is the version on the installer) to 10.6.8 with the combo update; http://support.apple.com/kb/DL1399
    Be warned that the upgrades will render a lot of older software unusable, and will need new drivers for printers and scanners in all likelihood.

  • I have a 4S and just tried updating to the latest iOS version and my phone went into recovery mode and iTunes says I need to restore to factory settings. Anyone know how I can fix my phone without losing all my content?

    I have a 4S and just tried updating to the latest iOS version and my phone went into recovery mode and iTunes says I need to restore to factory settings. Anyone know how I can fix my phone without losing all my content?

    You would only be able to restore to a backup to iCloud or iTunes:
    Restore from Backup
    Cheers,
    GB

  • How do I get my work from pages 08 to work on the latest pages version?

    how do I get my work from pages 08 to work on the latest pages version?

    Save to a USB what?  What USB device are you using?  Is it showing up on the desktop?

  • HT203167 I have just downloaded the latest itunes version (11.0.1). All my data cannot now be located, though the library is showing all the correct content.The data is stored on an external hard drive. How do I tell the library where to find it's data?

    I have just downloaded the latest itunes version (11.0.1). All my data cannot now be located, though the library is showing all the correct content.The data is stored on an external hard drive. How do I tell the library where to find it's data?

    The iTunes application should be installed on the system drive. You may need to repair iTunes to fix that error regarding a missing .exe.
    To organize your library properly see Make a split library portable.
    If you don't have a working version of the library that can be transformed into a portable shape I have tools and techniques that can repair the broken links.
    tt2

  • I can't get the latest version of iTunes 12.0.1 for Windows (64-bit) to work on my laptop.

    I can't get the latest version of iTunes 12.0.1 for Windows (64-bit) to work on my laptop. It says it has successfully downloaded and installed, but when I try to connect my new iPhone 6 to iTunes i get an error message 'need to install new software' but i thought i had! Please help me as i have had to connect my phone to someone else's mac and therefor don't have my music etc on my phone HELP!  I have had IT support at work trying to figure it out and no one can!

    For general advice see Troubleshooting issues with iTunes for Windows updates.
    The steps in the second box are a guide to removing everything related to iTunes and then rebuilding it which is often a good starting point unless the symptoms indicate a more specific approach. Review the other boxes and the list of support documents further down page in case one of them applies.
    Your library should be unaffected by these steps but there is backup and recovery advice elsewhere in the user tip.
    tt2

  • I just upgraded my iPhone 5s yesterday to the latest iOS version. Today, I can't get FaceBook to open at all on my phone. Any ideas?

    I just upgraded my iPhone 5s yesterday to the latest iOS version. Today, I can't get the facebook app on my phone to even open. Any ideas?  I already tried shutting the phone off and restarting, but it didn't change anything. Thanks for any suggestions that will help.

    Do you have the latest FaceBook app version installed?
    If so, try a reset which is similar to a computer restart and is done by pressing and holding the home button and the sleep/wake or on/off button simultaneously until you see the Apple logo and then release.

  • HT1923 I downloaded the latest iTunes version and now get the following error message: "This copy of iTunes is corrupted or is not installed correctly. Please re-install iTunes." Can anyone provide suggestions on what I should do next?

    I downloaded the latest iTunes version and now get the following error message: "This copy of iTunes is corrupted or is not installed correctly. Please re-install iTunes." Can anyone provide suggestions on what I should do next?

    Let's try a repair install of iTunes first.
    Restart the PC. If you're using Vista or 7, now head into your Uninstall a program control panel, select "iTunes" and then click "Repair". If you're using XP, head into your Add or Remove Programs control panel, select "iTunes", click "Change" and then click "Repair".
    Can you launch your iTunes now?

  • Why when I uncheck the McAfee box I am forced to download McAfee to get the latest version of Flash Player? What is the work around here?

    Why when I uncheck the McAfee box I am forced to download McAfee to get the latest version of Flash Player? What is the work around here?

    I received your PM.  Yes, the links have changed:
    Flash Player for ActiveX (Internet Explorer)
    Flash Player Plug-in (All other browsers)
    Flash Player for Mac OS X

Maybe you are looking for

  • RESTful Authentication to Service Bus for Windows Server - Multiple Scopes?

    We currently have a three-node farm set up and have tested authentication and sending/receiving messages to each node individually, with which we've had no issues.  However, we use NetScaler as a network load balancer, and once we configured NetScale

  • EMET 4.0 installation fails with error code 1720

    On many, but not all, of our systems (Server 2008 R2), installation of EMET 4.0 is failing. Here is an excerpt from the verbose MSI log: REM kill EMET Agent 4.0 process if running (re-installing scenario) strAppName = "emet_agent.exe" Set objProces M

  • A possible fix for the non-installing applications on the iPod touch

    Here's what martinlondon posted in another thread...it worked for me! Turn ON the auto sync in your music tab, and the applications seem to load! You might lose your manually managed music on the iPod, but I didn't as it wouldn't sync up my music as

  • Photo permission once in pc photo steram library

    Can anyone help me edit my photos once the've been saved onto my pc. they all save upside down and when I rotate them and try to save changes I get this error message and cannot alter the file permissions. "Windows photo viewer can't save the changes

  • The shutter on my Front Facing Camera won't open.

    It would open when I had it on the rear facing camera, but it freezes when I click to switch. And then when I try to open the camera app, the shutter won't open, I'm guessing because it's in front facing mode. And even when I Skype, the app freezes i