AnsweredAssumed Answered

Custom document transformation

Question asked by birgir on May 6, 2008
Latest reply on May 7, 2008 by birgir
I am trying to get document transformation working before I start my workflow. I am converting from PS to PDF which works fine when done manually via using rules. I only know the name of the folder to do the transformation on during runtime so I want to be able to call the transformation myself, programmatically. Here is what I did. When I run this nothing happens, not even a debug or info message in the consule (I have them turned on).



NodeRef compHomeRef = getCompanyHomeNode(actionedUponNodeRef.getStoreRef());
NodeRef uploadFolderRef = nodeService.getChildByName(compHomeRef, ContentModel.ASSOC_CONTAINS, UPLOAD_FOLDER);
NodeRef taskFolderRef = nodeService.getChildByName(uploadFolderRef, ContentModel.ASSOC_CONTAINS, folderName);
Map<String, Serializable> params = new HashMap<String, Serializable>(1);
params.put(TransformActionExecuter.PARAM_MIME_TYPE, MimetypeMap.MIMETYPE_PDF);
params.put(TransformActionExecuter.PARAM_DESTINATION_FOLDER, taskFolderRef);
params.put(TransformActionExecuter.PARAM_ASSOC_TYPE_QNAME, ContentModel.ASSOC_CHILDREN);
params.put(TransformActionExecuter.PARAM_ASSOC_QNAME, QName.createQName("http://www.namespace.com/model/workflow/1.0", "transformed"));
        
Action tAction = new ActionImpl(taskFolderRef,ID,TransformActionExecuter.NAME,null);
transformAction = (TransformActionExecuter)applicationContext.getBean(TransformActionExecuter.NAME);
tAction.setParameterValues(params);       
transformAction.execute(tAction, taskFolderRef);


What am I doing wrong here ?
Any ideas how to do this ?

Outcomes