defdumpWorkflowChain(self):# This method outputs the workflow chain in the format that you can# easily get diff like the following:# ---# Account,account_workflow# Account,edit_workflow# ...# ---workflow_tool=self.getPortalObject().portal_workflowcbt=workflow_tool._chains_by_typeti=workflow_tool._listTypeInfo()types_info=[]fortinti:id=t.getId()title=t.Title()iftitle==id:title=NoneifcbtisnotNoneandcbt.has_key(id):chain=sorted(cbt[id])else:chain=['(Default)']types_info.append({'id':id,'title':title,'chain':chain})output=[]foriinsorted(types_info,key=lambdax:x['id']):forchainini['chain']:output.append('%s,%s'%(i['id'],chain))return'\n'.join(output)