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 » Delete Registries from the WORK_ITEM table

Post new topic  Reply to topic
 Delete Registries from the WORK_ITEM table « View previous topic :: View next topic » 
Author Message
Loku
PostPosted: Fri Sep 26, 2008 8:09 am    Post subject: Delete Registries from the WORK_ITEM table Reply with quote

Newbie

Joined: 26 Sep 2008
Posts: 7

Hi!!

I´m having a problem.
There are several registries on my database that I want to delete because there are too old, so I started a process that goes directly to te database and delete this registries but there are a few registries that don´t let me to delete it.

This registries has something in common, they are all on the state 21212 - "terminating", I also try to delete one whit SQL and i did it !!! but then I realize that the system created it again automatically , so my question is: Does anyone know how ti delete this registries from that table? Does it has any relation with other table that cause that it cannot be deleted or that if it is deleted WF creates it automatically????

I´ll really appreciate any help

By the way... I´m using MQ Workflow 3.3.2. with DB2 v.7.1 (I know it has no more support)
Back to top
View user's profile Send private message
jmac
PostPosted: Fri Sep 26, 2008 8:24 am    Post subject: Reply with quote

Jedi Knight

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

I can try to help but there are a couple of things you need to realize:

1. NEVER do anything directly to the database.

2. Your terminology is unknown to me. Do you mean you have running instances that you can not get rid of? What exactly is a registry?

If you send me some screenshots that show what the problem is I will try and diagnose for you.
_________________
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
Loku
PostPosted: Fri Sep 26, 2008 9:15 am    Post subject: Reply with quote

Newbie

Joined: 26 Sep 2008
Posts: 7

Thanks!!

Sorry we don´t have any screenshot because our program to delete use ProcessInstance.terminate() to delete each instance, but the database enter to a cycle trying to delete a PI in state "terminating" until it crashed.

Yes by "registries" I´m referring to WorkItems. The documentation said that if the WI is in that state you can use forceFinish() to send it to "terminated" but when we do that WF send an error message "State does not allow this action" we neither can transfer or do anything to this WI that´s why we opted to try ito delete one directly to the database but it creates again automatically.
Back to top
View user's profile Send private message
jmac
PostPosted: Fri Sep 26, 2008 9:19 am    Post subject: Reply with quote

Jedi Knight

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

OK.. your terminology is still not making sense. You are talking about workitems then doing ProcessInstance terminates. Apples and oranges. Post the program so I can see what is really going on.
_________________
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
Loku
PostPosted: Fri Sep 26, 2008 9:53 am    Post subject: Reply with quote

Newbie

Joined: 26 Sep 2008
Posts: 7

Sorry, sorry, I also get confused

We try to delete the ProcessInstance, but we have that problem that when we do terminate it stays on "terminating" and then we cant´t do anything else.

This is the method we use:

Code:

int count= 0;

for (int j=0; j < wi.length; j++){

  try {
             transfer(wi[j],RuntimeResources.getService().userID());

String filter = "NAME IN '" + wi[j].processInstance().topLevelName() + "'";

ProcessInstance [] process_to_eliminate = RuntimeResources.getService().queryProcessInstances( filter , null, null);

for(int k = 0; k < process_to_eliminate.length; k++){
   process_to_eliminate[0].terminate();
   count = count + 1;
   System.out.println("*** Eliminating .........***"  +   wi[j].processInstance().topLevelName());
   System.out.println("Eliminated : " + count);
}
} catch (FmcException e) {
RuntimeResources.getLogger().setLog("It not exist");
}
}
Back to top
View user's profile Send private message
jmac
PostPosted: Fri Sep 26, 2008 10:03 am    Post subject: Reply with quote

Jedi Knight

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

What you need to do is take a look at one of the instances you are trying to terminate with the Monitor. See what activities are currently in a running state. It is quite likely that you are staying in the Terminating state because there is some other activity that is running. If you can send me a screen shot of the graphical monitor for one of the instances that you are trying to terminate with the code:
process_to_eliminate[0].terminate();

If there are nested blocks that are in a running state be sure to send screenshots of those too
_________________
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
Loku
PostPosted: Mon Sep 29, 2008 11:37 am    Post subject: Reply with quote

Newbie

Joined: 26 Sep 2008
Posts: 7

Hi!!!

Again me...
We do the thing with the monitor and we found an interesting thing, as you said it is an activity in running state, this activity is inside of one block, so we tryed to obtain all the names and states of the processinstance but when we reach to this activity it enters into a cycle, it don't prints this activity but gets the same upper block and prints the same again and again.

Nested Activity : Distribuidor State : 3 Nested Activity : PTPE_DivMisc State : 12 Nested Activity : PTPE_MarTrans State : 14 ----Nested Activity : Distribuidor State : 3 ----Nested Activity : PTPE_DivMisc State : 12 ----Nested Activity : PTPE_MarTrans State : 14 --------Nested Activity : Distribuidor State : 3 --------Nested Activity : PTPE_DivMisc State : 12 --------Nested Activity : PTPE_MarTrans State : 14

When we saw on the webClient this activity, we found a lot of strange thing ,it say that is in running state but it has out Container and it has no staff or starter. So by code it don't appears and in the webClient we can't do anything to it.

Do you know how can I finish it??

again thanks for your help
Back to top
View user's profile Send private message
jmac
PostPosted: Mon Sep 29, 2008 11:48 am    Post subject: Reply with quote

Jedi Knight

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

It seems to me that you are likely looking at a UPES activity. It is very difficult to know without seeing what you are talking about. Can you take a picture of the Graphical monitor that shows what you are seeing and email it to me.
_________________
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
Loku
PostPosted: Wed Oct 01, 2008 8:09 pm    Post subject: Reply with quote

Newbie

Joined: 26 Sep 2008
Posts: 7

I've already had prepared the mail but... which is your mail? @hotmail or @msn?
Back to top
View user's profile Send private message
jmac
PostPosted: Thu Oct 02, 2008 5:54 am    Post subject: Reply with quote

Jedi Knight

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

Just hit the email button
_________________
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
Loku
PostPosted: Thu Oct 02, 2008 10:20 am    Post subject: Reply with quote

Newbie

Joined: 26 Sep 2008
Posts: 7

It don´t appears any email button
Back to top
View user's profile Send private message
jmac
PostPosted: Thu Oct 02, 2008 10:26 am    Post subject: Reply with quote

Jedi Knight

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

I must have inadvertently changed my profile... it should be there now
_________________
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
jmac
PostPosted: Thu Oct 02, 2008 10:36 am    Post subject: Reply with quote

Jedi Knight

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

OK... I got your screen shots.

Please show me the FDL for this process model.

You can just put it into the forum, or email to me.
_________________
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
jmac
PostPosted: Mon Oct 06, 2008 9:30 am    Post subject: Reply with quote

Jedi Knight

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

Unfortunately I can not match the screen shots you sent me to the FDL, so I can not be certain what is going on.

Based on what I have seen I can take a guess at what MIGHT solve your problem, please be aware, that since I do not understand your process this may not help, and could cause harm. Hopefully you have a way to test this idea out on some test system.

In your code, you are attempting to terminate a Process which is likely a top level process. What you should do prior to terminating this process is to terminate all of its sub processes.

First determine the Top Level process to be terminated. Lets say this is ProcessInstance t.

Now determine all of the child processes for this process using a filter like this
Code:
PARENT_PROCESS_NAME=t.name()


Next terminate each of these sub processes.

Finally terminate the parent process.

Without spending significant time on this (which I do not have) I am afraid I can be of no more help. You likely need to engage some consulting firm to help you with this.

GOOD LUCK
_________________
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
Loku
PostPosted: Mon Oct 06, 2008 9:45 am    Post subject: Reply with quote

Newbie

Joined: 26 Sep 2008
Posts: 7

Ok, I´ll try that solution

I really appreciate your help, at least you show me the way

Thanks!!!!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » Workflow Engines - IBM MQ Workflow & Business Process Choreographer » Delete Registries from the WORK_ITEM table
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.