Topic
16 replies Latest Post - ‏2014-04-18T19:44:30Z by rchala
SystemAdmin
SystemAdmin
7615 Posts
ACCEPTED ANSWER

Pinned topic Document Attachment in BPM 8.0.1

‏2013-04-03T15:41:28Z |
Hi All, I am trying to build a simple coach in BPM 8.0.1 with the ability to upload and attach a file, just like the document attachment widget in previous versions. I have both BPD and service only test harnesses, I have tried using legacy and new coaches.

I have tried the following controls -
The built in "Attach Document" control returns to following in a javascript popup when the coach is run - "Error retrieving document list"

http://bpmwiki.blueworkslive.com/display/samples/Legacy+Document+Attach+Widget+for+BPM+8.0.1 - this seems to run but the document list is always empty, regardless of the option settings, filters, etc.

http://bpmwiki.blueworkslive.com/display/samples/Legacy+Document+Attach+Widget+%28For+Next+generation+Coaches%29+-+Release+2 - does not appear to be compatible with v. 8.0.1

Does anyone have a working example of a document attachment control they can export, or point me to one that should work on 8.0.1?

Thanks, Joel
Updated on 2013-04-03T23:03:18Z at 2013-04-03T23:03:18Z by kolban
  • kolban
    kolban
    3314 Posts
    ACCEPTED ANSWER

    Re: Document Attachment in BPM 8.0.1

    ‏2013-04-03T16:09:14Z  in response to SystemAdmin
    Hi Joel,
    The strategy for IBM BPM is to use an ECM to hold the files that you wish to associate with a process. Examples of these include IBM's FileNet and the open source Alfresco products. Both of these support and industry standard called CMIS which allows IBM BPM (in principle) to work with an arbitrary compliant ECM provider. In 8.0.1 there are also coach views supplied that provide upload and viewing capability. Using this technique feels like the best way to go.

    Neil
    • SystemAdmin
      SystemAdmin
      7615 Posts
      ACCEPTED ANSWER

      Re: Document Attachment in BPM 8.0.1

      ‏2013-04-03T20:05:13Z  in response to kolban
      Neil -

      But there are a bunch of legacy customers that already have documents created using the old non CMIS approach. Has support for those been dropped by IBM? Right now it seems like there is no OOTB way to get those to work in 8.0.1 from what Joel is saying.

      Andrew Paier | Director of Special Operations | BP3 Global, Inc. www.bp-3.com
      • kolban
        kolban
        3314 Posts
        ACCEPTED ANSWER

        Re: Document Attachment in BPM 8.0.1

        ‏2013-04-03T22:01:46Z  in response to SystemAdmin
        Hi Andrew,
        For new development, my own advice would be to use the CMIS functions. For customers who are migrating from pre-v8 environments, then the Heritage Coach support should continue to support apples-to-apples execution. This means that if one were willing to continue to use Heritage Coach UI screens, the functions previously found in pre-v8 IBM BPM should still be available and supported.

        There was once an effort to provide a sample that attempted to support the "heritage" document attachment techniques in v8. It can be found here:

        http://bpmwiki.blueworkslive.com/display/samples/Legacy+Document+Attach+Widget+%28For+Next+generation+Coaches%29+-+Release+2

        However, the chap that built it no longer works for IBM combined with there being no support for these as-is samples, I'd be cautious on use. In fact I'd probably go stronger and say that anyone who uses these samples should convince themselves that they fully understand completely how the sample works and be prepared to own its continued maintenance.

        Neil
    • Dae Young
      Dae Young
      430 Posts
      ACCEPTED ANSWER

      Re: Document Attachment in BPM 8.0.1

      ‏2013-10-04T17:09:20Z  in response to kolban

      Good afternoon Neil,

      I couldn't find v8.0.1.1 supplied coach view for uploading and viewing capability. If I misunderstood your statement, please forgive me. Would you be able to point out what coach view out of the box I should use to attach a file?

      I'm trying find a way to attach a file and read contents of it via custom java code implemented in the java integration service then pass that data (Base64 encoded string) to a remote server via restful web service.

      Have a blessed day!

      Dae

  • SystemAdmin
    SystemAdmin
    7615 Posts
    ACCEPTED ANSWER

    Re: Document Attachment in BPM 8.0.1

    ‏2013-04-03T22:52:13Z  in response to SystemAdmin
    Hi Neil, The problem I am running into is trying to get a document attachment control to work in either a legacy coach or the new coaches. This is for a single document upload screen on a sample coach for testing a distributed toolkit. Because of this I am trying to avoid using additional toolkits or external data sources if possible. I agree that CMIS would be the best practice for new applications, this seems to be a side case where using the built in data source for document storage is more advantageous.

    If I am understanding you correctly, the document attachment control, used on a legacy coach should still work. Is that correct? If so what would cause an error of "Error retrieving document list"?

    Thanks, Joel
    • kolban
      kolban
      3314 Posts
      ACCEPTED ANSWER

      Re: Document Attachment in BPM 8.0.1

      ‏2013-04-03T23:03:18Z  in response to SystemAdmin
      Hi Joel,
      Are you running the Human Service within the context of a process or stand-alone directly? Are there any messages written to the logs? Would it be possible to create a simple TWX sample that I could take a look at?

      Neil
      • Andrew.Cohen
        Andrew.Cohen
        2 Posts
        ACCEPTED ANSWER

        Re: Document Attachment in BPM 8.0.1

        ‏2013-10-22T15:34:41Z  in response to kolban

        Hi Neil,

        I have the same "Error retrieving documents list" popup as Joel, running a heritage coach in BPM 8.0.1. I do not see anything in the WAS logs. 

        in firebug console I have:

         
        Error: Unable to load /portal/jsp/documentattachment?operation=ajax_getDocuments&bpdInstanceId=506&coachdesigner=false&docMatching=false status:0

        Would anyone be willing to help investigate this?

        thanks for any suggestions,

         

    • varun959
      varun959
      1 Post
      ACCEPTED ANSWER

      Re: Document Attachment in BPM 8.0.1

      ‏2013-05-26T16:59:42Z  in response to SystemAdmin

      Hello,

      Alert - new to IBM WebSphere.

      I came across this post while looking for guidance on document attachment strategy for new IBM BPM applications on v8.0.1. Based on some research I did, here is my conclusion. Appreciate comments from experienced forum members.

       

      1. IBM has changed the way documents are handled in v7.5, v8 and v8.5
      2. Till v7.5, there were 2 options - A. using document attachment control in Coaches which stored documents within BPM server B. storing documents in an external ECM using IBM Content Integrator
      3. 2B has been deprecated with v8.0 (Content Integrator no longer supported). 2A is now called Heritage Coaches (future support is questionable)
      4. With v8.0, IBM recommends using CMIS to work with ECM documents. However, there is no out of the box feature to store documents within BPM itself except for Heritage Coaches (which seem obsolete)
      5. With v8.5, IBM has introduced a new internal repository to store documents internally (within BPM) in addition to v8.0 feature of working with external ECM documents using CMIS

      Hence, the decision at the point in time should be to work with documents in ECM via CMIS since it would be supported in future versions as well (based on the information currently at hand). When you move to v8.5 or later, documents could also be stored in BPM internal repository - this decision should be based on business requirements e.g. Whether the documents' usefulness and ownership transcends the BPM process being developed and the ECM strategy of the organization.

      Varun

  • SalvadorCadena
    SalvadorCadena
    18 Posts
    ACCEPTED ANSWER

    Re: Document Attachment in BPM 8.0.1

    ‏2014-01-27T22:25:55Z  in response to SystemAdmin

    Hello,

     

    I have a different story.

     

    First we used the heritage control to load documents under v8.0.1, no problem.

    We migrated from v8.0.1 to v8.5.0.1 and the heritage control for file attachment is working fine under Process Center, as soon as we deploy to a Test environment we have the same alert message: "Error retrieving document list"

    And the log files shows:

     

    [1/24/14 16:49:30:591 COT] 00000147 RestHelper    W   CWTDS0000E: An unexpected failure occurred. Details: 'FNRCE0051: The requested item was not found.'
    Explanation: An exception was thrown.
    Action: Check the server log files.
                                     com.lombardisoftware.client.delegate.BusinessDelegateException: CWTDS0000E: An unexpected failure occurred. Details: 'FNRCE0051: The requested item was not found.'
    Explanation: An exception was thrown.
    Action: Check the server log files.
    at com.lombardisoftware.client.delegate.BusinessDelegateException.asBusinessDelegateException(BusinessDelegateException.java:46)
    at com.lombardisoftware.client.delegate.BPDInstanceDocumentAPIDelegateDefault.getDocumentsByInstance(BPDInstanceDocumentAPIDelegateDefault.java:317)
    at com.lombardisoftware.server.ejb.psapi.ProcessAPIFacadeCore.getDocumentsByBPDInstanceId(ProcessAPIFacadeCore.java:272)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
    at java.lang.reflect.Method.invoke(Method.java:611)
     

     

    It seems something is missing on Test environment.

    Any help would be very appreciated.

     

    Best regards.

    Salvador

     

     

    • SalvadorCadena
      SalvadorCadena
      18 Posts
      ACCEPTED ANSWER

      Re: Document Attachment in BPM 8.0.1

      ‏2014-02-10T16:19:53Z  in response to SalvadorCadena

      Hello,

      Just wanted to share my findings.

      The error: "Error retrieving documents list" could have diverse causes.

      For me this was just the final message.

      When I went to the log files I found a message like the following:

      [1/24/14 16:49:30:591 COT] 00000147 RestHelper    W   CWTDS0000E: An unexpected failure occurred. Details: 'FNRCE0051: The requested item was not found.'

      As I told before my story was a little bit different, I finally found the reason.

      In my case, the document engine for v8.5.0, based on FileNet 8, was unable to start.

      My problem was originated because I recovered a backup from a different  execution environment (STG) to TEST. Since the document store was first initialized on the previous environment, the credentials on the new didn't match, so the document store was unable to start. Since the rest of the applications started well, everything seemed to be working nicely.

      There is not a procedure to re-initialize the document store, what i did to workaround this was just pointing the Datasource for the document store to another database, so, when the document store starts the first time and looks for its repository, since the repository does not exist  in the new database , the new document store is initialized again.

      Of course this workaround is useful only if you don't have any document in the document store.

      Hope this help.

       

      Salvador

       

       

       

       

      • Siddarth1
        Siddarth1
        20 Posts
        ACCEPTED ANSWER

        Re: Document Attachment in BPM 8.0.1

        ‏2014-02-11T09:50:45Z  in response to SalvadorCadena

        HI Salvador,

        <<<<<<<<<<<<<

        In my case, the document engine for v8.5.0, based on FileNet 8, was unable to start.

        My problem was originated because I recovered a backup from a different  execution environment (STG) to TEST. Since the document store was first initialized on the previous environment, the credentials on the new didn't match, so the document store was unable to start. Since the rest of the applications started well, everything seemed to be working nicely.

        >>>>>>>>>>>>>>

         

        In you above reply were you trying to say that  you recovered a BPM backup? In that case was the document store on the BPM side which did not start since it was initialized in the previous environment.

        Then what do you mean by "pointing the Datasource for the document store to another database" . Is it the same as  pointing  the filnet  webservice service configured in BPM to a different server. Will it reinitialize the document store. Iam ensuring that I point to a Filenet instance with a new repository

        Appreciate your help

         

        Thanks

        Sateesh

         

        • SalvadorCadena
          SalvadorCadena
          18 Posts
          ACCEPTED ANSWER

          Re: Document Attachment in BPM 8.0.1

          ‏2014-02-11T15:24:01Z  in response to Siddarth1

          Hi Sateesh,

          Yes, we recovered a BPM backup, BPMDB, PDWDB and CMNDB from STG to TEST.

          The document store was originally in BPMDB, and under STG was initialized right.

          When we recovered the back up int the TEST environment we started to receive the error, so, digging with Mr. Google I found that the document store is initialized once with the admin credentials, and since actually admin in STG is different from admin in TEST (just for the internal user id) the document store was unable to start.

          There is not a documented procedure to re-initialize this relationship so, I just changed the Datasource to point to CMNDB, this way the document store was initialized again.

          if you want to point the document store to a new repository, this could help. Because when the document store is initializing and there are not the tables on the configured database, the engine creates the tables and initialize the document store. 

          I know this is not a final solution if already have documents in the document store and  you are pretending to use them.

          Hope this help.

           

          Salvador

           

          • Siddarth1
            Siddarth1
            20 Posts
            ACCEPTED ANSWER

            Re: Document Attachment in BPM 8.0.1

            ‏2014-02-11T19:00:36Z  in response to SalvadorCadena

            Hello Salvador,

             

            Thank you for the rely

             

            Were you using FileNet for storing documents or were you using the Internal BPM Store. In my case Iam using Filenet for storing documents and Iam getting the error "Error retrieving documents list" .Document attachment control uses WebService internally to list documents stored in FileNet. This error is only occurring in the Process Server environment. In the Process Center it is working fine. I guess from your explanation that you are using Internal BPM repository which is Database. Iam using Filenet and the error Iam getting is below. Iam deploying the same snapshot which is working in Development (Process Center) to TEST (Process server) environment and Iam getting the below error. Do you get any idea.

             

            [2/9/14 16:21:35:107 GMT+04:00] 00000050 webapp        E com.ibm.ws.webcontainer.webapp.WebApp logServletError SRVE0293E: [Servlet Error]-[RemoteDocumentServ
            let]: com.lombardisoftware.client.delegate.BusinessDelegateException: ; nested exception is:
                    javax.xml.rpc.JAXRPCException: Number of parameters passed in (1) doesn't match the number of IN/INOUT parameters (2) from the addParameter() calls
                    at com.lombardisoftware.client.delegate.BusinessDelegateException.asBusinessDelegateException(BusinessDelegateException.java:41)
                    at com.lombardisoftware.client.delegate.common.WebsphereDelegateHelper.doAsCurrentSubjectContextSensitive(WebsphereDelegateHelper.java:177)
                    at com.lombardisoftware.client.delegate.RemoteDocumentAPIDelegateDefault.executeQuery(RemoteDocumentAPIDelegateDefault.java:120)
                    at com.lombardisoftware.portal.servlet.RemoteDocumentServlet.executeQuery(RemoteDocumentServlet.java:362)
                    at com.lombardisoftware.portal.servlet.RemoteDocumentServlet.access$000(RemoteDocumentServlet.java:58)
                    at com.lombardisoftware.portal.servlet.RemoteDocumentServlet$GetDocumentsHandler.doGet(RemoteDocumentServlet.java:118)
                    at com.lombardisoftware.portal.servlet.RemoteDocumentServlet.doGet(RemoteDocumentServlet.java:483)
                    at javax.servlet.http.HttpServlet.service(HttpServlet.java:718)
                    at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
                    at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1657)
                    at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1597)
                    at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:131)
                    at com.lombardisoftware.portal.servlet.ClearThreadCachesFilter.doFilter(ClearThreadCachesFilter.java:24)
                    at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:188)
                    at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116)
                    at com.lombardisoftware.servlet.SetUserTimeZoneFilter.doFilter(SetUserTimeZoneFilter.java:41)
                    at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:188)
                    at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116)
                    at com.lombardisoftware.portal.servlet.CrossSiteScriptingFilter.doFilter(CrossSiteScriptingFilter.java:29)
                    at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:188)
                    at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116)
                    at com.lombardisoftware.servlet.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:35)
                    at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:188)
                    at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116)
                    at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:77)
                    at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:908)
                    at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:934)
                    at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:502)
                    at com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:181)
                    at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3944)
                    at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:276)
                    at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:931)
                    at com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1592)
                    at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:186)
                    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:452)
                    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewRequest(HttpInboundLink.java:511)
                    at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.processRequest(HttpInboundLink.java:305)
                    at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:83)
                    at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
            "SystemOut.log" 6004 lines, 880237 characters
             

             

            • SalvadorCadena
              SalvadorCadena
              18 Posts
              ACCEPTED ANSWER

              Re: Document Attachment in BPM 8.0.1

              ‏2014-03-21T16:29:35Z  in response to Siddarth1

              Hello,

              Sorry for may late response.

              We are using the internal document store based on FileNet.

               

              Best regards

               

  • rchala
    rchala
    2 Posts
    ACCEPTED ANSWER

    Re: Document Attachment in BPM 8.0.1

    ‏2014-04-18T19:44:30Z  in response to SystemAdmin

    Salvador,

     

    What do you mean by pointing the datsource to a different database? How would i do that.

    Assuming the datastore is part of the BPMDB which is already created as part of cluster creation. Are you saying drop the databases and recreate them again? Or is there a way to clean up the existing data store