Create Metadata in Workflow - Exercise 8

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.
jllort
Moderator
Moderator
Posts: 10077
Joined: Fri Dec 21, 2007 11:23 am
Location: Sineu - ( Illes Balears ) - Spain
Contact:

Re: Create Metadata in Workflow - Exercise 8

Post by jllort » Sat Jun 17, 2017 9:15 am

Last documentation is here:
https://docs.openkm.com/kcenter/

You are looking for API, you have two options:
https://docs.openkm.com/kcenter/view/ok ... ption.html
https://docs.openkm.com/apidoc/ ( in this case you are looking for a class into the package com.openkm.api named OKMPropertyGroup )

dferguson
Expert Boarder
Expert Boarder
Posts: 92
Joined: Thu May 18, 2017 12:48 pm

Re: Create Metadata in Workflow - Exercise 8

Post by dferguson » Thu Mar 08, 2018 4:18 pm

So, I have the Linux Mint Portable Dev up and running and I can successfully deploy this workflow to OpenKM. However I have a few questions. Excuse me if these are found in documentation elsewhere but I can't seem to find it.

First, why does starting this workflow require the admin to set the assigned "reviewer"? It seems unuseful to allow a user to start a workflow then have it sit and require an admin to pick the actor ID. Wouldn't it make more sense to have the workflow initiator select the from the pooled actors?

Second, I know I need to register the metadata group, but where do I find the information for this group i.e. what is the group label, Group name, and Group info. I am familiar with adding metadata groups, but I can't decipher what the metadata group is for this exercise.

jllort
Moderator
Moderator
Posts: 10077
Joined: Fri Dec 21, 2007 11:23 am
Location: Sineu - ( Illes Balears ) - Spain
Contact:

Re: Create Metadata in Workflow - Exercise 8

Post by jllort » Sat Mar 10, 2018 10:10 am

In our information I think you will find enought information about metadata fields https://docs.openkm.com/kcenter/view/ok ... ields.html

About workflow, what is your scenario :
1- you want to show form as part of the starting of the workflow ?
2- you want to assing task to some group of users, not to a single user ?

Because by default you can assign a task to an specific users, seems is not your case or you have missed this step ?

dferguson
Expert Boarder
Expert Boarder
Posts: 92
Joined: Thu May 18, 2017 12:48 pm

Re: Create Metadata in Workflow - Exercise 8

Post by dferguson » Mon Mar 12, 2018 1:22 pm

I am very familiar how to edit and register metadata. What is not clear with regards to Exercise 8 is where is the metadata for that exercise defined. As mentioned by several other users in this thread, the portion for the metadata definition is unclear. In Alex's comments I can see mention of okg:test and okg:Doc_State. Where is the rest of the definition? My portable dev seems to be missing some stuff.

Is it possible that Exercise 8 in the Portable Dev for Linux Mint is missing some files? I only have exercise8.jpdl.xml, exercise8.jpg, and forms.xml. I have no *.java files.

jllort
Moderator
Moderator
Posts: 10077
Joined: Fri Dec 21, 2007 11:23 am
Location: Sineu - ( Illes Balears ) - Spain
Contact:

Re: Create Metadata in Workflow - Exercise 8

Post by jllort » Sun Mar 18, 2018 7:03 pm

I think we have shared everything in the portable dev environment, also you can check directly in the repository:
https://github.com/openkm/workflow-course

We have also released a more conformatble development environment based on Virtual Machine https://s3-eu-west-1.amazonaws.com/open ... PorDev.ova next week we will publish in the website with some video

Tell me what is the correspondence of the exercice 8 with documentation shown at https://docs.openkm.com/kcenter/view/wfg/

dferguson
Expert Boarder
Expert Boarder
Posts: 92
Joined: Thu May 18, 2017 12:48 pm

Re: Create Metadata in Workflow - Exercise 8

Post by dferguson » Mon Mar 19, 2018 2:09 pm

I have the virtual machine portable development environment as I mentioned.

To finish Exercise 8, I need two things.

1. I need the full definition of the property groups used in this exercise.
2. I need the java files which execute the nodes

Exercise 8 simply says...

https://www.openkm.com/wiki/index.php/W ... Exercise_8
For changing metadata property group use the code:

Code: Select all

String sysToken = DbSessionManager.getInstance().getSystemToken();
OKMPropertyGroup.getInstance().setProperties(sysToken, path, grpName, properties);
In this case we have created nodes to make the actions. We made it with the idea to be more clear, but in real case we suggest using transactions for doing this kind of logic ( updating metadata ), because workflow will have less boxes.
use it where?

jllort
Moderator
Moderator
Posts: 10077
Joined: Fri Dec 21, 2007 11:23 am
Location: Sineu - ( Illes Balears ) - Spain
Contact:

Re: Create Metadata in Workflow - Exercise 8

Post by jllort » Tue Mar 20, 2018 8:01 pm

This is an old wiki section, https://www.openkm.com/wiki/index.php/Workflow_Course I suggest going with new documentation
https://docs.openkm.com/kcenter/view/wf ... ample.html at least here you have a video of it.

Seems the files are
https://github.com/openkm/workflow-cour ... ision.java
https://github.com/openkm/workflow-cour ... ction.java

I think into the sample we had not created metadata, but might be easily done in the transaction node.
You can create any group https://github.com/openkm/workflow-cour ... ction.java and set metadata using https://docs.openkm.com/kcenter/view/ok ... ertySimple

dferguson
Expert Boarder
Expert Boarder
Posts: 92
Joined: Thu May 18, 2017 12:48 pm

Re: Create Metadata in Workflow - Exercise 8

Post by dferguson » Wed Mar 21, 2018 1:51 pm

Thanks for adding this. I think it fills in some of the holes.

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests