Hey guys,
I searched everything and can't find an appropriate answer - so I need your help!
My Process made with APS (Enterprise) starts with a form where the users can upload a contract (the id in that field is "contract"). Thing is, I want to unify that file to the filename "contract.docx".
Example: User uploads file "something.docx" and then it's published to ACS as "contract.docx".
For this I know I have to call the variable containing this file, but I can't find it - and the mess is that it is not stored in "contract", like all other variables from formfields are handled. In activiti-admin I can see the variable "contract" but it is "null".
So, do you know what to call exactly and further - how to change the filename?
Thanks and cheers,
Jannik
Solved! Go to Solution.
Fortunately I found something related. I changed the code a bit to my needs and it looks like this:
import com.activiti.service.runtime.RelatedContentService; import com.activiti.domain.runtime.RelatedContent; List<RelatedContent> contentList = relatedContentService.getFieldContentForProcessInstance(execution.getProcessInstanceId(), "contract", 1, 0).getContent(); RelatedContent content = contentList.get(0); content.setName("Contract");
This works superb. Maybe it could help you as well. Just parse it to a groovy Scripttasks and your are g2g.
Cheers!
Fortunately I found something related. I changed the code a bit to my needs and it looks like this:
import com.activiti.service.runtime.RelatedContentService; import com.activiti.domain.runtime.RelatedContent; List<RelatedContent> contentList = relatedContentService.getFieldContentForProcessInstance(execution.getProcessInstanceId(), "contract", 1, 0).getContent(); RelatedContent content = contentList.get(0); content.setName("Contract");
This works superb. Maybe it could help you as well. Just parse it to a groovy Scripttasks and your are g2g.
Cheers!
Ask for and offer help to other Alfresco Process Services and Activiti Users and members of the Alfresco team.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.