BPM, Workflow, and Case

BPM, Workflow, and Case

Come for answers. Stay for best practices. All we’re missing is you.

 View Only
  • 1.  Adding a document to a specific case via REST call

    Posted Thu February 29, 2024 03:04 AM

    Hello Community,

    Please I need help

    I found the following example on the internet to inject content into a folder via the CMIS API, but it's not working. If same one can help me to add a document to a folder?

    best regards

    Lastly an example of adding a document to a specific case:

    Again you must use the specific the GUID of the case, which in this example is 'F1C1EEB9-AC69-C853-87A9-5BF26D900000'.

    > curl -u user:password -X POST http:// server:port/cmid_base_url/tos_symbolic_name/children?id=F1C1EEB9-AC69-C853-87A9-5BF26D900000^&ContentType=application/pdf -d @example.pdf



    ------------------------------
    El Mehdi ES-SAFI
    ------------------------------


  • 2.  RE: Adding a document to a specific case via REST call

    Posted Fri March 01, 2024 02:43 AM

    Could you post the exact curl command you used, that didn't work? You can mask the server name. 

    /Jan



    ------------------------------
    Jan Andersson
    ------------------------------



  • 3.  RE: Adding a document to a specific case via REST call

    Posted Fri March 01, 2024 02:59 AM

    Hello Jan, 

    I fund this : https://www.ibm.com/support/pages/examples-interacting-case-manager-using-rest-api-and-cmis

    I got the URL from this example, but it is not working.

    Thanks.



    ------------------------------
    El Mehdi ES-SAFI
    ------------------------------



  • 4.  RE: Adding a document to a specific case via REST call

    Posted Fri March 01, 2024 04:14 AM

    So what curl command did you use, that didn't work? Post the exact command you used. Then we can check what's wrong with it. /Jan



    ------------------------------
    Jan Andersson
    ------------------------------



  • 5.  RE: Adding a document to a specific case via REST call

    Posted Tue March 05, 2024 02:42 AM

    Hello Jan,


    Here is the curl command that I used.

    curl -u user:password -X POST https://Serveur:PORT/fncmis/resources/TOS/children?id=5E4EFAA0-CA7D-46C5-8AB5-FC7DD6699F6D^&ContentType=application/pdf -d @test_doc.pdf

    Thanks.



    ------------------------------
    El Mehdi ES-SAFI
    ------------------------------



  • 6.  RE: Adding a document to a specific case via REST call

    Posted Tue March 05, 2024 05:36 AM

    A first observation is that you have a circumflex (^) appended to the object id. That looks strange. Remove it.

    What's the error message you receive?

    /Jan



    ------------------------------
    Jan Andersson
    ------------------------------



  • 7.  RE: Adding a document to a specific case via REST call

    Posted Tue March 05, 2024 10:45 AM

    Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'Children' available
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:863)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getMergedLocalBeanDefinition(AbstractBeanFactory.java:1344)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:309)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208)
        at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1154)
        at com.ibm.ecm.cmis.app.beans.factory.BeanFactory.createObject(BeanFactory.java:143)
        at com.ibm.ecm.cmis.app.beans.factory.BeanFactory.getObject(BeanFactory.java:162)
        at com.ibm.ecm.cmis.app.servlet.CMISServlet.getCMISCollection(CMISServlet.java:312)
        at com.ibm.ecm.cmis.app.servlet.CMISServlet.doPost(CMISServlet.java:222)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:595)
        at com.ibm.ecm.cmis.app.servlet.CMISServlet.service(CMISServlet.java:495)



    ------------------------------
    El Mehdi ES-SAFI
    ------------------------------