Author |
Message
|
wftp |
Posted: Sat Oct 09, 2004 7:35 am Post subject: Checkout implementation |
|
|
Newbie
Joined: 24 Sep 2004 Posts: 2
|
Hello All,
I am new to workflow. I have to implement checkout command in my workflow program. I need to implement nightly checkout method in such a way that it goes through all the workflow users one by one and frees up all checkedout workitem for each user. The reason behind this implementation is somehow I have to manually frees up the checkedout workitem through webclient if that is locked by the users. This is happening because once user do checkedout they left their screens open during the night and somehow my cancelcheckout method doesn't work.
Can anybody explain in details that how I can do this? Also if possible then can anybody post series of command that I have to write in order to implements chekout function. Also please let me know where can I find the good documentation for workflow programming.
Thanks in advance and I greatly appreciate help.
TJ |
|
Back to top |
|
 |
Ratan |
Posted: Sat Oct 09, 2004 8:11 pm Post subject: |
|
|
 Grand Master
Joined: 18 Jul 2002 Posts: 1245
|
I think what you want is a cancelcheckout implementation. All you have to do is login as the user, query for CheckedOut items and do a cancelCheckout. _________________ -Ratan |
|
Back to top |
|
 |
wftp |
Posted: Mon Oct 11, 2004 1:49 pm Post subject: |
|
|
Newbie
Joined: 24 Sep 2004 Posts: 2
|
Thanks Ratan.
My code is doing that, but sometimes it is failing. See the code below.
Agent agent = new Agent();
agent.setLocator(Agent.LOC_LOCATOR);
agent.setName("MYAGENT");
ExecutionService service = agent.locate("", "");
service.logon2(usrname, password, SessionMode.DEFAULT, AbsenceIndicator.RESET);
Workitem objid=session.getWorkitem().persistentOid(); // my method to get objectid....
WorkItem item = service.persistentWorkItem(objid);
item.cancelCheckOut();
service.logoff();
But sometimes it gives me FMC Error.
FMC38009E MQSeries Workflow API Error :
API Return Code : 118
Error Message : FMC00118E Object does not exist
Based on above code and error, can anybody explain what is wrong with the above code? |
|
Back to top |
|
 |
vennela |
Posted: Mon Oct 11, 2004 6:33 pm Post subject: |
|
|
 Jedi Knight
Joined: 11 Aug 2002 Posts: 4055 Location: Hyderabad, India
|
Quote: |
Error Message : FMC00118E Object does not exist
|
But then is the object existing.
How can you tell |
|
Back to top |
|
 |
hos |
Posted: Tue Oct 12, 2004 12:41 am Post subject: |
|
|
Chevalier
Joined: 03 Feb 2002 Posts: 470
|
|
Back to top |
|
 |
kriersd |
Posted: Tue Oct 12, 2004 7:11 am Post subject: Question & Suggestion |
|
|
 Master
Joined: 22 Jul 2002 Posts: 209 Location: IA, USA
|
First and for most. Why do you care if the item is checked out? The next time the user logs in they will have the ability to cancel the check out! They should be able to self manage the work within their work list. I would caution the use of a tool that logs in as other users and cancels a checkout. Unless you absolutely know for sure that the users are not actually logged in and working the item, I would not take this approach. I would instead train the users on how to cancel the checkout.
With that said, if you must find a way to cancel the checkout then you might want to look into the "expire" functionality. I haven't used it for this purpose, but I think it might work. You could set a 10 hour expire time for the work item. If the activity doesn't meet the exit condition it should go back to the ready state.
Good Luck _________________ Dave Krier
IBM WebSphere MQ Workflow V3.4 Solution Designer |
|
Back to top |
|
 |
|