Skip to Content
author's profile photo Former Member
Former Member

Problem with Automatic submission for approval

Hi Folks,

I have to start automatic submit for approval for a folder in km. I am trying to do this with Statemanagement API. Below is the code -

IResourceFactory resFactory = ResourceFactory.getInstance();
IRepositoryServiceFactory repServiceFactory = resFactory.getServiceFactory();
IStatemanagementManager stateMgr = (IStatemanagementManager) repServiceFactory.getRepositoryService(resource.getRepositoryManager(), IWcmConst.STATEMANAGEMENT_SERVICE);		
IStatemanagementResource statRsrc = stateMgr.getStatemangementResource(resource);
IStatemanagementUtilsResource statRsrcUtils = statRsrc.getUtils();

IResourceTransition transition = statRsrc.getTransition("lbl.submit");
if (transition != null)						
        transition.execute();

I guess that this code is correct but its not running, when I checked the results, I got to know that I am not able to execute tha transition. Its giving the message like -

You are not allowed to carry out this action

Also the Statamanagement service is enabled for documents folder.

Kindly suggest the solution.

Regards,

SM

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Dec 15, 2008 at 02:36 PM

    Hi,

    can you send me the exact message it outputs?

    Best,

    --epexpert

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.