Do you know if I can do that with url command?
public class AttachDependentFilesTask extends AbstractUrlExternalTask { protected final Log mLogger = LogFactory.getLog(getClass()); protected final int WORKAREA_TYPE =0;@Overrideprotected void handleExecution(TaskContext context) throws CSException { CSClient client = context.getClient(); CSTask task = context.getTask(); try { CSAreaRelativePath[] files = task.getFiles(); CSArea taskArea = task.getArea(); CSWorkarea wa = client.getWorkarea(taskArea.getVPath(),true); for(int i=0 ; files!=null && i < files.length; i++) { if(files.toString().contains("templatedata")) { String vpath =files.toString(); CSVPath dcrPath = new CSVPath(wa.getVPath() + "/" + vpath); CSFile file = client.getFile(dcrPath); CSAssociation[] list= file.getChildAssociations(null, true, false,true); List pagelist = new ArrayList(); for(int cnt=0 ; list!=null && cnt < list.length; cnt++) { CSVPath filePath = new CSVPath(list[cnt].getChild().getUAI()); if (this.mLogger.isDebugEnabled()) { this.mLogger.debug("Associated Child file : " + filePath); } if (filePath.getAreaType()==WORKAREA_TYPE) { pagelist.add(new CSAreaRelativePath (filePath.getAreaRelativePath())); } } if(pagelist.size()>0 ){ task.attachFiles(pagelist.toArray(new CSAreaRelativePath[ pagelist.size()])); } } } Callback callbck = WorkflowUtils.getSuccessCallback(context.getTask(), null); context.setCallback(callbck); if (this.mLogger.isDebugEnabled()) { this.mLogger.debug("callbck : " + callbck.getName()); } } catch (CSException cse) { Callback callbck = WorkflowUtils.getFailureCallback(context.getTask(), null,null); context.setCallback(callbck); if (this.mLogger.isDebugEnabled()) { this.mLogger.debug("callbck : " + callbck.getName()); } throw new RuntimeException("Error while addding the files : " + cse.getMessage(), cse); }}}