cancel
Showing results for 
Search instead for 
Did you mean: 

Workdesk Integration into Java/J2EE webapp

cancerian1978
Champ in-the-making
Champ in-the-making
Hi Alfresco Gurus, I am doing some research on the ways to integrate our java based webapp with Alfresco repo and provide the user some kind of UI so that they can browse/add/edit documents. During this I came across Alfresco Workdesk and the UI seems to be perfect for our needs. I downloaded trial version of Alfresco Workdesk and I am impressed with it. Is there a way to integrate this Alfresco workdesk into our application. The solution we are looking for is, we provide a link from our application and pass some parameters which shud open up the workdesk UI with the related search results. Any ideas are welcome and much appreciated.

Regards.
12 REPLIES 12

deko
Star Contributor
Star Contributor
Hi cancerian1978,

The Workdesk feature you are looking for is called "Remote Control", where you can use URL calls to perform following actions:
  • Search for items based on metadata
  • Open a folder
  • View a document
  • Modify/Edit an item´s properties
Please see the section "Remote control interface" in Workdesk Configuration Guide (available via docs.alfresco.com), where the URL parameters for a remote search are explained and examples for searches are given.

Please note also that the Remote Control feature is not available in Workdesk Community Edition.

Best regards,
Dennis

cancerian1978
Champ in-the-making
Champ in-the-making
I have downloaded trial version and trying to access the UI with URL based approach defined in Remote Control Interface and I get the following exceptions, what does this mean?

Error: OwAppContext.handleRequest: External Event Handler, targetId = 'RemoteControl.Doc' not defined or not allowed in RoleManager.
Error Source: OECM

com.wewebu.ow.server.exceptions.OwInvalidOperationException: OwAppContext.handleRequest: External Event Handler, targetId = 'RemoteControl.Doc' not defined or not allowed in RoleManager.

deko
Star Contributor
Star Contributor
Hi cancerian1978,

The issue seems to be the ID in your remote control plugin call. Exception is telling me that you tried targetId = 'RemoteControl.Doc'. You have to use the full plugin id of the Remote Control master plugin as defined in owplugins.xml (PLugin configuration file). If you did not touch the configuration at all, the default id value should be 'com.wewebu.ow.RemoteControl'.

An exemplary Remote Control call to to search for documents could look like the following:

h_ttp://localhost:8080/workdesk/?owappeid=com.wewebu.ow.RemoteControl.Doc&ctrlev=search&plugid=com.wewebu.ow.Search&stname=Find%20Customer%20Documents.xml&maxsize=100&prop_PSmiley Surprisedwdcm:CustomerIDAspect.owdcm:CustomerID=20130214-Germany-24

The parameters here are as followed:

- owappeid=com.wewebu.ow.RemoteControl.Doc
This is the plugin id of the Remote Control master plugin (as defined in owplugins.xml) appended by ".Doc"

- ctrlev=search
Keyword that defines you want to perform a remote search

- plugid=com.wewebu.ow.Search
The plugin ID of the Search master plugin as defined in owplugins.xml

- stname=Find%20Customer%20Documents.xml
The search template name as it can be found under owsearchtemplates (location for search templates). Please escape spaces and special characters!

- maxsize=100
The number of maximum results returned. In this case only the first 100 hits are returned

- prop_PSmiley Surprisedwdcm:CustomerIDAspect.owdcm:CustomerID=20130214-Germany-24
A property value as it should be used in the defined search template. In this case the value of prop_PSmiley Surprisedwdcm:CustomerIDAspect.owdcm:CustomerID should be "20130214-Germany-24"

I hope this example made things clear now and you can get your remote control search to work.

Best regards,
deko

cancerian1978
Champ in-the-making
Champ in-the-making
I got it working now, thank you so much.

deko
Star Contributor
Star Contributor
Feeling happy when you are happy!

Best regards,
deko

cancerian1978
Champ in-the-making
Champ in-the-making
Hi Deko, thanks for your help so far, I got the workdesk remote thing working but it supports limited functionality. Now my question is, are there any alternate solutions like this where I can construct URL and integrate from my application for ex: is there a way to integrate Alfresco Share/Explorer using the same approach or some other UI's.

Regards.

deko
Star Contributor
Star Contributor
Hi cancerian1978,

I don´t fully understand your question. You wanted to  integrate Workdesk into your application and therefore you can only use those remote control URLs at the moment. Do you want to integrate Share now also into your application? Or do you want to integrate Share into Workdesk or the other way round?

You said the functionality is limited, could you please give me the use case you want to address?

Best regards,
deko

cancerian1978
Champ in-the-making
Champ in-the-making
First regarding the workdesk, currently workdesk can be accessed from my webapp using URL's via Remote Control plugin. Using this approach we can search the documents, open a folder, open a document. Is there a way to check-in documents? Also to open a folder/document using URL we need DMS id, how do we get it? Do we need to make a separate webservice call to get the ID and then use it as URL param?

Now coming to my other question, I was asking if is there a way, similar to Workdesk remote control plugin, to access Alfresco Share/Explorer or any other UI using URL based approach.

Please let me know if this is clear or do you need me to elaborate more.

Regards.

deko
Star Contributor
Star Contributor
Hi cancerian1978,

If you want to use "extended" functionality (e.g. checking in a document) I would like to refer you to the Alfresco Rest API or CMIS API, both offering web services to realize such use cases:

- http://wiki.alfresco.com/wiki/Repository_RESTful_API_Reference
- http://wiki.alfresco.com/wiki/CMIS

Regarding the DMSID used in Workdesk, I´d like to point you to the DMSID section in the Workdesk Configuration Guide, where the format of DMSIDs is explained in more detail. As Workdesk is using CMIS to connect to Alfresco, the format of a CMIS DMSI is looking like the following:


ocmis,<native CMIS repository ID>,<native CMIS object ID>

An exemplary DMSID based on that format could look like the following one:


ocmis, 56fe6a25-f3d6-4f6a-b4a4-496fc4c31afb,workspace:||SpacesStore|ca296fcd-15e7-41c2-a368-897d9864cd41

The CMIS repository ID is a fix ID for your Alfresco repo and can be read out using following URL:

h_ttp://SERVERSmiley TongueORT/alfresco/service/cmis/index.html

To retreive the CMIS object ID you might have to call the related services if you don´t know the ID already.

Best regards,
deko