Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Process Manager (Stardust) » Identifying the slowest non-interactive (automatic) activity instance using SQL(How to identify the slowest non-interactive (automatic) activity instance in Stardust by querying the AuditTrail database)
Identifying the slowest non-interactive (automatic) activity instance using SQL [message #742223] Thu, 20 October 2011 05:47 Go to next message
Srinivasan Iyer is currently offline Srinivasan Iyer
Messages: 35
Registered: October 2011
Member
We want to run queries in the Stardust AuditTrail database to locate the slowest non-interactive (automatic) activity instance. We thought pulling entries from act_inst_history would provide us such information. Is that a correct assumption?
Re: Identifying the slowest non-interactive (automatic) activity instance using SQL [message #742227 is a reply to message #742223] Thu, 20 October 2011 05:49 Go to previous message
Srinivasan Iyer is currently offline Srinivasan Iyer
Messages: 35
Registered: October 2011
Member
The act_inst_history table is not necessarily always enabled, since it is mainly used to track state change information used for example to calculate actual work times (duration without considering any wait times).

The information you are looking can also be gathered from activity_instance table by using the SQL statement below ...

SELECT
  a.name "ACTIVITY",
  to_char(to_date('01-JAN-1970','DD-MM-YYYY')+(ai.starttime / (1000 * 60 * 60 * 24)),
  'YYYY-MM-DD HH24:MI:SS') "STARTTIME",
  to_char(to_date('01-JAN-1970','DD-MM-YYYY')+(ai.lastmodificationtime / (1000 * 60 * 60 * 24)),
  'YYYY-MM-DD HH24:MI:SS') "LAST MODIFICATION",
  (ai.lastmodificationtime - ai.starttime) "DURATION (ms)"
FROM
  activity_instance ai
  inner join activity a on (ai.activity = a.oid and ai.model = a.model)
WHERE
  currentuserperformer = 0 and
  currentperformer = 0 or
  performedby = 0;


If no currentuserperformer or currentperformer is set, the activity instance is not assigned to any user or role work list. If no performedby information is available, the activity instance was never assigned to either a user or role work list. In these cases the activity instance can be considered as a non-interactive one.

[Updated on: Thu, 20 October 2011 11:45] by Moderator

Report message to a moderator

Previous Topic:Transaction handling exceptions using Stardust with JBoss 5.1 and Jackrabbit
Next Topic:Plain Java Application Constructor Parameter is null
Goto Forum:
  


Current Time: Mon Jul 28 12:27:34 EDT 2014

Powered by FUDForum. Page generated in 0.01858 seconds