Page 2 of 4
Re: Upload and Download Form Element In Workflow
PostPosted:Sun Oct 04, 2015 4:30 pm
by jllort
From FileUploadServlet at line 291 you have the line Document doc = OKMDocument.getInstance().getProperties(null, path); I want to know here which is the value of the path variable
after this line, for example add
Code: Select alllog.info("DESTINATION PATH:"+path);
//or
System.out.println("DESTINATION PATH:"+path);
Re: Upload and Download Form Element In Workflow
PostPosted:Tue Oct 06, 2015 12:37 am
by alexwgordon
Hi jllort,
I tried both those lines and neither seems to output anything. Not sure why. Any thoughts?
Re: Upload and Download Form Element In Workflow
PostPosted:Thu Oct 08, 2015 3:19 pm
by jllort
You should see in log the data, or debugging set a break point in that line to see the value of "path" variable.
Re: Upload and Download Form Element In Workflow
PostPosted:Mon Oct 12, 2015 6:19 pm
by alexwgordon
Hi Jllort
So after some digging it doesn't look as though the servlet utilizes that part of the code based on the IF statement above it. I placed the debugging near the catch (PathNotFoundException) and it has the path as blank —this only happens when the mismatch check is not checked. When it is checked, I get nothing in the log either.
Where do we go from here?
Re: Upload and Download Form Element In Workflow
PostPosted:Wed Oct 14, 2015 5:28 pm
by jllort
In FileUploadServlet.java yould be set the path otherwise you get the error pathNotFound exception. Well path comes from frontend, should debug formManager ( the method I explained before where the data is injected into GWTDocument ) and also the class FileUploadPopup ( for it you need execute shell and debug with gwt ) the code where to set the break point should be
Re: Upload and Download Form Element In Workflow
PostPosted:Wed Oct 21, 2015 2:27 pm
by alexwgordon
I apologize for my lack of knowledge, I'm still learning the portable dev environment and Eclipse, but how can do I debug with GWT? When I run GWT dev I get an "Unable to Connect - site unavailable." And am I launching shell from Remote Shell > Local > Local Shell? Sorry for the newbie questions, but I'm still learning

Thanks jllort!
Re: Upload and Download Form Element In Workflow
PostPosted:Sun Oct 25, 2015 9:44 am
by jllort
In tools you have the portable firefox. When the shell is enabled connect to openkm using portable firefox ( what comes with GWT component yet installed ) and url
http://localhost:8080/OpenKM/frontend/i ... 0.0.1:9997
Re: Upload and Download Form Element In Workflow
PostPosted:Sat Dec 12, 2015 1:52 am
by alexwgordon
So I've tried attempting to get into the GWT environment by running the "GWT 6.3 DEV" config from Run as... and opening the shell by right clicking on my project, going to "Show in Remote Systems View" then right-click on the project folder and going to "Launch Shell", but still am getting a Unable to Connect in my browser.
Re: Upload and Download Form Element In Workflow
PostPosted:Sat Dec 12, 2015 2:00 am
by alexwgordon
Is there any updated examples/documentation on the upload and/or download workflow elements? I think if there was something that works that I could look at, I could troubleshoot this a bit better.
Re: Upload and Download Form Element In Workflow
PostPosted:Tue Dec 15, 2015 8:00 pm
by jllort
OpenKM portable (
http://sourceforge.net/projects/openkmportabledev/ ) comes with GWT dev environment yet configured and firefox portable with GWT plugin too.
About sample we will try to explain more clear on next documentation version, we are still working on it.
uuid is a valid document uuid.
Code: Select all<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE workflow-forms PUBLIC "-//OpenKM//DTD Workflow Forms 2.6//EN"
"http://www.openkm.com/dtd/workflow-forms-2.6.dtd">
<workflow-forms>
<workflow-form task="download test">
<download name="download" label="Download document">
<node label="download" uuid="afb8ac33-912d-4515-e29b-1c01b693809a" />
</download>
</workflow-form>
</workflow-forms>
folderUuid is a valid folder uuid.
Code: Select all<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE workflow-forms PUBLIC "-//OpenKM//DTD Workflow Forms 2.6//EN"
"http://www.openkm.com/dtd/workflow-forms-2.6.dtd">
<workflow-forms>
<workflow-form task="upload test">
<upload name="upload" label="Upload document" folderUuid="fca2d85e-0e01-418d-b699-c0dd0f8190da" />
</workflow-form>
</workflow-forms>
or
data is a valid mapping variable . This variable is used to dynamically set documentUuid attribute.
Code: Select all<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE workflow-forms PUBLIC "-//OpenKM//DTD Workflow Forms 2.6//EN"
"http://www.openkm.com/dtd/workflow-forms-2.6.dtd">
<workflow-forms>
<workflow-form task="upload test">
<upload name="upload" label="Upload document" type="update" data="dynamic" />
</workflow-form>
</workflow-forms>
Re: Upload and Download Form Element In Workflow
PostPosted:Wed Dec 23, 2015 12:04 am
by alexwgordon
I have yet to be able to get the portable edition of OKM to get GWT to work correctly. What settings need to be tweaked in order for it to be setup in the portable edition?
When using the upload or download in the form, how do you use the dynamic "data" parameter to assign the current file's uuid? I'm assuming this is done via another class that can assign it? I feel like this portion of the documentation was not clear.
Re: Upload and Download Form Element In Workflow
PostPosted:Wed Dec 23, 2015 7:41 pm
by alexwgordon
So, I was able to get the download working with a dynamic uuid. See my code below:
Code: Select allString uuid = (String) context.getContextInstance().getVariable("uuid");
Download downloadFile = new Download();
List<Node> nodeList = new ArrayList<Node>();
Node node = new Node();
node.setUuid(uuid);
node.setLabel("Download File");
nodeList.add(node);
downloadFile.setNodes(nodeList);
context.getContextInstance().setVariable("downloadFile", downloadFile);
Now I'm just working on the upload portion.
Re: Upload and Download Form Element In Workflow
PostPosted:Wed Dec 23, 2015 8:53 pm
by alexwgordon
Still getting a OKM: 005015. With the steps from above Destination Path is " " and still unable to get GWT functioning.
Code: Select all2015-12-23 12:54:24,119 [http-bio-127.0.0.1-8080-exec-1] INFO com.openkm.servlet.frontend.FileUploadServlet- DESTINATION PATH:
Where should the event be triggered in the workflow for my upload.java to work correctly? (i.e. node-enter, process-start, task-create, etc)?
Re: Upload and Download Form Element In Workflow
PostPosted:Fri Dec 25, 2015 11:29 am
by jllort
Should stop at FormManager.java with gwt shell enabled.
Take a look here for debuging with gwt
http://wiki.openkm.com/index.php/Debugging_with_GWT
Re: Upload and Download Form Element In Workflow
PostPosted:Thu Feb 11, 2016 11:31 pm
by alexwgordon
Hi jllort,
I've been on a break from OpenKM hoping I would find some clarity, but am coming back confused as ever. I feel like I'm running into one problem after the next, but I'm still trying to get the Upload element to update still. I've been unsuccessful at setting up the GWT from the portable OpenKM which is another issue altogether so I haven't been able to do any further troubleshooting there.
1. Is there any documentation on setting up GWT with portable OpenKM?
2. And I have been still getting the 005015 error. Is there any new documentation on implementing the Upload form element?
3. Does it matter what type of node the Upload Handler is used on? And does it matter when the action is executed? (I'm assuming that both of the answers are "yes" and I'm doing something wrong with those - I hope).
Thank jllort