AnsweredAssumed Answered

Get Filename of a Document from the Workflow Package

Question asked by testuser on Apr 7, 2014
Latest reply on Apr 9, 2014 by testuser
Hi!

I try to get the filename of a Document from the Workflow Package with the following code. But the workflow doesnt start and the error message i get is "failed to start Workflow. Returning 500 status code". I think its not a small problem, do you have any Ideas?

Thanks for your help!



ActivitiScriptNode scriptNode = (ActivitiScriptNode)executionEntity.getVariable(WorkflowNotificationUtils.PROP_PACKAGE);
NodeRef packageNode = scriptNode.getNodeRef();
NodeRef nodeRef = getServiceRegistry().getNodeService().getChildAssocs(packageNode).get(0).getChildRef();

String fileName = (String) getServiceRegistry().getNodeService().getProperty(nodeRef, ContentModel.PROP_NAME);

Outcomes