Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Eclipse Process Manager (Stardust) » View a Process Document
View a Process Document [message #1713171] Sun, 01 November 2015 21:52 Go to next message
Ajay KS is currently offline Ajay KSFriend
Messages: 21
Registered: September 2015
Junior Member
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] Mon, 02 November 2015 04:44 Go to previous messageGo to next message
Tanmoy Roy is currently offline Tanmoy RoyFriend
Messages: 41
Registered: September 2013
Member
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 05:36 Go to previous messageGo to next message
Ashish Khole is currently offline Ashish KholeFriend
Messages: 28
Registered: April 2015
Junior Member
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 07:47 Go to previous messageGo to next message
Ajay KS is currently offline Ajay KSFriend
Messages: 21
Registered: September 2015
Junior Member
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 10:05 Go to previous messageGo to next message
Ajay KS is currently offline Ajay KSFriend
Messages: 21
Registered: September 2015
Junior Member
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 11:51 Go to previous message
Ashish Khole is currently offline Ashish KholeFriend
Messages: 28
Registered: April 2015
Junior Member
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 11:52]

Report message to a moderator

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


Current Time: Sun Nov 18 11:03:26 GMT 2018

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

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

Back to the top