Process instance id's

Hi All,

I would like to write a query to know if my Bpm process is got started or not and its current status , can you please let me know from which Bpm table I can get this data out.

Regards
sandeep

I think it will be better to rely on the services available in WmPRT and WmMonitor package.
See the appropriate Build-In-Services-Guide for informations.

The Process instance ids as well as the related informations about their status are spread over a lot of tables.

If you really want to go directly to the database I suggest that you get access to empower (if you do not have one already) and support the following idea:
http://brainstorm.softwareag.com/ideas/viewIdea.apexp?id=087200000009cfG
Subject of the idea: Detail Documentation for all webMethods Data base tables.

Regards,
Holger

1 Like

Good idea :slight_smile:

Hi Sandeep ,

The information about the running instances of a process model is maintained in the PRTPROCESS table. The instance with status 1=running and 5=completed.

Hope this helps.

Regards
Rakesh

1 Like

5 is not a recognized status value by the PRT/PE.
Completed has the value of 2.

And it is not that easy to determine if the instance is active or not, as there several lines per instances in this table, indicating when it has been started (status = 1), completed (status = 2), failed (status = 4) and some other status entries depending on process logic. Each instance usually has at least a started entry and in best case at least a completed entry. When the process gets suspendend, resumed, resubmitted and so on, there can be unlimited number of entries per instance, making it hard to determine the most relevant one.

Regards,
Holger

Hi Sandeep,

It seems there is some confusion.

PRTPROCESS[Contains current status about running instance(es)] : Status 5 means completed.
WMPROCESS[Contains details and trace about all instance(es)]: Status 2 means completed.

I suggest to explore the table, WMPROCESSRECENT to build your solution as this table has all the required details.

HTH.

Thanks,
Rankesh

I support Holger’s first comment about using wmMonitor package services. E.g. pub.monitor.process.instance:getInstanceList will provide a list of all process instances based on a certain search criteria. THere are many other services that can be used for different things from this package.

No harm in accessing the product tables but if the services can give the same functionality I would always prefer the services.

Regards,
Ninad Patil

1 Like

Totally agreed - if you want your code to survive an upgrade, use the supplied APIs where possible. None of this cowboy rubbish :slight_smile:

Hi All

PRTPROCESS does not contains the records of completed process instances. It contains only started and failed lists.
WMPROCESS contains all records
1- Started
2- Completed
4- Failed

Hi,

what i would suggest is you can this info from WMPROCESS, and WMPROCESSRECENT (with externalid) tables but you better use “pub.monitor.process.instance:getInstanceList” process correlation id as a cutsomid for this services (and other appropriate input) based on the results you can cross check all other info.

Best
~Raj