Cannot Submit for approval

Hi,
I have written an WDP Application which creates a resource in KM and subsequently <b>"Submits it for approval".</b>
Now the problem is, all the users can create the content, but only user having a <b>Content Management</b> role can perform the submit for approval action. I have given the content admin the application role. We can see the resource getting created in the KM folder for all the users. But only Content admin can submit.
I have given all the reqd. users the full control over the folders.
Now what could be the problem???!!!!!
Helpful answers will be rewarded
Thanks in advance
BP

Hi,
   We had to write this code. It's a button that allow you to submit a document and change acl permission.
Patricio.
public IRenderingEvent execute(IResource res, Event event) throws WcmException {
          if (event instanceof ConfirmEvent) {
               String pepe = "";
               ConfirmEvent cce = (ConfirmEvent) event;
               pepe += " a1 ";
               if (ConfirmEvent.CHOICE_YES.equals(cce.getChoice())) {
                    IRepositoryServiceFactory repositoryServiceFactory = ResourceFactory.getInstance().getServiceFactory();
                    IStatemanagementManager statemanagementManager =
                         (IStatemanagementManager) repositoryServiceFactory.getRepositoryService(res, IWcmConst.STATEMANAGEMENT_SERVICE);
                    IStatemanagementResource sResource = statemanagementManager.getStatemangementResource(res);
                    IResourceTransition resourceTransition = sResource.getTransition("lbl.submit");
                    if (resourceTransition != null) {
                         resourceTransition.execute();
                    try {
                         ISecurityManager sm = res.getRepositoryManager().getSecurityManager(res);
                         pepe += " a7 ";
                         if (sm != null && sm instanceof IAclSecurityManager) {
                              IAclSecurityManager asm = (IAclSecurityManager) sm;
                              IResourceAclManager ram = asm.getAclManager();
                              IResourceAcl ra = ram.getAcl(res);
                              if (ra == null) {
                                   IUMPrincipal administradores = WPUMFactory.getGroupFactory().getGroup("Loyal ISO Administrador");
                                   IUMPrincipal publicadores = WPUMFactory.getGroupFactory().getGroup("Loyal ISO Publicador");
                                   ra = ram.createAcl(res);
                                   ra.addOwner(administradores);
                                   ra.addOwner(publicadores);
                              IUMPrincipal everyone = WPUMFactory.getGroupFactory().getGroup("Everyone");
                              IResourceAclEntryList rel = ra.getEntries();
                              IResourceAclEntryListIterator it = rel.iterator();
                              while (it.hasNext()) {
                                   IResourceAclEntry entry = it.next();
                                   if (entry.getPrincipal().equals(everyone)) {
                                        ra.removeEntry(entry);
                    } catch (AclPersistenceException e) {
                         return new InfoEvent(Status.ERROR, "Error en el cambio de permisos");
                    } catch (ResourceException e) {
                         System.out.println("I raised a ResourceException " + e.getMessage());
                         return new InfoEvent(Status.ERROR, "Error en el recurso");
                    } catch (UserManagementException e) {
                         System.out.println("I raised a UserManagementException" + e.getMessage());
                         return new InfoEvent(Status.ERROR, "Error en el manejo de usuarios");
                    return new InfoEvent(Status.OK, "Done !");
               } else if (ConfirmEvent.CHOICE_NO.equals(cce.getChoice())) {
                    return ConfirmComponent.onNo(event, res.getContext().getLocale());
               } else if (ConfirmEvent.CHOICE_CANCEL.equals(cce.getChoice())) {
                    return ConfirmComponent.onCancel(event, res.getContext().getLocale());
          return new InfoEvent(Status.ABORT, "Aborted.");

Similar Messages

  • PSB- Worksheet cannot send for Approval

    Dear All,
    We are implementing Public Sector Budgeting module. When we create an worksheet and try to submit for the approval the submit worksheet is disabled.
    and if any one can differentiate wat is the difference between global worksheet and local worksheet.
    Some more doubts are
    - Is The approvals will go to notifiers available in budget group or review group notifiers
    - In worksheet line items cannot be visible. Even in parameter set i ve entered the line items..?
    Since this is an rare module which was implemented in metalink we can find less number of documents.
    Can any one can provide process document, BR 100, TE40 likewise..
    Regards
    Naveen.s

    Duplicate post -- Please post only once.
    PSB- Worksheet cannot send for Approval
    PSB- Worksheet cannot send for Approval

  • Repository Service for Auto Submit for Approval

    Hi all,
    Can anyone help me with the creation of a Repository Service to auto 'submit for approval' any document created.
    My main problem is in two methods:
    1) removeRepositoryAssignment(IRepositoryManager mgr)
      In some samples, I saw always this code line:
      mgr.getEventBroker().unregister(this, ResourceEvent.CREATE_CHILD);
      But in my project the unregister method doesn't have that parameters
    2) received(IEvent event)
      I need some help to know what code should I put
    The remaining steps, I think I can handle by myself.
    Many Thanks,
    Luis

    Hi,
    1) make sure you use com.sapportals.wcm.repository.manager.IRepositoryManager, use the JAR (bc.rf.framework_api.jar from the \usr\sap\XXX\JCXX\j2ee\cluster\serverX\apps\sap.com\irj\servlet_jsp\irj\root\WEB-INF\portal\portalapps\com.sap.netweaver.bc.rf\lib folder) from the portal you are willing to develop to make sure you have the actual libraries.
    2) in this method you have to catch the events that creates the resource (ResourceEvent.CREATE_CHILD) - later you will see, that you have to handle also the CHANGE events and so on. When you have the event, get the resource - for CREATE_CHILD it is
    event.getResource()
    Now you can handle the submit for approval by yourself.
    Romano

  • Submit for approval in KM - automatically?

    Hi guys!
    When I create document in folder, where Approval process is enabled , I have to click on "Submit for approval", when I want to send document for approval.
    Is it possible to send it for approval automatically? SO I create document and it is automatically sent to approvers inbox..
    Thanx for answer!
    Peter

    Peter,
    I think without coding no way.
    You can create a repository service which will listen to events like <b>ResourceEvent.CREATE_CHILD</b>. When the event is caught the repository service will submit the resource for approval. For more info about repository services just search the SDN (or let me know).
    Romano
    PS: does my reply to this <a href="https://www.sdn.sap.com/irj/sdn/thread?threadID=261413">Thread: mailto link wanted in XML form app</a> helped? If so, please close it - it will help others in searching for answers to their questions...

  • Skipping ' submit for Approval '

    Hi ,
    I am setting up a document workflow process in KM . I have a requirement as follows ..
    Once a document is uploaded into the folder ( which is assigned with set of approval steps and
    users ) , I need to send all the documents in that folder  for approval process with out Approver admin manually clicking ' submit for Approval ' button . Is this possible by configuration or we need to write some extra code .
    Any help is appreaciated .
    Thanks
    Aneez

    Hi Aneez,
    yes you will need to write some extra code. The concept would be like that:
    1. you will have to implement an eventlistener which will be called, if a document is created or uploaded.
    2. this event listener has to call the API of the statemanagement service in order to submit the document.
    3. For each repository of interst, you can register your event listener using the getEventBroker method.
    There you have to specify the events, you are intersted in.
    Details:
    1. class MyEventListerner implements IEventReceiver{
    private static IResourceEvent CREATE_CHILD_EVENT = new ResourceEvent(ResourceEvent.CREATE_CHILD, null);
      public void received(IEvent event) {
        event.isLike(CREATE_CHILD_EVENT)) {
          IResource resource = (IResource)event.getParameter();
       this.submitResource(resource);
       private void submitResource(IResource resource){
         // get the statemanagement service from the resource
          IRepositoryServiceFactory factory = ResourceFactory.getInstance().getServiceFactory();
    IStatemanagementManager statemanagement =
          (IStatemanagementManager)factory.getRepositoryService(resource, IWcmConst.STATEMANAGEMENT_SERVICE);
    IStatemanagementResource sResource =
    statemanagement.getStatemangementResource(resource)
    IResourceTransition transition = sResource.getTransition("lbl.submit")
    // if everything is correct than transition is not null
    if (transition != null) transition.execute();   
    Please keep in mind, that this is only a scatch how it may work. You have to ensure, that the statemanagement is enabled for the parent folder of the resource. Otherwise, the transition may be null or not executable.
    I hope this helps.
    regards
    Andreas

  • Error at submit for approval in partner program

    Hi All,
    I am created the partner program in r12 and when i click the submit for approval i receive this error
    Start :Item Type : AMSGAPP Item key : CONCEPTPRGT140282
    Invalid Workflow Role for Approver
    send me the solution for it as soon as possible
    Thanks
    Edited by: user12235518 on Mar 8, 2012 4:36 AM

    user12235518 wrote:
    Hi All,
    I am created the partner program in r12 and when i click the submit for approval i receive this error
    Start :Item Type : AMSGAPP Item key : CONCEPTPRGT140282
    Invalid Workflow Role for Approver
    send me the solution for it as soon as possiblePlease see if these docs help.
    Budget Allocation or Offer Approval Error: "Invalid Workflow Role for Approver" [ID 414053.1]
    Invalid Workflow Role For Approver Error When Trying To Approve A Deliverable In Marketing [ID 181484.1]
    Unable To Approve Quota With Error : AMSGAPP Invalid Workflow Role for Approver [ID 422910.1]
    Error when Generating Invite List of Oneoff Event [ID 266349.1]
    Errors Occuring During Claim Approval [ID 1361361.1]
    Thanks,
    Hussein

  • Submit for Approval throws error

    Hi Experts,
    we are facing a strange error with the approval workflow. Once the user select "submit for approval" from Details the following error is displayed.
    Could not execute command 'com.sapportals.wcm.rendering.uicommand.cm.UIStatemanagementCommand'
    Somebody knows how this problem occurs and can be fixed?
    Thanks and Regards,
    Ingo Taraske

    Hi Ingo
    Also do check the monotoring section for KM Components and in the "System Configuration" for KM, if you see any warning or error message while navigating in Global Services or User Interfaces or some other section, sometimes it could have also lead to error if it related to "Submit for appoval" action.
    As Rafael said, hot deployment of KM components is mostly the reason for this. System restart is the best options if above suggestions already hold good.
    Thanks
    Deepak

  • Submit for Approval in XML Forms

    Hi Experts,
        I have created a News Application using XML Form Builder.  Once I create any news based on this form builder, I need to submit this news item for approval.  I have configured the approval process for that particular KM Folder.
        I need submit for approval option in News Explorer/News Admin iView.  How can I achieve this?  Do, I need to change the layout set properties or in XML Form Builder application itself.
       Help me in this regard.
    Thanks & Regards,
    Art

    Hi Art,
    > Do I need to change the layout set properties or in XML Form Builder application itself.
    You should extend the command set used on the resource renderer (the resource renderer is defined in the layout set), using the approval command group, I don't know the exact name, but it will be something with "approval" or "statemanagement" in it...
    Hope it helps
    Detlev

  • Api call for 'submit for approval'

    would like to be able to use the content management event system to watch for incoming files. when a new file comes in i want to set some attributes based on the payload before it is submitted for approval. i am having problems finding the proper procedure to automatically submit the file for approval once i set the attribute values (which must be done while the file is in draft mode)
    is that possible?

    If the target node for your operation is a sibling, I believe you're going to have to pass the parent node of the sibling into the AddNode() API call when this operation occurs within a version. Note that copyNodesAcrossVersions is a new method that has a copyAsSibling parameter, but AddNode() does not.
    Edited by: Naren Truelove on Nov 12, 2012 3:12 PM
    ...grammatical correction...

  • Api for 'submit for approval'

    I would like to be able to use the content management event system to watch for incoming files. when a new file comes in i want to set some attributes based on the payload before it is submitted for approval. i am having problems finding the proper procedure to automatically submit the file for approval once i set the attribute values (which must be done while the file is in draft mode)
    is that possible?

    sorry. i posted this in the wrong forum.

  • Error  in Km when submit for approval.

    Hi
    In Km once in a while we are having error when we submit a document to be approval. If I restart the application, the error will disappear. This is the error log I receive when I submit. Anybody have an idea.
    Thank you
    Could not create command with alias com.sapportals.wcm.rendering.uicommand.cm.UIStatemanagementCommand and classname com.sapportals.wcm.rendering.uicommand.cm.UIStatemanagementCommand:java.lang.NullPointerException
         at com.sapportals.wcm.rendering.uicommand.UICommandFactory.getTextAttributesForCommand(UICommandFactory.java:1272)
         at com.sapportals.wcm.rendering.uicommand.UICommandFactory.setPropertiesForCommand(UICommandFactory.java:372)
         at com.sapportals.wcm.rendering.uicommand.UICommandFactory.createExecCommand(UICommandFactory.java:421)
         at com.sapportals.wcm.rendering.uicommand.UICommandFactory.decodeTargetCommand(UICommandFactory.java:620)
         at com.sapportals.wcm.rendering.control.cm.MenuBarControl.onExecute(MenuBarControl.java:319)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at com.sapportals.wdf.stack.Control.dispatchHtmlbEvent(Control.java:386)
         at com.sapportals.wdf.WdfEventDispatcher.dispatch(WdfEventDispatcher.java:176)
         at com.sapportals.wdf.WdfCompositeController.onWdfEvent(WdfCompositeController.java:539)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:324)
         at com.sapportals.htmlb.page.DynPage.doProcessCompositeEvent(DynPage.java:204)
         at com.sapportals.htmlb.page.DynPage.doProcessCurrentEvent(DynPage.java:142)
         at com.sapportals.htmlb.page.PageProcessor.handleRequest(PageProcessor.java:115)
         at com.sapportals.portal.htmlb.page.PageProcessorComponent.doContent(PageProcessorComponent.java:134)
         at com.sapportals.wcm.portal.component.base.ControllerComponent.doContent(ControllerComponent.java:77)
         at com.sapportals.portal.prt.component.AbstractPortalComponent.serviceDeprecated(AbstractPortalComponent.java:209)
         at com.sapportals.portal.prt.component.AbstractPortalComponent.service(AbstractPortalComponent.java:114)
         at com.sapportals.portal.prt.core.PortalRequestManager.callPortalComponent(PortalRequestManager.java:328)
         at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:136)
         at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:189)
         at com.sapportals.portal.prt.component.PortalComponentResponse.include(PortalComponentResponse.java:215)
         at com.sapportals.portal.prt.pom.PortalNode.service(PortalNode.java:645)
         at com.sapportals.portal.prt.core.PortalRequestManager.callPortalComponent(PortalRequestManager.java:328)
         at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:136)
         at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:189)
         at com.sapportals.portal.prt.core.PortalRequestManager.runRequestCycle(PortalRequestManager.java:753)
         at com.sapportals.portal.prt.connection.ServletConnection.handleRequest(ServletConnection.java:240)
         at com.sapportals.portal.prt.dispatcher.Dispatcher$doService.run(Dispatcher.java:522)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sapportals.portal.prt.dispatcher.Dispatcher.service(Dispatcher.java:405)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.servlet.InvokerServlet.service(InvokerServlet.java:156)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:401)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:266)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:387)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:365)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:944)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:266)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:160)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
         at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)

    Hi Luc,
    I'm having this same problem in our company.
    Our version is also NW2004s SPS11.
    Do you still remember what patch you applied to make it work?
    It'd be very useful!
    Kind regards,
    Simone
    Message was edited by:
            Simone Teshirogui

  • History for approval process

    Hi out there,
    Is it possible to see the approval history of a document?
    For example:
    File test.txt
    - 05/10/08 file created by Mr.X
    - 05/11/08 submit for approval by Mr.X
    - 05/12/08 rejected by Mr.Y in step1
    - 05/13/08 submit for approval by Mr.X
    - 05/14/08 approved by Mr.Y in step 1
    - 05/15/08 approved by Mr.Y in step 2
    Best regards,
    Manuel

    Hi,
    There is no standard tool to check this information.
    I would suggest that you write your own portal component to achieve this.
    Look into KM API's to do this:
    http://help.sap.com/javadocs/NW04S/current/km/index.html
    Here you see how to access IStatemanagementUtilsResource object of each KM File (method createFolderStmgUtilsResource).
    https://forums.sdn.sap.com/thread.jspa?threadID=839022
    The IStatemanagementUtilsResource class has some helper methods to get infos on the state of the document.
    The information "05/10/08 file created by Mr.X " is just a property on the document, so just read the property from km document (KM Property is createdby):
    https://forums.sdn.sap.com/thread.jspa?threadID=293704
    Regards,
    Praveen Gudapati

  • Withdraw item submitted for approval

    Is there a way for submitter to withdraw item that has been submitted for approval in Portal?
    Thanks,
    Gary

    hi,
    I am using Portal 10.1.2.
    It seems that there is no mechanism to retreat the newly added or modified contents as the "submit for approval" is automatic.
    Anyone who can tell us the solutions?
    How about Portal 10.1.4 ? Are there any new feature in this version to address the problem we are facing?
    thanks
    George (HK)

  • Hi,When I submit the budget for approval, it is approved and base lined when we submit it for approval. It does not go in approval hierarchy. We want it to flow through approval hierarchy.

    Hi,When I submit the budget for approval, it is approved and base lined when we submit it for approval. It does not go in approval hierarchy. We want it to flow through approval hierarchy.

    Hi Amit,
    if I understand correctly, you just need for a particular object a tooltip to be showed.
    There is no such functionality hence you used the trick of using a hyperlink, which if clicked generates undesired behavior.
    Hyperlinks don't allow themselves to be disabled, therefore if you are using that workaround you must cope with that.
    I would suggest to create an Idea at [https://ideas.sap.com] for having in the properties of an object a tooltip, then post the link to the idea here and other users will vote if they like the idea.
    Thanks and regards,
    Simone

  • Cannot submit datapipe for urb 0, error -28: not enough bandwidth

    cannot submit datapipe for urb 0, error -28: not enough bandwidth
    What is causing this?
    I read something about disabling the following:
    :[ ] Enforce USB bandwidth allocation (EXPERIMENTAL)
    :[ ] Dynamic USB minor allocation (EXPERIMENTAL)
    But I feel that recompiling the kernel and changing in there is a bit out of my league but if it's the only solution there is I guess I have no choice.
    Anyways, I was hoping someone here maybe has seen this issue and know how to solve it.

    I don't think so. I remember for certain patchsets on Solaris (Sparc), to be able to apply the patchset - I had to download an interim patch to update the OUI version. It was necessary to apply that particular patchset. And I got that from Metalink, it was documented in the patchset help file. I guess, you should try the Metalink. The OUI version 10.1.0.4 I was referring to actually comes with iAS 10g R2. For the database version, 10g R2 - OUI version is 10.2.
    Message was edited by:
    zaferaktan

Maybe you are looking for

  • How to format external drive for mac AND pc use

    hi i want to format my external drive so i can use it on my mac and on pc's as well. i've gathered that the MS-DOS format is the way to go. my question is this: would this create any problems for my mac then? can i partion one part for ms-dos and par

  • Studio export/import button not working.

    To import existing lar file into studio do I need to configure anything ? I'm not able to use the export/import even when logged in as admin?

  • Open application in a frame

    how can i open an application like for example notepad or windows media player inside a internal frame on say a click of a button? My swing application has a requirement where an application has to be opened inside it.

  • Execute external application from Web UI

    Hello, I have some problems executing an EXE file program with some command line options from the CRM 7.0 Web UI. What I have tried is adding a new navigation button. When I press this button a BSP component is launched. This new BSP component can be

  • Can i safely delete the indexedDB folder from profile? 3gb+ is alot

    saving a backup of profile and discovered 3gb folder indexedDB was wondering if its safe to delete...or what it is even for.