Skip to main content



      Home
Home » Archived » Eclipse Process Manager (Stardust) » View a Process Document
View a Process Document [message #1713171] Sun, 01 November 2015 16:52 Go to next message
Eclipse UserFriend
Hi,

I have a query related to viewing a process document.

I have attached a PDF document to a process through some activity. Now, I want to view this document through some other activity of the same process in a NEW TAB on the browser. Is there any URL that gets created for each and every attached process document using its documentID, so that we can view it separately on the browser.

Please suggest.

Thanks
Ajay

Re: View a Process Document [message #1713177 is a reply to message #1713171] Sun, 01 November 2015 23:44 Go to previous messageGo to next message
Eclipse UserFriend
Hi Ajay,

If your requirement is to view the attached document in following activity then this can be done using DMS operation, you can do other operation like view, update, version, delete etc.

here is the help document
http://help.eclipse.org/mars/topic/org.eclipse.stardust.docs.dms/html/dms/dms-examples.html?resultof=%22%64%6f%63%75%6d%65%6e%74%22%20%22%61%63%74%69%76%69%74%79%22%20%22%61%63%74%69%76%22%20

Thanks,
Tanmoy Roy
Re: View a Process Document [message #1713179 is a reply to message #1713177] Mon, 02 November 2015 00:36 Go to previous messageGo to next message
Eclipse UserFriend
Hi Ajay,

When you open the attached document in process , you can see a option "Popout Document" which opens the document in a new window.
index.php/fa/23804/0/

Hope this serves your purpose.

-Ashish
Re: View a Process Document [message #1713186 is a reply to message #1713179] Mon, 02 November 2015 02:47 Go to previous messageGo to next message
Eclipse UserFriend
Hi Ashish and Tanmoy,

Thanks for your valuable suggestions!
However, What I am looking for is the hyperlink of an attached document (which is attached to a process), so that I can show that hyperlink on a UI mashup activity and on click of that hyperlink, the document gets opened.

Please suggest.

Thanks
Ajay
Re: View a Process Document [message #1713466 is a reply to message #1713186] Wed, 04 November 2015 05:05 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

Could you please update. I need it urgently.

Thanks in advance!

Ajay
Re: View a Process Document [message #1715120 is a reply to message #1713466] Thu, 19 November 2015 06:51 Go to previous message
Eclipse UserFriend
Hi Ajay,

I have attached a sample model which takes pdf documents as process attachments in first manualActivity and the next activity(i.e JavaApplication) gets the documentList from the process and the third activity(i.e UIMashup) shows list of those documents with a link which on click opens the document.

Following is the code to get the ProcessDocs used in JavaApp:
public ArrayList<HashMap<String, String>> getDocuments(Long processOid) {
		ArrayList<HashMap<String, String>> docList = new ArrayList<HashMap<String,String>>();
		ServiceFactory sf= ServiceFactoryLocator.get("motu","motu");
		DocumentManagementService dms = sf.getDocumentManagementService();
		Object processAttachment = sf.getWorkflowService().getInDataPath(processOid, "PROCESS_ATTACHMENTS");

		if (processAttachment instanceof Collection) {
			Collection<?> pAttCol = (Collection<?>) processAttachment;
			for (Object obj : pAttCol) {
				if (obj instanceof Document) {
					HashMap<String,String> doc = new HashMap<String,String>();
					Document saveDoc = (Document) obj;
					byte[] byteArr= dms.retrieveDocumentContent(saveDoc.getPath());
					String content = new BASE64Encoder().encode(byteArr).toString();
					doc.put("docId", saveDoc.getName());
					doc.put("docContent", content);
					doc.put("mimeType", saveDoc.getContentType());
					docList.add(doc);
				}
			}
		}
		return docList;
	}
}


The Sample model is just for PDF. You can enhance it further as per your needs.
Hope this helps.

Cheers!!!!
Ashish

[Updated on: Thu, 19 November 2015 06:52] by Moderator

Previous Topic:How to delete wrong Rule Set
Next Topic:Problems deploying to Tomcat
Goto Forum:
  


Current Time: Sun Jun 22 02:46:05 EDT 2025

Powered by FUDForum. Page generated in 0.05153 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top