Problem with "lbl.publish" transition  when skip approval programmatically

Hi all ...
I am currently trying to "Skip Approval" programmatically by executing the "lbl.publish" transition, like this in a KM repository service:
IRepositoryServiceFactory repositoryServiceFactory =
   ResourceFactory.getInstance().getServiceFactory();
IStatemanagementManager statemanagementManager =
    (IStatemanagementManager) repositoryServiceFactory.getRepositoryService(resource, IWcmConst.STATEMANAGEMENT_SERVICE);
IStatemanagementResource sResource =
     statemanagementManager.getStatemangementResource(resource);
IResourceTransition resourceTransition =
     sResource.getTransition("lbl.publish");
if (resourceTransition != null)
    resourceTransition.execute();                                   
But this do not work, and instead raise this ExecMessage: <b>"You are not allowed to carry out this action"</b>
Please Help
Best regards
Jonathan

Thank you Ankur...
Your tip solved my problem; I already reward you with 10 points!!
Best Regards
Jonathan.

Similar Messages

Maybe you are looking for

  • Upgrade macromedia captivate 1 to captivate 5

    hello, I have version macromedia captivate 1 and I want to upgrade to captivate 5. Is it possible? Thank you.

  • Logon language Hindi

    Hi Gurus, I have strange requirement. I need to show the screen shots of particular tocde output in hindi. Can you please guide me how to see the output in Hindi language.

  • Only last pm_order operation in 0PM_DS04_Q0021 query?

    Hi Experts, When I execute query 0PM_DS04_Q0021 - Outstanding Order List,which runs over the DSO 0PM_DS04 - Maintenance Orders, Operations and Costs, I expect to have actual and planned time by order, but for all operations that occur in that PM orde

  • Workflow Design

    Hi How to find an image attached with the FI Invoice document. Any method/function module that specifies whether a document is attached with the FI document or not. If not the WF should not start or should prompt an error message. There is no event t

  • WL6.0 Multi developer install on Solaris

    Hi, I have installed WL6.0 on a solaris m/c in a common directory logged in as root. Everything works fine when I run the WL server as root. But, I would like to run the WL server as an ordinary user from my home directory. So, I copy the config dire