Hi,
This is what I have been testing out now that I am using CAPA 4.3 SP1
USE [CAPAM_RUNTIME]
GO
select RunState, Count(RunState) as 'Count' from [dbo].[C2ORuntimeObjects]
where RootID = ROID and DiscriminatorType = 'WorkFlow'
group by RunState
UNION
select RunState, Count(RunState) as 'Count' from [dbo].[C2ORuntimeObjectsArch]
where RootID = ROID and DiscriminatorType = 'WorkFlow'
and isArchived = 0
group by RunState
If you want to include jobs on the Archive pane as well, just remove the "and isArchived = 0"
If anyone has a different/better way please let me know.
Ian