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 » Runtime database query.

Post new topic  Reply to topic
 Runtime database query. « View previous topic :: View next topic » 
Author Message
PisgahMan
PostPosted: Fri Apr 01, 2005 8:39 am    Post subject: Runtime database query. Reply with quote

Voyager

Joined: 27 Jul 2004
Posts: 93

Hi experts - can someone tell me what DB2 query to run to get all of the active work items from the runtime database? I am not familiar with the table structure.
Back to top
View user's profile Send private message
vennela
PostPosted: Fri Apr 01, 2005 10:44 am    Post subject: Reply with quote

Jedi Knight

Joined: 11 Aug 2002
Posts: 4055
Location: Hyderabad, India

But why?

If you open the client and login as admin then you should be able to find that out. Are there too many work items?
Back to top
View user's profile Send private message Send e-mail Visit poster's website
MQRR
PostPosted: Mon Apr 04, 2005 12:27 pm    Post subject: Reply with quote

Centurion

Joined: 10 Aug 2003
Posts: 110

It is not good idea to play with runtime database but to answer your question,
You can query against work_item table and use the state column in the table to check for the value whatever the state you are looking for. I dont remember on top of my mind but i think for READY it is 1 and RUNNING it is 2.
MQRR
Back to top
View user's profile Send private message
jmac
PostPosted: Mon Apr 04, 2005 1:04 pm    Post subject: Reply with quote

Jedi Knight

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

MQRR wrote:
It is not good idea to play with runtime database


My sentiments exactly, BUT there are some views that you can use that are defined by MQWF. See the Programming guide, Chapter 14, for details.
_________________
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
PisgahMan
PostPosted: Tue Apr 05, 2005 4:37 am    Post subject: Reply with quote

Voyager

Joined: 27 Jul 2004
Posts: 93

Hi guys - I appreciate your concerns and I had the same questions. The way our system is set up, we send several of the workflow audit messages to the Audit queue, then a UPES reads these items and updates tables in an Oracle database. Workitems are then updated in the work item table as well as workflow.

The problem is sometimes we have 'ghost items' that exist in Oracle or DB2 but not the other. One proposed solution was to periodically run querys against both DB's and reconcile the differences.

What I need is a query that will include the process instance name with the work item data.

Thanks!
Back to top
View user's profile Send private message
ucbus1
PostPosted: Tue Apr 05, 2005 8:53 am    Post subject: Reply with quote

Knight

Joined: 30 Jan 2002
Posts: 560

Quote:
Hi guys - I appreciate your concerns and I had the same questions. The way our system is set up, we send several of the workflow audit messages to the Audit queue, then a UPES reads these items and updates tables in an Oracle database. Workitems are then updated in the work item table as well as workflow.


Which database is showing more ? If Oracle database is having less records, then it could be possible your work items are gettting stuck at ur UPES stop. Create a view on the workitems for the upes and see if anything stuck.

Quote:
Workitems are then updated in the work item table as well as workflow.

I could not understand this..
Back to top
View user's profile Send private message Send e-mail
PisgahMan
PostPosted: Tue Apr 05, 2005 9:33 am    Post subject: Reply with quote

Voyager

Joined: 27 Jul 2004
Posts: 93

I think what happens is this. Certain individuals have a tool to mark work items as complete in the Oracle (audit feed) work item table. This tool just does a DB Update to Oracle so the work items in workflow are still ready. If no one notifies the WF Admin, these process instances are just hanging out in WF with no way for the user to ever complete them.

Our architecture is strange and I was not involved in the design, but we have a work item table that is feed by the WF audit trail. In some cases both the Oracle tables and Workflow are updated, seperatly.

Any one know how to get a list of Active work items from DB2 with the associated process instance name?

Back to top
View user's profile Send private message
jmac
PostPosted: Tue Apr 05, 2005 3:17 pm    Post subject: Reply with quote

Jedi Knight

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

I am sure this can be done going directly against the database, but I would not know the statement to use.

However, you can easily get the list you want using the MQWF API, then use that to go against your Oracle DB.
_________________
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
PisgahMan
PostPosted: Wed Apr 06, 2005 5:09 am    Post subject: Reply with quote

Voyager

Joined: 27 Jul 2004
Posts: 93

I have Runtime database on my local machine, with some nice GUI tools. Hopefully I convince everyone this is not a good idea. It would be easier to look up items in the web client.
Back to top
View user's profile Send private message
PisgahMan
PostPosted: Wed Apr 06, 2005 7:03 am    Post subject: Reply with quote

Voyager

Joined: 27 Jul 2004
Posts: 93

I cannot even figure out the relationship between the Work Item created message on the audit queue and the work item table in WF.
Back to top
View user's profile Send private message
PisgahMan
PostPosted: Wed Apr 06, 2005 7:10 am    Post subject: Reply with quote

Voyager

Joined: 27 Jul 2004
Posts: 93

The associated Object tag in the create work item message seems to be the field we are using in Oracle as the work item ID....but where is that in DB2?
Back to top
View user's profile Send private message
jmac
PostPosted: Wed Apr 06, 2005 7:16 am    Post subject: Reply with quote

Jedi Knight

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

If I understand what you are doing correctly, the field you are looking for does not exist in DB2. The ID field you are using is an External field, and internally they use a different ID.
_________________
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
PisgahMan
PostPosted: Wed Apr 06, 2005 7:25 am    Post subject: Reply with quote

Voyager

Joined: 27 Jul 2004
Posts: 93

John the field I see in the Audit message is for example
<AssociatedObject>VwAAAAEBlaUqAAAAAAAAAABX</AssociatedObject>

We are using that as they key in the oracle table. Is there anyway to tie the data from that audit message back to the DB2 tables?
Back to top
View user's profile Send private message
PisgahMan
PostPosted: Wed Apr 06, 2005 7:28 am    Post subject: Reply with quote

Voyager

Joined: 27 Jul 2004
Posts: 93

is there a relationship between the external and internal ids?
Back to top
View user's profile Send private message
jmac
PostPosted: Wed Apr 06, 2005 8:26 am    Post subject: Reply with quote

Jedi Knight

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

Yes there is, but off the top of my head I do not remember it. There are some metods in the Native Java API that allow for conversion. If you don't have Native Java API, it is a support pac you can download... I am pretty sure if you search this site you will find a reference to it.
_________________
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
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 » Runtime database query.
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.