Recursive Folder Creation (Single Activity) using Workflows
Hi all,
I have a couple of months of experience in documentum.
Now I am working on workflows.
My requirement is like to create recursive folders dynamically by reading the values from XML file.
In the tags of XML file the names for the folders will be mentioned.
Please suggest me how to proceed.
Any help will be greatly appreciated.
Thanks and Regards,
Anees
Comments
-
Hi Johnny,
Thanks for your response but please suggest me how to create recursive folders. I need to check if the folder is present in the repository i need not to create it if it is not present then create it. This criteria i need to do for 6 folders. . Also I should not hard-code the folder path.Please suggest me how to move on.
Thank you.
0 -
The idea is:
Parse your folder path, say using tokenizer or other ways. i.e. /CABINETS/FolderA/FolderB/FolderC, by "/" separator, which will give you in this example 4 elements CABINETS, FolderA FolderB and FolderC.
Then loop through, and verify whether each folder exists, if it does, then continue, else, create it.
It's good idea to make this operation as SBO, so it can be leveraged through out the application. You need to pass probably a IDfSession variable, and a String folder path. then let the SBO takes care of verifying and creating the folder.
Good idea would be to make the verify operation *synchronized*, to prevent simultaneous creation of the same folder, since/if it's a web app client.
0 -
Hi Ahmed. Thanks for your response. If you please help me to send sample DFC code to do this.
We are preferring to use only workflows not SBO. Please try to respond.
Thank you.
0 -
Look in the Documentum Component Exchange for sample code:
https://developer-content.emc.com/developer/componentexchange.htm#0900c35580916f6d
0 -
Thank you Johnny for sharing information.
It was really helpful.
Thanks a lot.
0 -
Hi Johnny. Recursive folder creation is about to complete.
But please help me to know how to configure loggers in Workflows/Activities.
0 -
My log4j configuration:
log4j.logger.com.agility.methods=DEBUG,recursivefolder
log4j.appender.recursivefolder=org.apache.log4j.DailyRollingFileAppender
log4j.appender.recursivefolder.layout=org.apache.log4j.PatternLayout
log4j.appender.recursivefolder.layout.ConversionPattern=%d{yyMMdd HH:mm:ss,SSS} %-5p %c | %m%
log4j.appender.recursivefolder.File=E\:/log_files/RecursiveFolderCreate1.log
log4j.appender.recursivefolder.Append=true
log4j.appender.recursivefolder.DatePattern='.'yyyy-MM-dd
This code I updated in location E:\Documentum\jboss7.1.1\server\DctmServer_MethodServer\deployments\ServerApps.ear\APP-INF\classes\log4j.properties
The log file is created but the messages are not logged into the file.
log4j.rootCategory=WARN, A1, F1 is the first statement int he log4j.properties
How to proceed. Please Explain.
Thank you.
0 -
Hi Johnny.Please refer debugging statements.
protected int doTask(IDfWorkitem idfworkitem, IDfProperties idfproperties, PrintWriter printwriter)
throws Exception{
DfLogger.debug(this, "Executing doTask()..", null, null);
IDfSessionManager idfsessionmanager;
String folder_full_name;
String type="dm_folder";
folder_full_name =(idfproperties.getString(CONTAINING_FOLDER_NAME));
folder_full_name=folder_full_name.trim();
String pathSep="/";
String basePath="";
idfsessionmanager = getSessionManager();
int i;
//String folderPath=" '"+CONTAINING_FOLDER_NAME+"' ";
String folderPath=""+folder_full_name+"";
DfLogger.debug(this, "Folder Path Obtained", null, null);
These statements are not logged into the log file. All the statements in my code are DfLogger.debug(this," ",null,null);
Thanks for your response.
0 -
Yes I cleared JMS cache and restart the JMS but no results.
Thank you
0
Categories
- All Categories
- 108 Developer Announcements
- 49 Articles
- 100 General Questions
- 122 IM Services
- 40 OpenText Hackathon
- 31 Developer Tools
- 20.6K Analytics
- 4.1K AppWorks
- 8.9K Extended ECM
- 897 Cloud Fax and Notifications
- 77 Digital Asset Management
- 9.3K Documentum
- 29 eDOCS
- 120 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management