AnsweredAssumed Answered

Add attachement 

Question asked by abdeljali_hmi on Jan 15, 2018

hello 

i need to add file attachement with java service 
i use the  code 
<code>
File f = new File("path to file");
FileInputStream fileInputStream = null; System.out.println("file beg"); try { fileInputStream = new FileInputStream(f); } catch (FileNotFoundException e) {e.printStackTrace(); }
ProcessEngine processEngine = ProcessEngines.getDefaultProcessEngine();
TaskService ts = processEngine.getTaskService();
Attachment attachment = ts.createAttachment("application/pdf", "137572", "137566", "json_tutorial_tet2.pdf",
" user 2",fileInputStream );
</code>
the row is added succesfuly in the table "act_hi_attachment" .
Images intégrées 1
 
but it does not display the in interface !

Outcomes