Skip to Content
avatar image
Former Member

Attach documents to a process using BPM API

Hi Experts,

After a few days searching info I am not able to find a method to add attachments to a BPM process using the BPM or ECM API since there is no such method in the TaskInstanceManager as it is for the notes. Of course using ECM repository I am able to locate the repository where the files are stored connecting like this:

application = ecm.connect("", "ecm/bpm");
Repository repository = application.getRepository("BPM");

and setting my rootFolder to /BPM_CONTEXT_STORE.

From here and on the path for the process instance if formed with this pattern:

Path =/BPM_CONTEXT_STORE/6a/c2/e3/72/15/55/11/e7/8a/68/00/00/00/b6/27/0e/

where process instance is the above string removing the slashes (6ac2e372155511e78a68000000b6270e)

I also noted that there are two custom properties related with the bpem context:

{http://sap.com/bpem/ctx/document}mimeType

{http://sap.com/bpem/ctx/document}displayName

Ok. With this information I am able to add, update and remove files from this folder but I am not able to see this files in the Attachments section of the process Instance administration. On contrast, if I add an attachment to the process using the standard attachments, the file is listed in the folder. Furthermore... If I remove the file using the ECM API when I access the Attachment section of the process instance (using process list viewer, for example) I obtain an error.

My question is: Is there any way to do what I am trying to do? It would be very useful thinking in applicatons that uses SAPUI5 components to execute Tasks.

Thanks in advance.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Mar 31, 2017 at 01:58 AM
    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Mar 31, 2017 at 07:11 AM

    Thank you! But what I really need is to add new attachments. The getAttachments method os TaskInstanceManager is working fine.

    Add comment
    10|10000 characters needed characters exceeded