I developed a workflow using activiti engine and succeeded to integrate it in alfresco .I want to modify one task in my workflow then it generates the creation of documents (word,pdf…) and modifying them. How can I proceed to do it? Which tutorials can help me? Thanks
If you are asking how to create a word doc or a PDF document in their native formats, you're going to have to find and use a Java API to help you do that. You might see if Apache POI will do the trick for your Office document needs.
An alternative would be to write a web service and have your activiti task invoke that service and get called back when the document is done being created. You could then place that document in the repository and add it to the workflow package if that is what you need to do.
If you are asking how to create a new document object in the repository from an Activiti task refer to the Alfresco JavaScript API. You'll want either the createFile or createNode functions that are in ScriptNode.
Thanks Jeff, I used JavaScript to create the document:
var doc1 =createdFolder.createFile(scwf_nomclient); doc1.mimetype = "text/plain"; doc1.content ="nom du projet "+ scwf_nomprojet+"\n nom client "+scwf_nomclient;