Search for which workflows are using which files

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.
Post Reply
alexwgordon
Gold Boarder
Gold Boarder
Posts: 182
Joined: Fri Sep 05, 2014 6:24 pm

Search for which workflows are using which files

Post by alexwgordon » Thu Apr 13, 2017 5:15 pm

Hi All,

Is there a way to search for all the workflow instances that are using a given file? Currently the workflow dashboard doesn't show what the file in the workflow is without clicking into the workflow and I need to delete the workflows that use that file in order to delete/update the file. Is there like a database query or something? Thanks!

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

Re: Search for which workflows are using which files

Post by jllort » Sat Apr 15, 2017 7:33 am

You want to know for an specific document what workflows are running ? or for the whole repository what documents are running a workflow ?

alexwgordon
Gold Boarder
Gold Boarder
Posts: 182
Joined: Fri Sep 05, 2014 6:24 pm

Re: Search for which workflows are using which files

Post by alexwgordon » Tue Jun 27, 2017 2:54 pm

I figured out a way to create a note and/or comment with the workflow process instance which let's me find the workflow in the Admin panel with this:

Code: Select all

Long myProcInst = executionContext.getProcessInstance().getId();
executionContext.getToken().addComment("The Workflow Instance is " + myProcInst.toString());
But is there a way to dynamically change the name of a task node in a workflow? We discussed changing the dashboard itself here: viewtopic.php?f=4&t=21094

But I struggled a lot in my attempts there with no success. I think if I could just have a workflow task name that dynamically changed to include the document name that could potentially be an easier implementation? Not even sure if that is possible. Thanks!

pavila
Moderator
Moderator
Posts: 3072
Joined: Tue Dec 11, 2007 6:02 pm
Location: Alicante, Spain
Contact:

Re: Search for which workflows are using which files

Post by pavila » Mon Jul 03, 2017 9:23 am

Take a look a this page https://docs.openkm.com/kcenter/view/ok ... sions.html and make use of the Workflow Document Info extension which will show the workflows related to a given document.

Tell me if this matches your requirement.

alexwgordon
Gold Boarder
Gold Boarder
Posts: 182
Joined: Fri Sep 05, 2014 6:24 pm

Re: Search for which workflows are using which files

Post by alexwgordon » Wed Jul 05, 2017 5:57 pm

Hi Pavila,

I don't believe this is what I'm looking for. It doesn't seem to provide me any additional information. Basically what I'm attempting to do is make it so the user who has a task or many tasks in most cases, the ability to see which file their task is associate with, WITHOUT having to click on "Process Instance" or "Data" section in the task to see what it is.

Ideally I could show the document name somewhere where the green arrow is in the attached image, so users can quickly click on the correct task without clicking through the list.

Hopefully that makes sense. Thanks!
Screen Shot 2017-07-05 at 10.53.35.png

pavila
Moderator
Moderator
Posts: 3072
Joined: Tue Dec 11, 2007 6:02 pm
Location: Alicante, Spain
Contact:

Re: Search for which workflows are using which files

Post by pavila » Wed Jul 05, 2017 7:41 pm

Then you have to modify the OpenKM source code. Anyway I don't why it's a problem to click in the "Process Instance" item.

The only "cheaper" option is to create a JSP which making use of the Workflow API list the information you want. Right now I'm not sure if OpenKM Community has an extension which may embed a JSP in a new tab. Take a look at https://docs.openkm.com/kcenter/view/ok ... nd-ui.html

Regards.

alexwgordon
Gold Boarder
Gold Boarder
Posts: 182
Joined: Fri Sep 05, 2014 6:24 pm

Re: Search for which workflows are using which files

Post by alexwgordon » Thu Jul 06, 2017 2:48 pm

Sure, with only a few tasks it's no problem to just click through the list and figure out which doc you're looking for, but it can be a problem if someone has 50+ tasks and is looking for a specific file, even 10-20 tasks is not ideal and is a bit time consuming (especially if that person is my boss looking for a file :? )

So looks like a JSP would not quite be what I'm looking for. What I'd really like is just to create either another column in the task list for the document name or have the task node change dynamically with the document name included. Any hints on getting something like that implemented? Thanks again Pavila

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

Re: Search for which workflows are using which files

Post by jllort » Sat Jul 08, 2017 10:49 am

Do you have JAVA skills and development environment ( just this weeks we have realease a new version based in virtual machine, OVA file ). In case you want to modify the source code, we can share with you some clues about it ( really these changes are yet done in professional edition and I remember 1-2 months ago another user who wanted something similar and I shared from that post some clues about how doing it, sorry but I do not remember exactly the post ).

Take a look here:
viewtopic.php?f=4&t=21094&p=44187&hilit ... ent#p44187

Post Reply