ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » Workflow Engines - IBM MQ Workflow & Business Process Choreographer » workitems in suspending state

Post new topic  Reply to topic Goto page 1, 2  Next
 workitems in suspending state « View previous topic :: View next topic » 
Author Message
steve_ghb
PostPosted: Tue Aug 01, 2006 9:25 am    Post subject: workitems in suspending state Reply with quote

Novice

Joined: 15 Jun 2005
Posts: 13

We have hundreds of process instances that are in suspending state. We have a script that is supposed to terminate any process instances older than a specific date but it doesn't seem to terminate these.

Could a large number of these be causing performance problems we are having? Even if not, how can we get rid of them without doing it one by one? I tried terminating one of them and a got a timeout so that option may not be available anyway.

Thanks
Back to top
View user's profile Send private message
sarasu
PostPosted: Tue Aug 01, 2006 9:46 am    Post subject: Reply with quote

Master

Joined: 02 Feb 2006
Posts: 229

If you are using normal workflow runtime client, use a fileter to sort out all the instances and select all and delete will delete all the process instances. You can do that using API aswell.
Back to top
View user's profile Send private message
koko
PostPosted: Tue Aug 01, 2006 10:02 am    Post subject: Reply with quote

Master

Joined: 26 Sep 2003
Posts: 206

Quote:
We have hundreds of process instances that are in suspending state


Do you know why this happened?
_________________
Thanks

Koko
Back to top
View user's profile Send private message
steve_ghb
PostPosted: Tue Aug 01, 2006 10:14 am    Post subject: Reply with quote

Novice

Joined: 15 Jun 2005
Posts: 13

Quote:
Do you know why this happened?


Users are supposed to suspend a workitem if they cannot process it right away, for whatever reason sometimes they sit in suspending state instead of becoming suspended. Haven't been able to figure out why.
Back to top
View user's profile Send private message
koko
PostPosted: Tue Aug 01, 2006 10:26 am    Post subject: Reply with quote

Master

Joined: 26 Sep 2003
Posts: 206

Quote:
Users are supposed to suspend a workitem if they cannot process it right away, for whatever reason sometimes they sit in suspending state instead of becoming suspended


Initally you said that process instances are in suspending state not workitems.
_________________
Thanks

Koko
Back to top
View user's profile Send private message
steve_ghb
PostPosted: Tue Aug 01, 2006 10:47 am    Post subject: Reply with quote

Novice

Joined: 15 Jun 2005
Posts: 13

Oops, I meant suspend the instance
Back to top
View user's profile Send private message
steve_ghb
PostPosted: Tue Aug 01, 2006 12:50 pm    Post subject: Reply with quote

Novice

Joined: 15 Jun 2005
Posts: 13

Which state value from process_inst table is the one for 'suspending'?

Actually if anyone can point me to a list of what all the state values translate to that would be great.

Thanks alot
Back to top
View user's profile Send private message
jmac
PostPosted: Tue Aug 01, 2006 3:25 pm    Post subject: Reply with quote

Jedi Knight

Joined: 27 Jun 2001
Posts: 3081
Location: EmeriCon, LLC

Here are the values for ProcessInstanceState
Code:
enum FmcjProcessInstanceStateValue
{
  Fmc_PS_NotSet      =   0,
  Fmc_PS_Ready       =   1, Fmc_PS_Running    =  2, Fmc_PS_Finished = 4,
  Fmc_PS_Terminated  =   8, Fmc_PS_Suspended  = 16,
  Fmc_PS_Terminating =  32, Fmc_PS_Suspending = 64,
  Fmc_PS_Deleted     = 128
};

You can find the values by doing a search on the *.h files int he API subdirectory of your MQWF installation
_________________
John McDonald
RETIRED
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
xiaojiahuochen
PostPosted: Tue Aug 01, 2006 9:08 pm    Post subject: Reply with quote

Newbie

Joined: 11 Jul 2006
Posts: 6

first use query filter to query processinstance list then
user code
ProcessInstance.terminate()
can terminate
Back to top
View user's profile Send private message
hos
PostPosted: Tue Aug 01, 2006 11:48 pm    Post subject: Reply with quote

Chevalier

Joined: 03 Feb 2002
Posts: 470

Hi,

have a look into the Programming Guide, chapter 'Process Instance Actions'. There you'll find a state transition diagram that shows you the PI sates, the available transitions and the conditions for a state transition.

Furthermore the Suspend() API describes the conditions for a state transition:

"The process instance remains in state Suspending as long as there are running program activity implementations, suspending non-autonomous subprocesses, or checked-out work items. When the activity implementations completed their executions and the non-autonomous subprocesses reached the Suspended state, and when the checked-out work items are checked in, the process instance is put into the Suspended state."

I personally do not think that it is a good idea to give end-users the authority to suspend process instances.
Back to top
View user's profile Send private message
steve_ghb
PostPosted: Wed Aug 02, 2006 5:23 am    Post subject: Reply with quote

Novice

Joined: 15 Jun 2005
Posts: 13

Thanks all for the information, I'll have to do some research into this too, especially about why these instances are in suspending state. I can't imagine there are that many workitems still checked out for instances that are several years old. There must be something still running like you said.
Back to top
View user's profile Send private message
steve_ghb
PostPosted: Wed Aug 02, 2006 11:42 am    Post subject: Reply with quote

Novice

Joined: 15 Jun 2005
Posts: 13

Problem is bigger than I thought at first. Not so much worried about the suspending instances we can clean those out at some point.

Queried the db this morning and got the following numbers:

# of process instances: 617,810 (I didn't filter for top level only)
# in state=4(finished): 352,300

Looks like our scheduling server isn't moving instances from finished to deleted state. Keep time is 1 day but I know for sure we didn't finish over 350,000 instances in the last day or two.

Here's our settings:

- Scheduling server settings
- Check interval PT1M
- Start mode Immediate
- Notification check interval PT1M
- Create notification items threshold 10
- Delete notification items threshold 100


- Cleanup server settings
- Check interval PT1H
- Start mode Deferred
- Server start time Everyday at 02:00
- Server stop time 04:30
- Cleanup time P1D
- Cleanup delay time PT1H


Any ideas why these instances aren't getting changed to state 128? also does anyone know what the ibm recommended settings are for these servers? I don't know whay they were set to 'out of the box' and I'm sure they've been changed.

Thanks
Back to top
View user's profile Send private message
jmac
PostPosted: Wed Aug 02, 2006 12:24 pm    Post subject: Reply with quote

Jedi Knight

Joined: 27 Jun 2001
Posts: 3081
Location: EmeriCon, LLC

Are you certain that the cleanup server is running?

Do you see the cleanup server started/stopped messages in the log
_________________
John McDonald
RETIRED
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
steve_ghb
PostPosted: Wed Aug 02, 2006 1:08 pm    Post subject: Reply with quote

Novice

Joined: 15 Jun 2005
Posts: 13

I thought the cleanup server physically deletes instances that are in state 128, and the scheduling server changes finished processes to state 128 for the cleanup server to delete?

Anyway, we ran queries this morning before, during, and after the cleanup server was scheduled (I haven't checked the logs yet) and here's what we got:

before: 12,325 in state 128
during: 12,325 in state 128 (don't know why yet it didn't do anything at first)

after: 9,570 in state 128

Definitely looks like there's a problem with the cleanup server but I'm more concerned that over half the process instances are finished and not getting cleaned up.

I ran another query and over 175,000 of the finished instances have a completed time of before July 21. They are supposed to be cleaned up after 1 day.
Back to top
View user's profile Send private message
Ratan
PostPosted: Wed Aug 02, 2006 1:19 pm    Post subject: Reply with quote

Grand Master

Joined: 18 Jul 2002
Posts: 1245

Quote:
I ran another query and over 175,000 of the finished instances have a completed time of before July 21. They are supposed to be cleaned up after 1 day.


Just wondering if you might be looking at finished Activity Instances. May be the process instance is not finished yet.
_________________
-Ratan
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Goto page 1, 2  Next Page 1 of 2

MQSeries.net Forum Index » Workflow Engines - IBM MQ Workflow & Business Process Choreographer » workitems in suspending state
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.