• Lock/Unlock a file during workflow

  • We tried to make OpenKM as intuitive as possible, but an advice is always welcome.
We tried to make OpenKM as intuitive as possible, but an advice is always welcome.
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.
 #25495  by MikeW
 
Hello guys
I'm pretty new to openKM and looked the whole day trough the developer manuals regarding the workflows.
I'd like to lock a file with a workflow and unlock it when the workflow is done (and by the way trying to lock any other workflow on this file as long as the workflow is ongoing).

I've tried it with a node and the <action> and with the <script> function, but without success.
Would anyone of you help me out?
Code: Select all
<node name="node1">
		<action class="com.openkm.workflow.DocumentLockActionHandler"></action>
		<transition to="task-node1"></transition>
	</node>
Code: Select all
<node name="node1">
		<event type="node-enter">
			<script>com.openkm.workflow.DocumentLockActionHandler();</script>
		</event>
		<transition to="task-node1"></transition>
	</node>
Both doesn't work - I'm sure I made a stupid mistake...

Any help would be appreciated, thanks in advance.
Mike

PS: I'm using the most recent community edition.
 #25515  by jllort
 
with document uuid you can get docPath ( methods getNodePath or getNodeUuid ) from OKMRepository
http://doxygen.openkm.com/dd/d2c/classc ... itory.html
Code: Select all
OKMRepository.getInstance().
to lock or unlock ( methods lock unlock ) from OKMDocument
http://doxygen.openkm.com/de/de7/classc ... ument.html
Code: Select all
OKMDocument.getInstance().

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.