, All
In continuation to the thread , (which I sort of hijacked) , I am creating a new discussion
Scenario - Users import Pdf documents or word documents in the repository, ADTS creates PDF rendition of the office documents. Requirement is to publish PDF rendition of office documents or if the document format is PDF, publish the PDF document
There is already a solution in place that starts a workflow , code in first auto activity checks if original format of document is PDF, set a process variable to True, if rendition exists - set second process variable to True . The transition condition defines that if first variable is set to True, move to FTP Outbound Activity say A(it sets the File data to original document data), if second variable is True move to FTP Outbound Activity B (it sets the File data to Rendition[1] data); else send to error activity( that sends an email)
Problem - It is observed that many times this workflow is moving office documents to FTP server. This needs to be fixed so a correction needs to be done
Analysis - After analyzing it was observed that for faulty documents - FTP activity is getting office document in Rendition[1]/data in FTP Outbound Activity B but same solution is working other times ( so its intermittent issue)
After more analysis, it was observed that for faulty documents , when I click View Renditions - it shows PDF document first and office document second in UI and even while issuing query - select * from dmr_content where parent_id ='<<document id>>'
Conclusion - It seems workflow is designed assuming that rendition[1] will always have Pdf rendition but that is not the case
Fix being considered -
1) remove workflow totally and write the logic in a method (including FTP code) and call this method from webtop
2) call a method from web top - if the original document is PDF, start workflow on it; if it has renditions, create a temporary object, attach PDF rendition's content on that object and start workflow on it ( making sure workflow is always started on a pdf document and write some cleanup job to delete these temporary objects)
3) understand how rendition[1] gets the content and accordingly modify first workflow auto method and add one more FTP Outbound Activity C (that sends Rendition[2]/data)
Questions for #3 - is it always the first content returned by the dql ; can we rely on this logic ? if not how can we identify in original workflow's first activity which dmd_content belongs to rendition[1], which belongs to rendition[2]
Please note - in 4 or 5 cases in production we have observed two pdf rendition. probably I may skip that scenario for now
Shoeb,
Can you help how you set process variables with the values that exist for rendition[1] and [2] and suggest your views on above approaches
Kind Regards,
Ashish Srivastava