Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Worflow Removal help

Status
Not open for further replies.

estrellajon

Technical User
Apr 29, 2008
9
US
We recently had to modify a workflow to eliminate certain steps. Prior to this modification, all workflows are placed on users assignments. Obviously, stopping the workflow makes sense. However, I have thousands of workflows to stop and/or delete.

Is there a sql script out there that I can stop the workflows from the database.


Jon Estrella

 
DO NOT TOUCH LIVELINK DATABASE DIRECTLY.If you need to do this create a workflow status object that identifies the workflows and use the multi select screens and do it from there.Or use that report to write a small lapi routine that will accomplish this.
Java/.NET Method Declaration
public int StopWorkflow(
int workID )

and then you call
Java/.NET Method Declaration

public int DeleteWorkflow(
int workID )

that is the syntax,you just have to write a very small routine that gets into your livelink(session) and then use that session to create a workflow object and call those methods I indiacted using that object for all dataid's you have isolated.In fact I have a utility that I parse a csv file to create userid's in livelink,you can use some kind of similar logic.

It should be fairly straightforward



Well, if I called the wrong number, why did you answer the phone?
James Thurber, New Yorker cartoon caption, June 5, 1937
 
appnair,

Sorry Im not a programmer and only understood parts of your answer. Im not quite sure what routine youre referring too to get into a livelink session.

Are you saying, using a simple sql script on the oracle database is not as straightforward as I think it is? Im not sure what table all those workflows are stored.
 
what I psuedo coded was Livelink API it is not SQL script.It is programming.there are atleast nine tables in workflow that you will mess up the refrential integrity if you go the sql route.it would prove very costly for you.can't you do the GUI way.

Well, if I called the wrong number, why did you answer the phone?
James Thurber, New Yorker cartoon caption, June 5, 1937
 
I can go the GUI way however, there are thousands of workflows to be stopped.
 
I would go to my settings change the tab to workflow change the status page to 100 and do it ten times.First the stop button and then the delete button.Would that work ?

Well, if I called the wrong number, why did you answer the phone?
James Thurber, New Yorker cartoon caption, June 5, 1937
 
Good idea. Ill try that and let you know if that worked. Thanks for your feedback.
 
appnair, if i do the stop button then delete button, I still have to use the drop down for each one. How can I stop a 100 at a time or per the page.
 
no on the multi page there is a button that says stop,you select multiple items 100 at a time and then do the stop,when they are stopped do the same for delete.What version of livelink are you on?

Well, if I called the wrong number, why did you answer the phone?
James Thurber, New Yorker cartoon caption, June 5, 1937
 
Im under Admin, workflow status. Im not sure what the multi page youre referring too.
 
what happens on your personal menu there is a command called workflows.It when invoked will show all the workflows that you initiate or manage.A running workflow cannot be stopped or deleted unless you are part of the workflow manager's group of that workflow anonly if that group has that right.if you are doing this from the map's status menu also it should be possible,you may have to click on the pencil icon and just write a query using the expression builder.I beleive these functionalities were available form at least 9.5 version onwards.Too bad this forum does not allow screen hshots,it might just have been easier to post a picture.

Well, if I called the wrong number, why did you answer the phone?
James Thurber, New Yorker cartoon caption, June 5, 1937
 
I really appreciate your help appnair. Unfortunately, Were still on 9.2. Youre correct that Im logged in as admin and I can see all the pending workflows under Personal/Workflow Status. All 7k of them. But there is no pencil icon. I have to look again in the morning but Im sure I didnt see any. Ive asked around on other Livelink programmers. They said the same thing you said using Livelink api code to do so. SQL is possible but have to be very careful. My source also mentioned looking at a certain table and column when a workflow is stopped. What column it marks as -1 on the db or something that would change once the workflow has been stopped. Then just right a sql script based on this findings to just stop certain workflows my marking it -1 or whatever case it may be.
 
Jon,

you can also write an html page with your text editor that contains some javascript code and an array with the WorkID and SubWorkID (you will have obtained through sql) of all wf to stop, that loops the array of Ids and does one of the follwings:

a) sends through xmlHttpReq urls such like "livelink.exe?func=work.manage&workID=12345678&subWorkID=12345678&NewStatus=Stop" and pauses between two lines;
b) opens a new window, writes a form with the necessary parameters (you can find in any corresponding Livelink page, by taking a look at its source), submit the form, pauses and then closes the window.

The pause function could be that one:
function pause(numberMillis)
{
var dialogScript = 'window.setTimeout(function () { window.close(); }, ' + numberMillis + ');';
var result = window.showModalDialog('javascript:document.writeln("<script>' + dialogScript + '<' + '/script>")');
}

Then let your pc working for you.

Regards,

Olivier
 
thanks oliver. Ill try this and see if this works. So this script technically does the stopping using the browser?

Jon
 
Jon,
The script simply calls the URL for the stop action, providing the other parameters that Livelink needs to process the request. As all LL Request Handlers are standardised function calls with parameters such as :

livelink.exe?func=work.manage&workID=<work id>&subWorkID=<subworkd id>&NewStatus=Stop

You can get the parameters from your Livelink database and then just repeatedly call the function which opens a window, runs the request and then after a delay closes the window.

Greg Griffiths
Livelink Certified Developer & ECM Global Star Champion 2005 & 2006
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top