Repository service for counting downloaded documents

Hi, 
    I want to write a repository Service for counting downloaded documents.
In addRepositoryAssignment method, for which resource event type I have to register.
(i.e)
  mgr.getEventBroker().register(this, ResourceEvent.??);
or any other way to do this.
Regards
Ganesan S

Hi Ganesan,
Seems you have an index on the resources.
I had a look into the repository service implementation on the blog. THis is what could be the reason:
In <b>received</b> method you catch the GET resourceEvent (<b>first</b> hit). Then you get the resource in question and change/increment the property on this resource. For TREX in fact you change the resource. The event is catched by the IndexService and the TREX asks the CM for the document (<b>second</b> hit).
I would suggest to store the hitcount in an Application property (this does not change the resource and fires no ResourceEvents) as here (could be some compilation errors - I haven't tested it but it should work):
public void received(IEvent event) {
  IResourceEvent myEvent = (IResourceEvent) event;
  try {
    IResource res = myEvent.getResource();
    // get the app property service
    IRepositoryService repositoryService = repServiceFactory.getRepositoryService(res, IWcmConst.APP_PROPERTIES_SERVICE);
    IApplicationProperties aApplicationProperty = (IApplicationProperties) repositoryService;
    /// app property name
    PropertyName propertyNameHitCount = new PropertyName("http://sapportals.com/xmlns/cm","hitscount");
    //get the old value...
    IAppProperty hitcountOld = aApplicationProperty.getProperty(propertyNameHitCount, res);
    long hitcount_l = 0;
    if(hitcountOld!=null)  {
      hitcount_l = hitcountOld.getLongValue().longValue();
    hitcount_l++;
    // set the new value...
    AppProperty aAppProperty = new AppProperty(propertyNameHitCount, new Long(hitcount_l), null, true);
    aApplicationProperty.setProperty(aAppProperty, res);
  } catch (Exception e) {
    e.printStackTrace();
I hope Detlev is ok with my solution
Romano

Similar Messages

  • KM Repository Service for creating a folder structure

    Hi All,
       We have a requirement in KM. Whenever a folder is created inside a folder (say '/documents/testFolder') ... .. a couple of subFolders need to be created inside this new folder.
    For example, if the new folder's name being created is <i>parentFolder1</i> then, the following structure shud be created inside this folder.
    parentFolder1
      |--> subFolder1
                 |--> subFolder11
                 |--> subFolder12
      |--> subFolder2
                 |--> subFolder21
    I tried to implement a KM repository service::
    My Rep Service code::
    package com.test;
    import java.util.Collection;
    import java.util.Iterator;
    import com.sap.tc.logging.Location;
    import com.sapportals.config.fwk.CannotAccessConfigException;
    import com.sapportals.config.fwk.Configuration;
    import com.sapportals.config.fwk.IConfigClientContext;
    import com.sapportals.config.fwk.IConfigManager;
    import com.sapportals.config.fwk.IConfigPlugin;
    import com.sapportals.config.fwk.IMutableConfigurable;
    import com.sapportals.config.fwk.InitialConfigException;
    import com.sapportals.portal.security.usermanagement.UserManagementException;
    import com.sapportals.wcm.WcmException;
    import com.sapportals.wcm.crt.component.IReconfigurable;
    import com.sapportals.wcm.crt.component.StartupException;
    import com.sapportals.wcm.crt.configuration.ConfigurationException;
    import com.sapportals.wcm.crt.configuration.IConfiguration;
    import com.sapportals.wcm.repository.AccessDeniedException;
    import com.sapportals.wcm.repository.ICollection;
    import com.sapportals.wcm.repository.IResource;
    import com.sapportals.wcm.repository.NotSupportedException;
    import com.sapportals.wcm.repository.Property;
    import com.sapportals.wcm.repository.ResourceException;
    import com.sapportals.wcm.repository.manager.IRepositoryManager;
    import com.sapportals.wcm.repository.manager.IResourceEvent;
    import com.sapportals.wcm.repository.manager.IResourceEventReceiver;
    import com.sapportals.wcm.repository.manager.ResourceEvent;
    import com.sapportals.wcm.repository.service.AbstractRepositoryService;
    import com.sapportals.wcm.repository.service.ServiceNotAvailableException;
    import com.sapportals.wcm.util.config.ConfigCrutch;
    import com.sapportals.wcm.util.events.IEvent;
    // implements IMyNewRepositoryService interface
      Note: IReconfigurable and IResourceEventReceiver interfaces are optional
    public class MytestRepositoryService extends AbstractRepositoryService implements IReconfigurable, IResourceEventReceiver {
      private static final String TYPE = "com.test.MytestRepositoryService";
      private Collection repositoryManagers;
      private static final Location log = Location.getLocation(MytestRepositoryService.class);
      //variables
           private static final String PLUGIN_FOLDERCREATION_SERVICE = "/cm/repository_services";
           private static final String CONFIGCLASS_FOLDERCREATION_SERVICE = "com.test.MytestRepositoryService";
           private static final String readPlugins[] = { PLUGIN_FOLDERCREATION_SERVICE };
    public static final String PROP_MYFOLDER = "myFolder";
      public MytestRepositoryService() {
        super();
        // Do not add code here. Add it to startUpImpl() instead
      public String getServiceType() {
        return MytestRepositoryService.TYPE;
      protected void startUpImpl(Collection repositoryManagers) throws ConfigurationException, StartupException {
        // implement this method as follows:
        // - Verify configuration data
        // - Get references to other needed (global) services
        // - Check whether other repository services (this service depends on) are also assigned to the repository managers
        // - Usually the service registers itself for certain events at all repository managers
        try  {
        catch (Exception e) {
          throw new StartupException(e.getMessage(), e);
         this.repositoryManagers = repositoryManagers;
         Iterator it = repositoryManagers.iterator();
         while (it.hasNext()){
           try {
              addRepositoryAssignment((IRepositoryManager) it.next());
           } catch (ServiceNotAvailableException e) {
              e.printStackTrace();
      protected void shutDownImpl() {
         Iterator it = repositoryManagers.iterator();
         while (it.hasNext()){
           try {
              removeRepositoryAssignment((IRepositoryManager) it.next());
           } catch (WcmException e) {
              e.printStackTrace();
      protected void addRepositoryAssignment(IRepositoryManager mgr) throws ServiceNotAvailableException {
        // Implement this method: Usually the service registers itself for certain events at the repository manager.
         try {
    //       mgr.getEventBroker().register(this, ResourceEvent.ALL_TEMPLATE);
           mgr.getEventBroker().register(this, new ResourceEvent(ResourceEvent.CREATE_COLLECTION, null));
         } catch (WcmException e) {
           e.printStackTrace();
      protected void removeRepositoryAssignment(IRepositoryManager mgr) throws WcmException {
        // Implement this method: Usually the service must unregister itself as an event handler.
    //     mgr.getEventBroker().unregister(this, ResourceEvent.ALL_TEMPLATE);
         mgr.getEventBroker().unregister(this, new ResourceEvent(ResourceEvent.CREATE_COLLECTION, null));
      public void reconfigure(IConfiguration config) throws ConfigurationException {
        this.stateHandler.preReconfigure();
        // check the new configuration data
        try {
        catch (ConfigurationException ex) {
          this.stateHandler.postReconfigure(ex);
          throw ex;
        this.config = config;
        this.stateHandler.postReconfigure();
      public void received(IEvent event) {
         IResourceEvent myEvent = (IResourceEvent) event;
         IResource resource = (IResource) myEvent.getParameter();
         String repositoryPath = "";
         String parentPath = "";
                //get the configuration...
                try {
                       IConfigClientContext context = IConfigClientContext.createContext(ConfigCrutch.getConfigServiceUser());
                     IConfigManager cfg = Configuration.getInstance().getConfigManager(context);
                     IConfigPlugin configPlugin = cfg.getConfigPlugin(PLUGIN_FOLDERCREATION_SERVICE);
                     if (configPlugin != null) {
                          IMutableConfigurable[] configurables = configPlugin.getConfigurables(CONFIGCLASS_FOLDERCREATION_SERVICE, false);
                          for (int i = 0; i < configurables.length; i++) {
                               IMutableConfigurable configurable = configurables<i>;
                               if (configurable.getConfigClass().getName().equals(CONFIGCLASS_FOLDERCREATION_SERVICE)) {
                                    // now get the attribute value...
                                    repositoryPath = configurable.getPropertyValue(PROP_MYFOLDER);  //// "documents/parentFolder1"
              } catch (InitialConfigException e2) {
                   e2.printStackTrace();
              } catch (CannotAccessConfigException e2) {
                   e2.printStackTrace();
              } catch (UserManagementException e2) {
                   e2.printStackTrace();
              try {
                   parentPath = resource.getParentCollection().getRID().toString();
              } catch (AccessDeniedException e1) {
                   e1.printStackTrace();
              } catch (ResourceException e1) {
                   e1.printStackTrace();
              if(repositoryPath.equals(parentPath))
                   //write my code here
                   if (resource != null && (resource.isCollection()) )
                        ICollection parentFolder = (ICollection) resource;
                        try {
                             <b>parentFolder.createCollection("subFolder1",null);</b>
                        } catch (NotSupportedException e) {
                             e.printStackTrace();
                        } catch (AccessDeniedException e) {
                             e.printStackTrace();
                        } catch (ResourceException e) {
                             e.printStackTrace();
    <b>...MytestRepositoryService.co.xml:</b>
    - <Configurable configclass="com.test.MytestRepositoryService">
      <property name="name" value="com.test.MytestRepositoryService" />
      <property name="active" value="true" />
    <i>  <property name="myFolder" value="/documents/parentFolder1" /></i>
      <property name="description" />
      </Configurable>
    <b>...MytestRepositoryService.cc.xml:</b>
    - <ConfigClass name="com.test.MytestRepositoryService" extends="RepositoryService">
      <attribute name="class" type="class" constant="com.test.MytestRepositoryService" />
      </ConfigClass>
    Have i done it right?? Where am i going wrong??? Plz advice.
    I need to 'myFolder' as a configurable property in KM's <i>Content Management --> Repository Services</i> section.
    Thanks!
    Regards,
    SK.

    Hi,
    I haven't check your code but you know that you can archive the same without writing a portal componente by using the template feature. It is a simple customizing. See http://help.sap.com/saphelp_nw70/helpdata/en/55/83bd402b8d8031e10000000a1550b0/frameset.htm
    Best Regards
    Frank

  • 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

  • Services for Object: attached documents/ links cannot be deleted

    Dear SAPfriends,
    The deletion button at the attachment list of "Services for Object" does not work. Eventhough it seems that the documents/ links/ notes have been removed from the object (i.e. Purchase order, material etc), when you exit and re-enter at the attachment list the documents are still there.
    I tried to delete them from OAER, still the same.
    Any ideas?
    Yr help will be very valuable.
    Kind Regards,
    Elly Leondi

    Hello Mauro,
    Thanks for yr reply.
    That was the problem.
    Thanks again.
    Regards,
    Elly

  • Show latest Documents in NewsIview with Repository Service

    Hello together,
    I have created a NewsIView and always if a document is uploading a repository service should copie the document in the folder the NewsIview listen to.
    How I can create a Link or Content that could be shown in the News Iview in the following way:
    New Documents are available: Link to the Document.
    In the NewsIview are manually News shown, that are created with the XMLFormsBuilder and in the Form Based Publish -Format.
    How I can create this format to show a Link to the uploaded Document in the NewsIview?Have I create such a format to display the documents in the News??
    The Repository Service is already running and copies the documents....
    Hope for Help Theresa

    In our KM many documents were uploaded via WebService in different folders.
    Now the Repository Service should copy the latest documents in the folder the NewsIview listen to.
    That documents should shown to the End User the way...New documents: Link to the documents (Link points to the KM folder the NewsIview listen to...)
    But for displaying the documents, that were uploaded with the WebService i need to convert the documents to the form based publishing format.
    The enduser should see the manually news, created by the administrator and the latest documents, uploaded by the webservice. Can you follow me??
    We have no trex this is why we tried to implement a repository service.
    Very much thanks for your efforts!
    Regards Theresa
    Edited by: Theresa Wilfer on Oct 27, 2008 12:33 PM

  • Peformance Turning for File Download / Upload with Enabled SharePoint Audit

    Greetings all, may I ask your help for Peformance Issues?
    Background:
    I tried to create a ASP.NET Web Page to download/upload/list SharePoint file and deployed to IIS website in same application server (will NOT use web part as some users are NOT allowed to direct access confidential workspace)
    Besides, for Audit Log record purpose, the page will impersonate (without password) the logged in user:
    SPUserToken userToken = web.AllUsers[user].UserToken;
    SPSite s = new SPSite(siteStr, userToken);
    For File Listing, the web service can provide fast response, and we are using service A/C for connection (as no auting for listing, but require audit for file download upload)
    Several implemeation options tested for File Downloiad / Upload, but issues occured and finding listed below:
    Issues
    1) SharePoint Object Model
    When I open Site (using new SPSite), it's too slow to respond. (under 1s for all operations, but require 10~50s for open SPSIte. e.g.
    using(SPSite s = new SPSite(siteStr) //50s
    How can I download/upload file without open SPSite object (using SharePoint object model, but user token should be kept to allow SHarePoint identifiy user actions. e.g. Updated by Tom, NOT system administrator)?
    2) SharePoint default web service
    For file download, I tried to use SharePoint Web Service for download file, it's quick but how can SharePoint record the audit log to downloaded user, and not service A/C? ( e.g. View by Tom, NOT system administrator)
    With Windows SSO solution, please note system should NOT prompt to ask user password for use impersonation
    3) HTTP Request API (for file download)
    As mentioned in point 2, if the system cannot get password from user, SharePoint also recorded service A/C in audit log... ><
    Thank you for your kine attention.
    .NET Beginner 3.5

    Thank you for prompt response, please find my reply with Underline:
    Hi,
    Maybe I'm not quite clear about the architecture you have now.
    Is your asp.net application deployed in separate IIS site but in the same physical server as SharePoint?
    Yes
    "we are using service A/C for connection", can you please explain the 'A/C'?
    Domain User, Local Admin and also SharePoint Service Admin A/C
    Opening SPSite is relatively slower but shouldn't take 50 sec. However it depends on your server hardware configuration. You should meet the minimum hardware requirements for SharePoint.
    Assigned double resources based on minimum hardware requirements.
    For details, 50s is the load test result. But for other SharePoint operation, it takes around/under 3s reponse time.
    Are you using SharePoint Audit log? Exactly If so then why don't you just put the hyperlink to the documents in your asp.net page. User maybe have to login once in SharePoint site but
    it depends on your security architecture. For example if both of your sites in local intranet and you are using windows integrated authentication, SSO will work automatically  User is NOT allowed
    to access SharePoint site/server (not implemented for sepreate server yet, as performance issues occured for
    separate site in same server)  directly from Internet, the
    middle server with web interface created for user request.
    Whatever I understands gives me the feeling that you download the file using HTTPWebRequest C# class. However regarding security it depends on how authentication is setup in asp.net web site and in sharepoint. If both site uses windows integrated security
    and they are in the same server, you can use the following code snippet:
    using (WebClient webClient = new WebClient())
    webClient.Credentials = System.Net.CredentialCache.DefaultNetworkCredentials;
    webClient.DownloadFile("file ur in sharepoint", "download directory");
    Thanks, will try and reply later
    But still, as I've mentioned, not quite clear about the whole architecture.
    A) Request Handling
    1) User use browser to request file listing and/or download file (hereafter called: File Download Request) from custom ASP.NET page (Let's say In Server 1, IIS 1)
    2) ASP.NET page  or File Handler ashx (Server 1, IIS 1) call custom web service, SharePoint deault/OOTB web service or using SharePoint Object Model to access SharePoint Document Library (in Server 1,
    IIS 2)
    3) Both SharePoint and IIS Web Site
    (Server 1, IIS 1 & IIS2) using the same service A/C
    4) The web service , File Handler return file obeject to IIS1
    5) IIS 1 reply File Download Request to user
    B) Application Architecture (In testing environment)
    1) no load balancing
    2) 1 DB server (Server 2)
    3) 1 Application Server (with IIS 1 - ASP.NET, IIS 2, SharePoint Web Site with default SharePoint Web Service, IIS 3 SharePoint Admin Site & IIS 4 Custom SharePoint Web Service)
    4) Sepreate AD Server (Server 3)
    Thanks,
    Sohel Rana
    http://ranaictiu-technicalblog.blogspot.com
    .NET Beginner 3.5

  • Repository Services - Time based publishing missing

    Hi,
    We are running NW07, and want to configure time based publishing.
    I can't find the Repository Services for this it is suppose to be under
    System administratoin -> Content Management -> Repository Services
    But it is not,
    can anyone help?

    After that, you have to define the real lifetime
    http://help.sap.com/saphelp_nw70/helpdata/en/e8/a9a76828b8dc469969ff450ec81ced/frameset.htm
    An keep in mind that only users with not more than read permissions will see the document only during its lifetime. Users with write additional permissions can always see it
    Kind regards
    Karin

  • Workbook precalculation service for 2004s

    Anyone have a link to Workbook precalculation service for 2004s download. I found a link in SAP Marketplace for BW 3.5 but not for BI. Is there a separate download for BI or can I use the one for BW 3.5?

    Hello Manoj,
    Thanks for pointing to the correct version of Services.
    I tried with the latest version of Services but nothing changed except the error message.
    The error message while running from IB I get the error message, Precalculation failed: E  The process cannot access the file "C:\WINDOWS\TEM
    Cannot precalculate workbook ZNW20004S_PRECALC
    and
    While running the same from IBTCODE 'RSPRECADMIN' , I receive the document but its an empty document.
    Any clue, whats wrong ?
    Regards,
    Ajay

  • CM Repository stops after assigning custom repository service

    Dear all,
    I have created a repository service which sets the document creator as the permission owner of the document.
    This service is deployed in DEV & QA systems and is working fine. But when I moved the same to Production and assigned this service to the documents repository, it started giving error (before the restart itself)
    I am getting the following error.
    Item not found
    /documents
    The item you are attempting to access is not available. Check that the name or link is correct. You might also check whether the associated repository is currently accessible.
    Note: Our production & QA systems have 2 server nodes and DEV has only one server node. We are on EP 7.0 SP 16.
    Please help!
    Best Regards,
    Aparnna

    Hi Yoga,
    The error from the default trace is given below
    Due to this error we removed the Par from Portal now. Isn't there a solution for this?
    unexpected exception - java.lang.NullPointerException
    at com.sapportals.wcm.repository.manager.cm.CmRepositoryManager.getResource(CmRepositoryManager.java:995)
    at com.sapportals.wcm.repository.RMAdapter.getResource(RMAdapter.java:228)
    at com.sapportals.wcm.repository.runtime.CmAdapter.findResource(CmAdapter.java:1349)
    at com.sapportals.wcm.repository.runtime.CmAdapter.findManagerAndResource(CmAdapter.java:1322)
    at com.sapportals.wcm.repository.runtime.CmAdapter.getResourceImpl(CmAdapter.java:979)
    at com.sapportals.wcm.repository.runtime.CmAdapter.getResource(CmAdapter.java:192)
    at com.sapportals.wcm.rendering.control.cm.WdfProxy.createResource(WdfProxy.java:2267)
    at com.sapportals.wcm.rendering.control.cm.WdfProxy.createResource(WdfProxy.java:2249)
    at com.sapportals.wcm.rendering.control.cm.WdfProxy.getUnsafeResource(WdfProxy.java:2222)
    at com.sapportals.wcm.rendering.control.cm.WdfProxy.getLayoutController(WdfProxy.java:2202)
    at com.sapportals.wcm.rendering.control.cm.WdfProxy.isPreviewEnabled(WdfProxy.java:2618)
    at sun.reflect.GeneratedMethodAccessor840.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:62)
    at java.lang.reflect.Method.invoke(Method.java:391)
    at com.sapportals.wdf.serialize.PersistenceManager.createPropertyTable(PersistenceManager.java:83)
    at com.sapportals.wdf.serialize.PersistenceManager.store(PersistenceManager.java:48)
    at com.sapportals.wdf.serialize.PersistenceComponentManager.store(PersistenceComponentManager.java:79)
    at com.sapportals.wdf.stack.Control.renderPersistentProperties(Control.java:315)
    at com.sapportals.wdf.stack.Pane.renderPersistentControls(Pane.java:127)
    at com.sapportals.wdf.stack.PaneStack.renderPersistentControls(PaneStack.java:112)
    at com.sapportals.wdf.stack.Pane.renderPersistentControls(Pane.java:121)
    at com.sapportals.wdf.stack.PaneStack.renderPersistentControls(PaneStack.java:112)
    at com.sapportals.wdf.stack.Pane.renderPersistentControls(Pane.java:121)
    at com.sapportals.wdf.stack.PaneStack.renderPersistentControls(PaneStack.java:112)
    at com.sapportals.wdf.stack.Pane.renderPersistentControls(Pane.java:121)
    at com.sapportals.wdf.stack.PaneStack.renderPersistentControls(PaneStack.java:112)
    at com.sapportals.wdf.stack.PaneStack.renderPersistentGrid(PaneStack.java:89)
    at com.sapportals.wdf.WdfCompositeController.doInitialization(WdfCompositeController.java:308)
    at com.sapportals.wdf.WdfCompositeController.buildComposition(WdfCompositeController.java:660)
    at com.sapportals.htmlb.AbstractCompositeComponent.preRender(AbstractCompositeComponent.java:33)
    at com.sapportals.htmlb.Container.preRender(Container.java:120)
    at com.sapportals.htmlb.Container.preRender(Container.java:120)
    at com.sapportals.htmlb.Container.preRender(Container.java:120)
    at com.sapportals.portal.htmlb.PrtContext.render(PrtContext.java:406)
    at com.sapportals.htmlb.page.DynPage.doOutput(DynPage.java:237)
    at com.sapportals.wcm.portal.component.base.KMControllerDynPage.doOutput(KMControllerDynPage.java:134)
    at com.sapportals.htmlb.page.PageProcessor.handleRequest(PageProcessor.java:129)
    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:524)
    at java.security.AccessController.doPrivileged(AccessController.java:246)
    at com.sapportals.portal.prt.dispatcher.Dispatcher.service(Dispatcher.java:407)
    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:386)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:364)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:1039)
    at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:265)
    at com.sap.engine.services.httpserver.server.Client.handle(Client.java:95)
    at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:175)
    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(AccessController.java:219)
    at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:102)
    at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:172)
    Best Regards,
    Aparnna

  • Subscribe event workflow to repository service

    I Subscribe the event StatemanamengEvent.PUBLISH_TEMPLATE to Repository Service for documents with state publish, but need know that event is associated to state Approved/Reject when a document is submit for approval.
    help me please.

    Hello Alexander ~
    I've used StatemanagementEvent.PUBLISH, and I can confirm that it is triggered when a document goes through the entire approval workflow and is completely approved.
    I'm not sure what event fires when a document is rejected.  Try checking out <a href="http://media.sdn.sap.com/html/submitted_docs/nw_kmc/javadoc/com/sapportals/wcm/repository/service/statemanagement/IStatemanagementEvent.html">this documentation</a>.  It may point you in the right direction.
    Hope this helps a bit.
    Cheers,
    Fallon

  • Get Repository Service from Renderer

    Hello All
    I need a repository service for storing and customization some parameters for my KM property renderers. I wrote such service and can see it in KM->Content Management->Repository Services. But when I try to get a list of all repository services, for example
    IRepositoryServiceFactory sf = ResourceFactory.getInstance().getServiceFactory();
    Collection srvAll = sf.getAllServices();
    But I don't see my service in that list. And so, when I try to get parameters from my service I have nothing.
    What's wrong?
    Could you give any tips about getting repository service parameters out of KM property renderer?

    Thanks Helmut
    But, point is that the methods getAllServices() or getAllRepositoryServices() return IRepositoryService inetrface alone or in Collection, for example
    Collection sf_collection = resource.getRepositoryManager().getAllServices();
    or
    IRepositoryService svc = resource.getRepositoryManager().getService("Name of my Service");
    But unfortunately this interface don't enable to get configuration parameters of this service that I can change on portal. In other words, I set the attributes
    <attribute name="new_attribute" type="string" mandatory="true" default="2" />
    <attribute name="other_attribute" type="string" mandatory="true" default="5" />
    in file MyServiceName.cc.xml and can to change this parameters on portal. How can I get this values from other my components?

  • Repository service implementation: custom property

    Hi,
    Is there any sample implementation of repository service for custom properties?
    I tried with eclipse PDK plug-in to create and deploy. but no success. Any pointers for repository service implementation docs ?
    thanks in advance for any help in this regard.
    John

    Hi John,
    there is no deep doc on RepServices. Primarily, search on the forums. Maybe Permissions on XML Forms resources is a good starting point for you?!
    Additionally, to add custom properties (I think you think about configuration properties?!) you'll have to understand the config framework and it's file structure.
    For this, have a look under src.config of you project created by the wizards; watch how they are deployed; and compare other configurations you can find within CM with their corresponding configuration files. That's the best way to get behind the secrets
    Hope it helps
    Detlev

  • Services for Object - Store Business Documents (issue with XLSX files)

    Hi,
    We are using the Services for Object > Store Business Document to be able to drag and drop files into (for example) Sales Inquiry, Sales Order, Sales Quotations etc.
    Within OAC2 we have set up the global document types and these have been linked to the relevant Object Types and Content Repositories in OAC3.  We have also set up the Content Repository as Document Area 'ARCHLINK'.
    The ArhciveLink Basic Settings in OAG1 have the 'Always Copy Document Class from Document Type' set under Storage Settings.
    The issue we are having is with XLSX document types.  When we drag and drop the XLSX documen type using the Store Business Document the file is stored against the Sales Order but when you come to view the attachments MS Excel opens but an error message appears saying 'Excel cannot open the file '******' because the file format or file extension is not valid. Verify that the file has not been corrupted and that the file extension matches the format of the file'?
    We have reviewed SAP notes 1925897, 1739026 and 1145885 however non appear to give me a clear answer as to why this is happening?
    I have found that if we unselect the option 'Always Copy Document Class from Document Type' in OAG1 then we can open the XLSX files.
    As we have a significant amount of documents attached to various objects, what would be the implications of making this change agianst existing records and new records?
    Any advice on this issue would be greatly appreciated.
    Gary B

    Hi David,
    No joy I'm afraid!!
    I added entry 'xlslx' with the relevant MIME Type, Application and Description into table TOADD for the ArchiveLink settings and also this entry was already in tables SDOKMIME and SDOKFEXT for KPro.
    I then following the process via the Services for Object within VA12 (Change Inquiry) to then Create > Store Business document > Select the relevant Document Type > Drag and Drop the XLSX file into the empty box.
    I then saved the record and tried to view the attachement but I am still getting the same message  'Excel cannot open the file '******' because the file format or file extension is not valid. Verify that the file has not been corrupted and that the file extension matches the format of the file'?
    Our client is on componet SAP_BASIS release 701 Support Level 0014 and Support Package SAPKB70114 and I can see that note 1237688 is for SAPKB70112?
    Regards
    Gary

  • Content server for Document attachment through "services for object" Icon.

    Guys,
    I have typical problem in installation of Content server for storing external documents.
    We all know that we can attach the document in SAP using the icon “SERVICES FOR OBJECT”. By this we can attach the document to the specific object we want.
    -Since my client wants only document attachment method not to completely implement SAP DMS, I proposed this method of attaching documents through services for object method.
    -If documents are stored though services for object ,The attached document will directly get stored in sap database(correct me if I am wrong) while  in  DMS it ask you to select the storage location while u check in for any document
    -By storing the doc thru "services for object " For long run when we store the documents in sap database our system will drastically get slow down.
    -In this regard I have a plan to incorporate external storage server.
    -Now I should know that how I should customize content server configuration so that the attachment through services for object will store into this content server I need to know how to define Client, Content Category, Content Repository, Document Area, Physical Machine, IP Address, Port. (OACT & OAC0)
    I appreciate for immediate solution and <u><b>Points will be rewarded for sure.</b></u>
    Regards,
    Murali.S

    Hi Murali,
    Don't Worry, its possible,
    All attachments can be stored in SAP Content Server also, but through archiving process.
    Set up a database storage system.
    Preparation
    Make sure that the HTTP plugin is active.
    Transaction <b>SMICM,</b> "Display Services" function key (shift F1)). The list of services must contain a port other than 0 for HTTP.If not, you must adjust the relevant profile parameter.
    <u>Typical entry:</u>
    icm/server_port_0         PROT=HTTP, PORT=1080, TIMEOUT=900
    <b>Make sure that the /sap/bc/contentserver service is active.</b>
    If no user is defined, then use transaction SU01 to create a new user. Use the "System" user type.Assign
    the SAP_ALL and SAP_NEW profiles to the user. (Eg: HRUSER/PLMUSER/PPUSER etc)
    Transaction <b>SICF,</b> select: default_host - sap - bc -contentserver. Select the function to display/change the service. Make sure that a user is defined.
    Using the relevant data from the newly created user, maintain the anonymous logon data for the
    /default_host/sap/bc/ service and save & activate the changes in transaction <b>SICF</b>.  Double click on content server and give the user name which has been created (HRUSER/PLMUSER/PPUSER/MMUSER etc)
    Check the system PSE.
    Start transaction <b>STRUST</b>. Expand the system PSE. The system PSE must be "green" for each application
    server.
    Determine a suitable exchange directory.
    The exchange directory must be accessible from each application server. If all application servers are running on the same platform (for example, Windows), one network directory that is accessible on all application server (for example,
    server\share) is sufficient. You can generally use the global directory
    (profile parameter DIR_GLOBAL).You can use the RSPARAM report to determine the profile parameters.
    Setting up the storage
    Create a table for storing the data. Using transaction <b>SE11</b>, create a copy of the SDOKCONT1
    table. If you want to create the repository database, you can name the table ZCONT_DB, for example. Save the
    table as a local object. Activate the table.
    Create a repository.
    Use transaction <b>OAC0</b> to create a new repository.
    Use the following parameters:
    Repository Max. two characters, for example,” Z1”
    DocArea: ARCHLINK
    Storage type: R/3 database
    Storage subtype: normal
    Version no. : 0046 
    Contents table <table name> for example: ZCONT_DB
    Exchange directory <directory name> for example:
    server\share\
    Make sure that the exchange list ends with a \ (or /on Unix).If you are using a variety of platforms, you must use transaction FILE to define a suitable logical file name and use this name. Save the settings.
    1. Maintain view table <b>TOAAR_C</b>, via SM31
       Cross client table displayed as information, forget it
    2. In field 'StSytm' you must entered 'Z1' as your system need, or anything that you need but you must configure HR Archive link too.
    3. In field 'Arch.path' (direct above Spoolpath), entered path in your system, this real path in your operating system. May be you should confirm to your Basis consultant where exactly you could store picture files. So if you enter '/', your file exists at root directory at your UNIX system.
    4. Choose 'File store' radio button
    5. Save.
    First
    <b>1. You have to create a number range for SAP ArchiveLink.
        IMG: Basis Components-> Basis Services -> SAP ArchiveLink -> Basic Settings-> Maintain number ranges   
        (Trxn <b>OANR).</b> Create number range 01 from 0000000001 to 9999999999 without the external number flag. 
    2. Document type <b>HRICOLFOTO</b> must exist with document class JPG.
        IMG: Basis Components->Basis Services->SAP ArchiveLink->System Settings->Maintain document types
        (Table<b> TOAVE, Trxn OAC2).</b>
    3. Document type <b>HRICOLFOTO</b> must be linked to object type PREL and Infotype PA0002.
        IMG: Personnel Management->Personnel Administration->Tools->Optical archiving->Set up Optical Archiving
        in HR.  (View V_T585O, no Trxn). In the first two columns there are minuses, the third (Date) has
       a plus - don't put a flag in the check box.
    4. Check which content repository (Archive) is linked to document type HRICOLFOTO and object type  
        PREL. IMG: <b>Basis Components->Basis Services->SAP ArchiveLink->Basic Settings->Maintain Links (Table 
       TOAOM_C, Trxn).</b></b>
    Test
    • Test the repository.
    Use transaction SE38 to start the RSCMSTH0 report. Specify your repository (i.e. Z1) and start the test.
    The report must run without errors. If no problems occurred, you can use the new repository with Archive Link after you carry out the Archive Link Customizing. If problems do occur, check whether one of the related
    notes helps.
    For More Details :
    http://service.sap.com/archivelink.
    <u><b>
    NOTE:- Screen Shots are missing, i was not able to paste here, One more thing is we did this for uploading a PHOTOS into Content Server, Similarly you have to create a REPOSITORY and Z-TABLE to bring all the Attachments from all the selected Objects and then route them to the CONTENT REPOSITORY.</b></u>
    Your Senior ABAP guy would help you in this, if not i may try to help you more by monday.
    Regards
    Rehman
    <b>Reward Your Points if Satisfied.</b>

  • IOS 7 very slow, i have many problem , exemple  download documents , typing doc to go .   Very slow, sometime no response , please help us for this error

    IOS 7 very slow, i have many problem , exemple  download documents , typing doc to go .   Very slow, sometime no response , please help us for this error,

    spacepilot wrote:
    i live in the WS10 / 0121 area and have been having similar problems. i have an up to 20mb services, but up to a month ago connected at 4800, then my line went dead for 6 days, and all indis could do was send me  new router, which came the day after my line was restored, but had dropped to 2418 and remained so for the past 3 to 4 weeks, then i dropped to 1963 yesterday, and 729 today.
    all speeds are far lower on my upto 20mb than they where on my upto 8mb link.
    foegot to add, i reported the problem via the report a problem link, which hopefully will be red by someone with  a firmer grasp of english that the normal call centre staff
    welcome to the forum    why don't you start your own subject and post the adsl stats from your router and also run btspeedtester and post the results and someone may be able to offer assistance
    If you like a post, or want to say thanks for a helpful answer, please click on the Ratings star on the left-hand side of the post.
    If someone answers your question correctly please let other members know by clicking on ’Mark as Accepted Solution’.

Maybe you are looking for

  • Link from the Sales order/Sheduling Agreement to planned order

    Hi, SAP SD Gurus, Can you please tell me the the link from sales order/sheduling agreement to planned order. Thanks, Anand

  • Any way to link to a file in Catalyst, rather than a URL or state?

    Given the 20 page limitation, I'm having to build my prototype in chunks, but so far have been unable to find a way to link up the various prototypes.  Does anyone know of a way to add a link to a local file rather than a live URL or simply another s

  • Flow of order managment

    can any one mail me the work flow of the order management hope to hear from u asap regards Praveen Benjamin

  • New Bank Account- config for Manual Bank Statement

    Hi, Currently we are using Manual Bank Statement (FF67),and client   have opened a new bank account and new GLs have been created, I need to configure for this new bank account, kindly let me know where to maintain the GL accounts for Incoming and Ou

  • Is FCPX compatible with pdf files ?

    Hi there, I am having problem with still image. My default setting for still image is 8 seconds. So far I have no problem putitng it into the timeline. I just notice something strange happened today. I still image I import it is always 1 second ! The