PDI “Last Used” not updating despite login and development activity
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
- Elevated my role, logged in via PDI URL
- Updated and saved an integration-user record
- Created and saved an inbound OAuth integration using the Machine Identity Console
- Created a new standalone custom table named PDI Activity Test to generate valid development activity
- Is there currently a delay or known issue with the Last Used indicator?
- Does creating a custom table count as qualifying PDI activity or i need to do something else to log my activity?
- Is there any additional safe action I should take to ensure the instance is not reclaimed?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi @ShobhanaS
There is some interesting info about this from @l457 in this post:
I'm also trying to work out exactly what works and what doesn't. My theory at the moment is that the update can take up to 24 hours to register. Interested to know if this happens in your case.
I've been trying a simple update: creating a new record.
I don't have a definitive answer yet. I haven't ruled out that it's inconsistent, and there's a problem related to the wider issue they are having with the entire PDI infrastructure.
Most importantly: make sure you back up your PDI every time you use it!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago
This is my current last used on the dev portal. I haven't logged in or even been online during the weekend or 20 hours ago.
As I was writing this and checking when the script last executed on my pdi the above counter updated to 21 hours. The diff between now and the last finished execution was around 20h 49min at the time.
var grSysScriptExecutionHistory = new GlideRecord("sys_script_execution_history");
grSysScriptExecutionHistory.addEncodedQuery("sys_created_onRELATIVEGT@hour@ago@21^sys_created_by=developer.program.hop@snc")
grSysScriptExecutionHistory.addQuery("script", "CONTAINS", "type!=System Property^sys_updated_on<=javascript:gs.daysAgoEnd(-1)^sys_updated_by!=system^sys_updated_byNOT LIKE@snc^type!=Password Reset Process^ORtype=NULL^ORDERBYDESCsys_updated_on")
grSysScriptExecutionHistory.query()
grSysScriptExecutionHistory.next()
var finished = new GlideDateTime(grSysScriptExecutionHistory.getValue("finished"));
var now = new GlideDateTime();
var duration = GlideDateTime.subtract(finished, now);
gs.info(grSysScriptExecutionHistory.getRowCount())
gs.info(duration.getByFormat('HH:mm'));
/*
*** Script: 1
*** Script: 20:49
*/
I then ran the query used to get the last update:
var list = new GlideRecord("sys_update_xml");
list.addEncodedQuery("type!=System Property^sys_updated_on<=javascript:gs.daysAgoEnd(-1)^sys_updated_by!=system^sys_updated_byNOT LIKE@snc^type!=Password Reset Process^ORtype=NULL^ORDERBYDESCsys_updated_on");
list.setLimit(1);
list.query();
if (list.next()) {
var finished = new GlideDateTime(list.getValue('sys_updated_on'));
var now = new GlideDateTime();
var duration = GlideDateTime.subtract(finished, now);
gs.info(duration.getByFormat('HH:mm'));
}
//21:02This is not an update by me but either system or admin doing 4 updates to the same federated id criteria in the span of 4 minutes. Seems to coincide with the counter updating
So I am guessing the counter updates when the telemetry is collected, and it updates to either the last updated or maybe the login event if it is more recent? The collection itself seems sporadic
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago
Clicking this refresh button seems to execute the script on demand and will update the timer if there is an update, just validated this. It does not reset the counter on login events, only updates.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
hi @ShobhanaS ,
check this reply form servicenow cummunity admin
If this helped, mark it helpful and accept the solution.
Regards,
Tejas