Topic
  • 1 reply
  • Latest Post - ‏2012-07-31T19:20:04Z by drdamour
LennyECM
LennyECM
2 Posts

Pinned topic Find work items

‏2012-07-31T07:01:57Z |
Hi All,

i need to find the work items which is available longer than 10 mins in the quque....

is there any code availble for that.

Please guide me

Regards
Lenny
  • drdamour
    drdamour
    40 Posts

    Re: Find work items

    ‏2012-07-31T19:20:04Z  
    You want to query the queues using F_EnqueueTime as part of your filter clause

    http://publib.boulder.ibm.com/infocenter/p8docs/v5r0m0/topic/com.ibm.p8.pe.user.doc/bpfwd039.htm?resultof=%22%46%5f%45%6e%71%75%65%75%65%54%69%6d%65%22%20

    time types are stored as epoch int's so you have to use the function for the given DB type. IE GETDATE() for SQL server alas;

    F_EnqueueTime > DATEDIFF(s, '1970-01-01 00:00:00', GETUTCDATE()) - 60*10

    would be anything in there longer than 10 minutes

    different dbs are different statements, http://www.epochconverter.com/ is a good resource


    I am Just a new Boy,
    A Stranger in this Town,
    Where are All the Good Times,
    Who's Gonna Show this Stranger Around?
    Check out our Agile ACM Catalogue: Widgets, APIs, & Components for Building Solutions