Established Member.. JTorchia
Established Member..
488 views

How are you monitoring for flows pending user input?

How are companies monitoring for flows that are pending user input?  I envision that users will run interactive flows and forget about a prompt.

Labels (1)
0 Likes
3 Replies
Absent Member.. Steve_Drummond Absent Member..
Absent Member..

Re: How are you monitoring for flows pending user input?

We run a scheduled flow once per day (currently no need for more regular) that emails everyone in the automation team a list of running flows sorted by "RunTime" and "State"; we then go in and clear out any stopped/awaiting input/error flows which are quite old and obviously discarded.

 

This works for us at the moment and once we finally get upgraded to OO9 we will likely build more smarts into it.

0 Likes
Established Member.. JTorchia
Established Member..

Re: How are you monitoring for flows pending user input?

What operation or command returns the list of all running flows?  I apparently am overlooking something.

 

Thanks

0 Likes
Highlighted
Absent Member.. Steve_Drummond Absent Member..
Absent Member..

Re: How are you monitoring for flows pending user input?

We currently poll the HPOO database; however when we move to HPOO 9 we will be using the Central Webservice. To use the webservice you can use the WebService Import Wizard located in %ICONCLUDEHOME%\Studio\Tools\wswizard.exe and put it to the Central webservice located at https://<central_server>:8443/PAS/services/WSCentralService?wsdl where <central_server> is replaced with your server name or LB dns entry.

 

You can see a ton more information on the webservice in the SDK guide available from HLPN.

 

In the event you would rather query the DB (I only did this method because I wasn't aware of an exposed WSDL at the time) this is the query I wrote.

 

SELECT 
oid AS ID, 
user_id AS "User ID",
name AS "Flow Name", 
"State" =
      CASE exec_state
         WHEN '1' THEN 'Running'
         WHEN '10' THEN 'Input Required'
         WHEN '2' THEN 'Stopped'
         ELSE 'Unknown'
      END,
datediff(mi,start_time,GETDATE()) AS "Run Time (mins)",
Headless = 
	CASE is_headless
		WHEN '0' THEN 'False'
		ELSE 'True'
	END, 
COALESCE(MultiInstances.numofthreads,0) AS "MI Threads",
start_time AS "Start Time", 
dlm_time AS "Last Updated",
Central = 
	SUBSTRING(node_name,CHARINDEX('-',node_name) + 1, (CHARINDEX('-',node_name,CHARINDEX('-',node_name) + 1)) - (CHARINDEX('-',node_name)) - 1),
root_flow_uuid AS "Flow UUID"
FROM run ParentFlows
LEFT JOIN 
(SELECT count(*) numofthreads, parent_id FROM run WHERE parent_id <> -1 GROUP BY parent_id )
MultiInstances
ON ParentFlows.oid = MultiInstances.parent_id
WHERE ParentFlows.parent_id = '-1'
ORDER BY "Run Time (mins)" desc, State desc, Central asc

 Hope this helps.

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.