Getting attachments out of a task

I have seen a number of requests on how to get the attachments out of a task before the task is assigned to a user and how to add attachments to a task. Well your wait is over, I have the pleasure of introducing TaskAttachments custom component, which does exactly what you have asked for- Add attachments to a task, and gets task attachments .

I have written a simple process using the custom component. I created a process which triggers every time an attachment is added to a task(in workspace in the attachment tab). In this process, I get the taskID of the task,and pass it to the getTaskAttachment service of my component. This gets the list of attachments for the particular taskID.
Click the link below to get access to the components, which are in a PDF file


34 responses to “Getting attachments out of a task

  1. Thanks for doing this,I have been wanting this for a long time!

  2. Great post. Thanks Girish!

  3. How do I extract the .jar file from the PDF – the save button is grayed out?

  4. Hi
    Thanks for pointing that out, it is fixed now.let me know if you have any more problems

  5. Thanks Girish,

    Can I ask a very basic question? I’ve never worked with custom components before so am not totally sure how to begin. I’ve imported the .jar file into workbench but am not sure what to do next. i.e. should I expect to see a new entry in the “Services” pannel which will allow me to grag/drop an icon to my workflow?

  6. Follow these steps to import the jar file
    Login to workbench
    Go to Component View
    Select the Root Node(Component)
    Right Click
    Select Install Component
    Browse to the jar file
    once the component is installed, select the component in the components tree(TaskAttachments in this case)
    Right click to start the component
    once the component is started, you can then go to the services view and start using the operations of the component.The new component will be listed under the default node

  7. Hi, Girish.

    I’m still unable to extract the jar files from the PDF. The save button is enabled, but I get the message, “You have selected a file that cannot be exported from Acrobat”

  8. Hi
    that is strange,which version of acrobat are you using?Also I will send you jar files separately

  9. Hi Girish

    Great post.
    I am struggling with attachments within a process. The process stalls when I use attachments.
    I think this might help.
    However, as Rich mentioned, I am not able to extract the jar files.
    Would you mind sending me those jar files?
    Any further information/help on how to use your files?
    Nice Regards,

  10. Hi
    I sent you the jar files.Could send me the process which is causing you problems

  11. Hi Girish,

    I’m using LiveCyle 8.2 and opening your pdf using Reader 8.

    I am unable to save the jar files from the pdf. Can you please send them to me ?

  12. Hi
    I just sent you the jar file from that pdf
    let me know if you need any thing else

  13. Hi, Girish,
    I am not able to get the jar files either… Could you send them to me please?


  14. Hi,
    I have the same problem with extracting *.jar files. Could you send it by E-mail?

    • Girish Bedekar

      Hi Petr
      You do not need to extract the jar files, just deploy it using workbench from the components view
      Then create a process and use the component
      What version of livecycle server are you on?

  15. Hello,

    When I try to run this process the attachments are not being saved. I checked the log file on the server and the process reads the Task ID, file and number of files, but has the content type as null. Is this normal? As well, is there a way to have the Task ID be dynamic? Right now it is hard coded. Thanks.

    • Girish Bedekar

      Hi Joel
      You can use the task events to access the attachments associated with the task.For example you use the Task Completed event to start a process and in this process you can get the taskID dynamically to access task attachemnts
      What is the type of your attachments? pdf?
      let me know

      • Yep, the attachment type that I was using as a test was PDF. Does the process only work with certain kinds of attachments? Thanks.

  16. Hi, Can I use this in LiveCycle ES 2.5 ?


  17. Hi, I have the same problem of extracting the attached JAR files as others. Would you please send them to me by email?


  18. Hi Girish, same problem as others getting the jar files out of the pdf. Would appreciate if you could send them by email.


  19. Sorry…wrong email in previous post. please send to this one. Thanks

  20. Hello Girish, I have the same issue of saving the .jar files from the pdf file when using acrobat pro 9 version, can you send me the jar files to my email as well.

  21. Hello Girish, I have the same issue of saving the .jar files from the pdf file when using acrobat pro 9 version, can you send me the jar files to my email as well. Thanks in advance.

  22. Hi, I’d like to use sendWithMapOfAttachments using all the attachments inside the list variable… I don’t know how to convert the list into a map of attachments… do you know how to achieve this?…

    • loop through the list
      get the document name using the getDocumentAttribute functions
      add the document into the map using the setValue
      in the map, the name of the document will be the key and the document will be the value

      • Garish,
        Thanks for your answer…
        I did what you say but the message is sent without any attachment… I’ve tried what seems right but it doesn’t work…
        I’ll keep trying…

      • Girish Bedekar

        can you send me your process,will take a look at it

  23. Thanks Girish for your offer,
    where can I send you the process?

    thanks again

  24. Girish
    I found the error in the process, thanks a lot anyway for your help…

  25. good to know

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s