Or maybe another way? I am new to WFM and CSSDK, so go easy on me...I am looking at options to update files from one branch to another within a workflow, but the key is that I want to be able to detect if there is a conflict during the copy. I don't believe this was an option the old Perl way - at least I didn't know of a way to check for a conflict and then send a notification in workflow. Anyway, I don't see any methods in a CSUpdateTask that would indicate whether a conflict was encountered. However if you use CSWorkarea.update(), you can eventually work your way to a CSFileCmpResult.isConflict() method, which would tell you if the file(s) you just attempted to copy resulted in a conflict. The drawback is that I'm not sure if it will tell me which files were in conflict. But it's still nice to at least know there was a conflict so that I could send out a notification.Or is there a better way? Or am I missing something?
Have you tried using perl?
# Assume I have the client instance (client) in my task class# Assume I have a CSArea object pointing at my task's workarea# Assume I have a CSAreaRelativePath[] referencing the files I want to copy from my task's workarea# Create a vpath based on the target branch's workareaCSVpath vPath = new CSVpath("...path to target branch's workarea...");# Using the client object, get the vPath's workarea objectCSWorkarea wa = client.getWorkarea(vPath, true);# Perform the copy from the source CSUpdateResult res = wa.update(files, sourceWAPath, OVERWRITE_ALL);# Get the file comparison results of the copyCSFileCmpResult fcr = res.getResultOfUpdate();#Do something if there were any conflictsif (fcr.isConflict()) { ...do something...}
I flippin' rock! Not that anyone cares...because I am talking to myself....
Maybe you're a bad perl developer and a java programming prodigy? :-)Feel free to keep talking to yourself - I'm sure there are other folks listening...
Yea keep padding your posts and patting yourself on the back. Does your new company know what kind of genius they hired ? You probably should go tell them.