• Upload and Download Form Element In Workflow

  • OpenKM has many interesting features, but requires some configuration process to show its full potential.
OpenKM has many interesting features, but requires some configuration process to show its full potential.
Forum rules: Please, before asking something see the documentation wiki or use the search feature of the forum. And remember we don't have a crystal ball or mental readers, so if you post about an issue tell us which OpenKM are you using and also the browser and operating system version. For more info read How to Report Bugs Effectively.
 #40450  by alexwgordon
 
Hi Guys,

So I'm a little confused on the implementation of the Upload and Download form elements in a workflow. It is required to create a new class that can handle this operation or is there a class that I'm not seeing already provided?

I've seen this post http://forum.openkm.com/viewtopic.php?t=10539 and read the form element definitions http://wiki.openkm.com/index.php/Form_E ... escription, but I'm still not clear as to what the proper procedure for implementing a download file button and an upload file for both update and creation.

For upload my understanding is that I must use something like this code in my form:
Code: Select all
<upload name="upload" label="Update File" data="upload" type="update"></upload>
with the corresponding ActionHandler:
Code: Select all
public class uploadUpdate implements ActionHandler {

   private static final long serialVersionUID = 1L;

   @Override
   public void execute(ExecutionContext context) throws Exception {
      
      String uuid = (String) context.getContextInstance().getVariable("uuid");

      Upload up = new Upload();
      up.setDocumentUuid(uuid);
      up.setName("upload");
      up.setType("update");
      up.setData("upload");
      up.setLabel("Update File");
      context.getContextInstance().createVariable("upload", up);   

   }
}
I get the following error:
Code: Select all
file.pdf: Document name is diferent
When I look at the Process Variables I see this:
Code: Select all
{label=Update File, name=upload, width=33, height=25px, folderPath=, folderUuid=, documentName=, documentUuid=bacb6fd8-dd1f-4b95-a07b-e444ae1c5511, type=update, data=upload, validators=[]}
I have also tried this code:
Code: Select all
public class uploadUpdate implements ActionHandler {

	   private static final long serialVersionUID = 1L;

	   @Override
	   public void execute(ExecutionContext context) throws Exception {
	      
	      String uuid = (String) context.getContextInstance().getVariable("uuid");
	      String documentName = (String) context.getContextInstance().getVariable("name");
	      context.getContextInstance().createVariable("documentName",documentName);
	      String token = context.getToken().toString();
	      String folderPath = OKMRepository.getInstance().getNodePath(token, uuid);

	      Upload up = new Upload();
	      up.setDocumentUuid(uuid);
	      up.setDocumentName(documentName);
	      up.setName("upload");
	      up.setFolderPath(folderPath);
	      up.setType("update");
	      context.getContextInstance().createVariable("upload", up);   

	   }
	}
with this result for the var "upload" and still getting the same error that the names are different:
Code: Select all
{label=, name=upload, width=33, height=25px, folderPath=/okm:root/file.pdf, folderUuid=, documentName=null, documentUuid=bacb6fd8-dd1f-4b95-a07b-e444ae1c5511, type=update, data=, validators=[]}
Not sure why the documentName comes up as "null". I've also tried not setting the documentName or FolderPath since it says
If you want to update an existing document, then should set documentUuid and put type to update.
http://wiki.openkm.com/index.php/Form_E ... escription


I'm not quite sure what it is that I'm missing here. I've tried this persons code http://forum.openkm.com/viewtopic.php?f ... oad#p18434 exactly and setting the action event type to NODE-ENTER I believe and that worked just fine as long as I set everything explicitly and it was sent to a different folder for a "create" scenario. I also tried modifying his code to just do an update with no luck.




And download I'm a bit more confused. Something like this form?:
Code: Select all
<download name="download" label="Download" data="downloadThisFile">
<node label="" />
</download>
And some sort of corresponding download ActionHandler? I've dug up this page http://doxygen.openkm.com/openkm_6.2.0/ ... 19ebff588a, but I'm not exactly getting how to set the UUID and path to make sure I'm downloading the correct file into the node.

Something I did realize after a while is that the ActionHandler must be assigned to the node as an event action. I set the EVENT TYPE to before-signal.

Sorry for all the information! I would love some help on this one! Thanks everyone :D
 #40467  by jllort
 
For example:
Code: Select all
<workflow-form task="upload test">
    <upload name="upload" label="Upload document" folderUuid="fca2d85e-0e01-418d-b699-c0dd0f8190da" />
</workflow-form>
And dynamic should be:
Code: Select all
<workflow-form task="upload test">
    <upload name="upload" label="Upload document" type="update" data="dynamic" />
</workflow-form>
Note type can have two values : create or update. In case create destination folder has sense, in case update then has sense document uuid. Take a look at http://www.openkm.com/dtd/workflow-forms-2.5.dtd for allowed atrributes
Code: Select all
<!ELEMENT upload (validator*)>
<!ATTLIST upload
	label CDATA #REQUIRED
	name CDATA #REQUIRED
	width CDATA #IMPLIED
	height CDATA #IMPLIED
	folderPath CDATA #IMPLIED
	folderUuid CDATA #IMPLIED
	documentName CDATA #IMPLIED
	documentUuid CDATA #IMPLIED
	type (create | update) "create"
	data CDATA #IMPLIED
>
Also can take a look here http://wiki.openkm.com/index.php/Form_E ... escription

About inject new variable from task, you're in the correct way if you're updating a file, if you're creating is only necessary when destination folder is also dynamic.
 #40478  by alexwgordon
 
Hi jllort,

Thanks for the reply! So the folder will be dynamic since (at least as I have it right now) the user will update the file wherever it was originally uploaded.

1. Is `data="dynamic"` a set value that needs to be used or is that a variable that you're calling in an ActionHandler for a dynamic file information?
2. Which of the event type for the action handler is correct, for example, "Before-signal" "Node-enter" or "process start"?
3. Is this one of those instances where I need to incorporate my java file into openKM instead of deploying with my workflow?
4. I keep getting a "file.pdf: OKM-005015" with no errors in the console.

Thank you so much for your help!
 #40494  by jllort
 
I think the Action Handler before the task execution is right injecting the variable, but there is a mistake with Upload object:
Code: Select all
Upload up = new Upload();
up.setDocumentUuid(uuid);
up.setDocumentName(documentName);
up.setName("upload");
up.setFolderPath(folderPath);
up.setType("update");
context.getContextInstance().createVariable("upload", up);
Should be set only the folderPath for a creation ( combination of documenttuuid and folderPath is not allowed, must be only one of these ).
Code: Select all
Upload up = new Upload();
up.setName("upload");
up.setFolderPath(folderPath);
up.setType("create");
context.getContextInstance().createVariable("upload", up);
 #40499  by alexwgordon
 
Hi jllort,

Thanks for the clarification! However, I'm not having issue with a creation of the document. I'm only having issue with an "update." It always seems to say that the "Document name is different." For the life of me I can't figure out what's causing that issue. Thanks jllort!
 #40515  by jllort
 
OpenKM check by default document name is equal to repository one before change document version. You can try remove this check from Administration > Configuration parameters system.document.name.mismatch.check ( try disabling it ).
 #40580  by alexwgordon
 
Hi jllort,

So with the check enabled, I get "file name is different"

With the check disabled, I get "OKM-005015" which is the upload error and path not found.

I initially saw that my path was set to "/okm:root/file.pdf" so I tried explicitly setting it as "/okm:root/" and that did not help either. I also tried setting the FolderUuid explicitly as well and that gave me the same OKM-005015 error as well.

Any ideas? Thanks!
 #40614  by alexwgordon
 
In the catalina.log, I don't specifically see an error which is confusing.
Code: Select all
2015-09-24 10:12:38,490 [http-bio-127.0.0.1-8080-exec-8] INFO  com.openkm.servlet.WorkflowRegisterServlet- Deploying process archive: dummy.par
2015-09-24 10:12:38,538 [http-bio-127.0.0.1-8080-exec-8] WARN  org.jbpm.jpdl.xml.JpdlXmlReader- process xml warning: swimlane 'initiator' does not have an assignment
2015-09-24 10:12:38,553 [http-bio-127.0.0.1-8080-exec-8] WARN  org.jbpm.jpdl.xml.JpdlXmlReader- process parse warning: swimlane 'initiator' does not have an assignment
2015-09-24 10:12:38,553 [http-bio-127.0.0.1-8080-exec-8] INFO  com.openkm.util.FormUtils$LocalResolver- resolveEntity(publicId=-//OpenKM//DTD Workflow Forms 2.5//EN, systemId=http://www.openkm.com/dtd/workflow-forms-2.5.dtd) => C:\openkm-dev\tomcat-7.0.27\webapps\OpenKM\WEB-INF\classes\dtd\workflow-forms-2.5.dtd
2015-09-24 10:12:38,631 [http-bio-127.0.0.1-8080-exec-8] INFO  com.openkm.servlet.WorkflowRegisterServlet- Status: Process ApprovalWorkflow deployed successfully
2015-09-24 10:12:55,513 [http-bio-127.0.0.1-8080-exec-7] INFO  com.openkm.util.FormUtils$LocalResolver- resolveEntity(publicId=-//OpenKM//DTD Workflow Forms 2.5//EN, systemId=http://www.openkm.com/dtd/workflow-forms-2.5.dtd) => C:\openkm-dev\tomcat-7.0.27\webapps\OpenKM\WEB-INF\classes\dtd\workflow-forms-2.5.dtd
2015-09-24 10:12:55,545 [http-bio-127.0.0.1-8080-exec-7] WARN  org.hibernate.engine.StatefulPersistenceContext.ProxyWarnLog- Narrowing proxy to class org.jbpm.graph.node.StartState - this operation breaks ==
2015-09-24 10:12:55,560 [http-bio-127.0.0.1-8080-exec-7] WARN  org.hibernate.engine.StatefulPersistenceContext.ProxyWarnLog- Narrowing proxy to class org.jbpm.graph.node.TaskNode - this operation breaks ==
2015-09-24 10:12:55,592 [http-bio-127.0.0.1-8080-exec-7] WARN  org.hibernate.engine.StatefulPersistenceContext.ProxyWarnLog- Narrowing proxy to class org.jbpm.graph.node.TaskNode - this operation breaks ==
2015-09-24 10:12:58,712 [http-bio-127.0.0.1-8080-exec-2] INFO  com.openkm.util.FormUtils$LocalResolver- resolveEntity(publicId=-//OpenKM//DTD Workflow Forms 2.5//EN, systemId=http://www.openkm.com/dtd/workflow-forms-2.5.dtd) => C:\openkm-dev\tomcat-7.0.27\webapps\OpenKM\WEB-INF\classes\dtd\workflow-forms-2.5.dtd
2015-09-24 10:12:58,712 [http-bio-127.0.0.1-8080-exec-1] WARN  org.hibernate.engine.StatefulPersistenceContext.ProxyWarnLog- Narrowing proxy to class org.jbpm.graph.node.TaskNode - this operation breaks ==
2015-09-24 10:13:00,040 [http-bio-127.0.0.1-8080-exec-7] WARN  org.hibernate.engine.StatefulPersistenceContext.ProxyWarnLog- Narrowing proxy to class org.jbpm.graph.node.TaskNode - this operation breaks ==
2015-09-24 10:13:00,040 [http-bio-127.0.0.1-8080-exec-7] WARN  org.hibernate.engine.StatefulPersistenceContext.ProxyWarnLog- Narrowing proxy to class org.jbpm.graph.node.StartState - this operation breaks ==
2015-09-24 10:13:00,040 [http-bio-127.0.0.1-8080-exec-7] WARN  org.hibernate.engine.StatefulPersistenceContext.ProxyWarnLog- Narrowing proxy to class org.jbpm.graph.node.TaskNode - this operation breaks ==
2015-09-24 10:13:00,119 [http-bio-127.0.0.1-8080-exec-2] WARN  org.hibernate.engine.StatefulPersistenceContext.ProxyWarnLog- Narrowing proxy to class org.jbpm.graph.node.TaskNode - this operation breaks ==
2015-09-24 10:13:00,150 [http-bio-127.0.0.1-8080-exec-7] INFO  com.openkm.util.FormUtils$LocalResolver- resolveEntity(publicId=-//OpenKM//DTD Workflow Forms 2.5//EN, systemId=http://www.openkm.com/dtd/workflow-forms-2.5.dtd) => C:\openkm-dev\tomcat-7.0.27\webapps\OpenKM\WEB-INF\classes\dtd\workflow-forms-2.5.dtd
2015-09-24 10:13:00,150 [http-bio-127.0.0.1-8080-exec-1] WARN  org.hibernate.engine.StatefulPersistenceContext.ProxyWarnLog- Narrowing proxy to class org.jbpm.graph.node.TaskNode - this operation breaks ==
2015-09-24 10:13:07,998 [http-bio-127.0.0.1-8080-exec-7] WARN  org.hibernate.engine.StatefulPersistenceContext.ProxyWarnLog- Narrowing proxy to class org.jbpm.graph.node.TaskNode - this operation breaks ==
2015-09-24 10:13:07,998 [http-bio-127.0.0.1-8080-exec-7] WARN  org.hibernate.engine.StatefulPersistenceContext.ProxyWarnLog- Narrowing proxy to class org.jbpm.graph.node.StartState - this operation breaks ==
2015-09-24 10:13:08,013 [http-bio-127.0.0.1-8080-exec-7] WARN  org.hibernate.engine.StatefulPersistenceContext.ProxyWarnLog- Narrowing proxy to class org.jbpm.graph.node.TaskNode - this operation breaks ==
2015-09-24 10:13:15,487 [http-bio-127.0.0.1-8080-exec-2] INFO  com.openkm.util.FormUtils$LocalResolver- resolveEntity(publicId=-//OpenKM//DTD Workflow Forms 2.5//EN, systemId=http://www.openkm.com/dtd/workflow-forms-2.5.dtd) => C:\openkm-dev\tomcat-7.0.27\webapps\OpenKM\WEB-INF\classes\dtd\workflow-forms-2.5.dtd
2015-09-24 10:13:17,781 [http-bio-127.0.0.1-8080-exec-2] WARN  org.hibernate.engine.StatefulPersistenceContext.ProxyWarnLog- Narrowing proxy to class org.jbpm.graph.node.TaskNode - this operation breaks ==
2015-09-24 10:13:17,781 [http-bio-127.0.0.1-8080-exec-2] WARN  org.hibernate.engine.StatefulPersistenceContext.ProxyWarnLog- Narrowing proxy to class org.jbpm.graph.node.TaskNode - this operation breaks ==
 #40622  by jllort
 
You're using version 6.3 no ? you have got the same error 005015 ? these error indicate the path has not been found.

Do you have openkm portable ide, otherwise download ( https://sourceforge.net/projects/openkmportabledev/ ). I would like you get openkm running from development environment and try from there.

Modify the class FileUploadServlet.java and at line 374 add. Then we will see the full stack trace error. Also you will be able to debug the code.
Code: Select all
e.printStackTrace();
 #40629  by alexwgordon
 
Hi Jllort,

Yup, I'm using 6.3 Portable Dev.

I edited the FileUploadServlet.java withe the code. Here are the results.
Code: Select all
2015-09-28 20:46:28,935 [http-bio-127.0.0.1-8080-exec-2] WARN  org.hibernate.engine.StatefulPersistenceContext.ProxyWarnLog- Narrowing proxy to class org.jbpm.graph.node.TaskNode - this operation breaks ==
2015-09-28 20:46:28,935 [http-bio-127.0.0.1-8080-exec-2] WARN  org.hibernate.engine.StatefulPersistenceContext.ProxyWarnLog- Narrowing proxy to class org.jbpm.graph.node.StartState - this operation breaks ==
2015-09-28 20:46:28,951 [http-bio-127.0.0.1-8080-exec-2] WARN  org.hibernate.engine.StatefulPersistenceContext.ProxyWarnLog- Narrowing proxy to class org.jbpm.graph.node.TaskNode - this operation breaks ==
2015-09-28 20:46:29,030 [http-bio-127.0.0.1-8080-exec-2] WARN  org.hibernate.engine.StatefulPersistenceContext.ProxyWarnLog- Narrowing proxy to class org.jbpm.graph.node.TaskNode - this operation breaks ==
2015-09-28 20:46:29,061 [http-bio-127.0.0.1-8080-exec-6] INFO  com.openkm.util.FormUtils$LocalResolver- resolveEntity(publicId=-//OpenKM//DTD Workflow Forms 2.5//EN, systemId=http://www.openkm.com/dtd/workflow-forms-2.5.dtd) => C:\openkm-dev\tomcat-7.0.27\webapps\OpenKM\WEB-INF\classes\dtd\workflow-forms-2.5.dtd
2015-09-28 20:46:29,077 [http-bio-127.0.0.1-8080-exec-8] WARN  org.hibernate.engine.StatefulPersistenceContext.ProxyWarnLog- Narrowing proxy to class org.jbpm.graph.node.TaskNode - this operation breaks ==
com.openkm.core.PathNotFoundException: 
	at com.openkm.dao.NodeBaseDAO.calculatePathFromUuid(NodeBaseDAO.java:206)
	at com.openkm.dao.NodeBaseDAO.getPathFromUuid(NodeBaseDAO.java:115)
	at com.openkm.dao.NodeBaseDAO.calculatePathFromUuid(NodeBaseDAO.java:184)
	at com.openkm.dao.NodeBaseDAO.getPathFromUuid(NodeBaseDAO.java:108)
	at com.openkm.module.db.DbDocumentModule.getProperties(DbDocumentModule.java:417)
	at com.openkm.api.OKMDocument.getProperties(OKMDocument.java:105)
	at com.openkm.servlet.frontend.FileUploadServlet.doPost(FileUploadServlet.java:304)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:646)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
	at com.openkm.servlet.frontend.UploadThrottleFilter.doFilter(UploadThrottleFilter.java:52)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:311)
	at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:116)
	at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
	at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
	at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:101)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
	at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
	at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
	at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
	at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:182)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
	at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
	at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:173)
	at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
	at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040)
	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)
	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:315)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:745)
2015-09-28 20:46:42,869 [http-bio-127.0.0.1-8080-exec-6] WARN  org.hibernate.engine.StatefulPersistenceContext.ProxyWarnLog- Narrowing proxy to class org.jbpm.graph.node.TaskNode - this operation breaks ==
2015-09-28 20:46:42,869 [http-bio-127.0.0.1-8080-exec-6] WARN  org.hibernate.engine.StatefulPersistenceContext.ProxyWarnLog- Narrowing proxy to class org.jbpm.graph.node.StartState - this operation breaks ==
2015-09-28 20:46:42,885 [http-bio-127.0.0.1-8080-exec-6] WARN  org.hibernate.engine.StatefulPersistenceContext.ProxyWarnLog- Narrowing proxy to class org.jbpm.graph.node.TaskNode - this operation breaks ==

Here is my current workflow:
Code: Select all
package com.openkm.workflow.approval;

import org.jbpm.graph.def.ActionHandler;
import org.jbpm.graph.exe.ExecutionContext;
import com.openkm.api.OKMRepository;
import com.openkm.bean.form.Upload;
import com.openkm.module.db.stuff.DbSessionManager;
import com.openkm.util.PathUtils;


public class uploadUpdate implements ActionHandler {

	   private static final long serialVersionUID = 1L;

	   @Override
	   public void execute(ExecutionContext context) throws Exception {
	      
	      String uuid = (String) context.getContextInstance().getVariable("uuid");
	      String token = DbSessionManager.getInstance().getSystemToken();
	      String docPath = OKMRepository.getInstance().getNodePath (token, uuid);
	      String fldPath = PathUtils.getParent(docPath);
	      
	      Upload up = new Upload();
	      up.setDocumentUuid(uuid);
	      up.setFolderPath(fldPath);
	      up.setName("dynamic");
	      up.setType("update");
	      up.setData("dynamic");
	      up.setLabel("Update File");
	      context.getContextInstance().setVariable("dynamic", up);
	   }
	}
 #40654  by jllort
 
I want to know which is the value of the "path" variable when you call the method Document doc = OKMDocument.getInstance().getProperties(null, path);
 #40657  by alexwgordon
 
Ah sorry, Imm not 100% sure what you meant. Did you mean this from whenthe workflow is running? I get my "path" variable as this:
Code: Select all
path = /okm:root/file.pdf
Attachments
Screen Shot 2015-10-02 at 13.32.35.png
Screen Shot 2015-10-02 at 13.32.35.png (45.67 KiB) Viewed 7073 times

About Us

OpenKM is part of the management software. A management software is a program that facilitates the accomplishment of administrative tasks. OpenKM is a document management system that allows you to manage business content and workflow in a more efficient way. Document managers guarantee data protection by establishing information security for business content.