AnsweredAssumed Answered

Accessing 'Folder' form field

Question asked by jvaidya on Jun 7, 2017
Latest reply on Jun 12, 2017 by mrahn

How do you access the entry for the Upload Folder form field in Activiti Process Services in a Script Task? 


You can do this for a file with : 


import com.activiti.service.runtime.RelatedContentService;
import com.activiti.service.runtime.RelatedContentStreamProvider;
import com.activiti.domain.runtime.RelatedContent;
import java.nio.charset.StandardCharsets;
String fileVariableName = "file";
List<RelatedContent> contentList = relatedContentService.getFieldContentForProcessInstance(execution.getProcessInstanceId(), fileVariableName, 1, 0).getContent();
RelatedContent content = contentList.get(0);
out.println("GDH :" + content.getName());
execution.setVariable("file_name", content.getName());



How would I modify this to give me the path of the folder uploaded?