how is the file is stored in activiti

cancel
Showing results for 
Search instead for 
Did you mean: 
Arun_nmc
Member II

how is the file is stored in activiti

Hi All,

i have  uploaded a  file from a process and it get stored in the activiti server and the respective entries are in  the related_content,content_rendition tables.

i have all details including store id, content_id  for that file. i am in need of undrestanding  the path location of the file in the server.

How can i find out the path location of the file based on the store_id, content id of the  file.

or is there any other way to find the path location of the file.

Kindly help on suggesting your thoughts as early as possible.

 

Thanks

Arun K

 

3 Replies
Arun_nmc
Member II

Re: how is the file is stored in activiti

Hi All,

In my cases, the old requests are continuely keep on failing while generating the document.
While checking the activiti framework code, the below if condition is getting true and get evaluated and throw the exception content with id was not found .
i was able to see the file in the specified location. but, somehow the framework is not able to read the file and throw the exception (Content with id: " + id + " was not found (path: " + file
.toString() + ")").

the file are stored under tomcat/bin/data directory
the rootfolder is set as data/ in the activiti-app.properties file

could you please help on why its still failing.

The below code is from FileSystemContentStorage.java(activiti framework code)

 

shouldExist is defined as true

file.exists() should come as true(looks like it coming as false), not sure why its coming as false even though i  can  able locate the file in the specified directory

 

protected File getFileForId(String id, boolean shouldExist) {
BigInteger idValue = null;
try {
idValue = new BigInteger(id);
} catch (NumberFormatException nfe) {
throw new ContentStorageException("Illegal ID value, only positive numbers are supported: " + id, nfe);
}
File path = this.converter.getPathForId(idValue);
File file = new File(this.rootFolder, path.getPath());
if (shouldExist != file.exists()) {
if (shouldExist)
throw new ContentNotFoundException("Content with id: " + id + " was not found (path: " + file
.toString() + ")");
throw new ContentNotFoundException("Content with id: " + id + " already exists.");
}
return file;
}

Thanks
Arun K

abbask01
Senior Member

Re: how is the file is stored in activiti

by default, APS stores all documents under the act_data folder with date format hierarchy e.g. YYYY/DD/MM/.. the file name is renamed with the content-id.bin, search in the act_folder with his name to locate your content

Regards,
Abbas
Arun_nmc
Member II

Re: how is the file is stored in activiti

Hi,

 

Thanks for the reply.

i am not able to find the act_data folder in my project. However in my app.properties, it set with the following properties.

 

contentstorage.fs.rootFolder=data/
contentstorage.fs.createRoot=true
contentstorage.fs.depth=4
contentstorage.fs.blockSize=1024

I think in my scenario, based on content id,alfresco activiti internally using some logic to  generate the path  location and  store the file in that location.

 

Thanks

Arun K