You are viewing limited content. For full access, please sign in.

Question

Question

Forms Instance Monitoring

asked on July 27, 2016

I would like to set up within our monitoring software (Solarwinds) an automated alert notification if any of our LF forms go into a Suspended or Terminated state.   Currently we just peek at the Processes -> Instance Monitoring web page on the forms server.   I am looking for a simple sql query against the forms database that would return 3 numeric values;  In Progress with no errors,  With Suspended Tasks and Terminated.

Before I go diving into the Forms tables to craft a query I was wondering if anyone else has already done something similar or someone that is familiar with the tables could point me in the right direction ( which table(s) ).

Thanks,
Andrew

0 0

Replies

replied on August 10, 2016

Hi there, 

 

First of all, there is no such single place in database to retrieve instance status. Status of an instance is actually calculated by combining main instance and worker instance ( cf_bp_main_instances and cf_bp_worker_instances).

For example, if you have main instance saying "running", while one of the worker instances is "suspended", then that instance would be considered as "running with suspended tasks".

 

Status code for main instance:

        running 1

        Complete 2

        Canceled 3

        Terminated by error 4

        Terminated by End Event 5

Status code for routing instance status (you can consider this as worker instance status)

        Ready 1
        Wait for trigger 2
        Running 3
        Step executed 4
        Sleep = 5
        Split = 6
        Merged 7
        Complete 8
        Terminate 9
        Interrupted 10
        Suspended due to error (resume-able) 11
        Suspended due to task error (not resume-able) 13

 

Hope this can help.

 

Best,

Lifei 

4 0
replied on August 3, 2021

How would you find instances in the Forms database for all locked instances?

0 0
replied on August 11, 2016

Thanks Lifei,  knowing all the error codes really helps.   I had been able to figure out a few of them.

I came up with the query below for a simple count of suspended tasks and it seems to be working.  With your info I should be able to tweak it a bit more.


select count(MAIN.bp_instance_id)
--MAIN.[bp_instance_id],
--ERROR.[message]
from 
[LFForms].[dbo].[cf_bp_worker_instances] MAIN, 
[LFForms].[dbo].[bp_instance_errors] ERROR
where MAIN.[status] = 13
AND MAIN.bp_instance_id = ERROR.bp_instance_id

 

1 0
replied on November 5, 2018

Are the statuses found in the [cf_bp_worker_instnc_to_resume] table the same as the statuses you have listed above for the [cf_bp_worker_instances] table?

I have a user task in the [cf_bp_worker_instnc_to_resume] table that took 7 days 4 hours and 36 minutes to complete and it has a status of "2" in this table while all other normal-looking pending user tasks have a status of "5".

Thanks for your time!

1 0
You are not allowed to follow up in this post.

Sign in to reply to this post.