Yoy may want to explore CSSDK.
publishEdition().Interface is CSBranch.
My Requirement is to write a java class for workflow InProcessor or PreProcessor, in that class I need to get the files attached to workflow, which I am able to do.Now my JOB is to check whether those files are already attached to another workflow or task apart from present workflow. If yes, I need to show a error message on instantiation screen or I need to set a job/workflow variable.There is a CLT which I found for this iwgetfilejobs.exe, with which I can easily achieve my functionality with Runtime.getRuntime().exec(command). How can I do same with Workflow java classes?I found one method with CSFile (getRelatedTaskIds()), now my question would be how to convert/cast WFM file to CS file ?I tried couple of ways for casting, no success .. My comfort level with Java is also creating problems
There is a CLT which I found for this iwgetfilejobs.exe, with which I can easily achieve my functionality with Runtime.getRuntime().exec(command). How can I do same with Workflow java classes?I found one method with CSFile (getRelatedTaskIds()), now my question would be how to convert/cast WFM file to CS file ?I tried couple of ways for casting, no success .. My comfort level with Java is also creating problems
Coming from primarily a Perl comfort zone, I can understand this - and although I believe this has been posted several times - the basic code is something like this:public void execute(CSClient client, CSExternalTask task, Hashtable hash) throws CSException { ... CSAreaRelativePath[] flist = task.getFiles(); for (CSAreaRelativePath relPath : flist) { String path = task.getArea().getVPath().toString() + "/" + relPath.toString(); CSSimpleFile csfile = (CSSimpleFile)client.getFile(new CSVPath(path)); ...}There are various places where exceptions could be thrown / caught in the above code segment - it's up to you if you want to catch them or just let them percolate up "naturally".
The issue is that when you create a class for the Pre or Post Processor in a workflow model, you are given a WFMWorkflow instance, with no hooks into the CS framework. There is a lot less you can do with the WFM classes than the CS classes. It's a royal pain in the a$$.