ServiceDesk

 View Only

ServiceDesk 7.5 SP1 Purge Utility 

Mar 13, 2014 04:50 PM

The intent of this project is to Search, Select and Purge Report Processes along with their associated references.

 

The Project is built on ServiceDesk 7.5 SP1 and is dependent on the associated Database Schema.

The Project includes a method for discerning the ProcessManager ConnectionString. If this fails, you can define the ConnectionString in the Project Properties.

 

The following is a description of the Project features:
 

Search.png

The 'Search ReportProcess' feature uses plain text pattern matching against the ReportProcessID, ProcessTitle and ProcessDescription data.
Found ReportProcesses will display in the 'Purge Candidates' section of the Form.
If the 'Description' scope is included with the Search, the text used for the search will be prepended to the ProcessTitle and enclosed with '{...}'.
This provides feedback that the search text was found in the ProcessDescription.
 

 

Range.png

The 'Select Range by Type' feature uses a 'Start:' and 'End:' item from a pull-down list.
This will perform a range type of search with the following conditions:

1) The ReportProcess Type is the same. For example: IM-
2) A 'Start:' and an 'End:' are selected.
 

 

DateTime.png

The 'Cut Off DateTime' feature selects any ReportProcess with a ProcessStarted date that is less than the defined DateTime.

 

Purge.png


The 'Keep Articles' switch allows for the retention of Knowledge Base articles.
Knowledge Base articles that are created using the 'Submit Knowledge Base Entry' form are ReportProcesses and will be purged if they are selected.
However, if the Knowledge Base process is Closed and the 'Keep Articles' option is checked, the KB Article will remain untouched in the Knowledge Base tab.

Begin the Purge...

Once confirmed, the Purge begins and will eventually end with a Count summary of the purged items.
One can 'Go Back', which starts over with a fresh copy of the remaining ReportProcesses.

 

———————–
PERFORMANCE
———————–
In an under performing test environment, one can expect approximately 1,000 items purged every 10 minutes.

The Progress Bar (SD_Purge_Utility_75SP1_pbar.package) version is significantly slower.
This is due to the granularity (1 second) of the 'Auto Exit Page On Timer' component.

 

———
FIXES       ( Posted: Monday, April 25, 2016 )
———

  • Selecting a single item in the Search List moves all of the items to the Purge List.
  • Duplicate items occur in the Search List when the same item is removed from the Purge List.
  • The project bombs when used in an environment without Change Management.
  • The project bombs when used in an environment without Incident Management.
  • The project exits unexpectedly when the database is SQL Server 2005.
  • Rebuilt the SQL_Purge_Utilities Integration Components. (The SD_Purge_Utility_75SP1_pbar.package Workflow contained broken SQL)
  • When this project is used with large data sets (1,000+), disable the 'Get_All_ReportProcessIDs' component and create (1) mapped value. This prevents the 'Select Range by Type' list from crashing the form.

 

For example:

test_process.png

 


---------------------------
ENHANCEMENTS      ( Posted: Sun, Jan 17, 2016 )
---------------------------

  • Added a Progress Bar for Purged Items. (SD_Purge_Utility_75SP1_pbar.package)
    The graphical element (Include HTML) is hidden behind the 'Undo All' button.
    NOTE: Page flicker on Progress Bar updates seems to be unavoidable.
  • Added SQL_Purge_Utilities Integration package.
  • Added source SQL and Purge validation scripts.

Statistics
0 Favorited
2 Views
7 Files
0 Shares
7 Downloads
Attachment(s)
package file
SD_Purge_Utility_75SP1.package   1.52 MB   1 version
Uploaded - Mar 11, 2020
package file
SD_Purge_Utility_75SP1_pbar.package   1.59 MB   1 version
Uploaded - Mar 11, 2020
package file
SQL_Purge_Utilities.package   50 KB   1 version
Uploaded - Mar 11, 2020
txt file
SQL_Purge_Utilities.txt   15 KB   1 version
Uploaded - Feb 25, 2020
txt file
validate_Delete_Task_History.txt   732 B   1 version
Uploaded - Feb 25, 2020
txt file
validate_Do_Purge.txt   5 KB   1 version
Uploaded - Feb 25, 2020
txt file
validate_LastUsedIdentity.txt   471 B   1 version
Uploaded - Feb 25, 2020

Tags and Keywords

Comments

May 19, 2015 01:30 PM

This is the only version.

May 18, 2015 04:34 PM

Is there a version of this utility works on 7.5 MP1?

 

Thanks,

Jan 24, 2015 11:59 PM

The package has been updated with the following fixes:

  • The project now works with Workflow only environments
  • The project supports SQL Server 2005

Jan 20, 2015 05:44 PM

We have discovered that the SQL Integration is not 2005 compatible. Stay tuned for an updated project.

Jan 20, 2015 12:15 PM

Please run the following SQL. Does it produce the same error?

with
    reference ( sessionID, processID )
    as
        (
            select rpr.ChildProcessID, rp.ReportProcessID
            from ReportProcessRelationship rpr with (NOLOCK)
            join ReportProcess rp with (NOLOCK) on rp.SessionID = rpr.ParentProcessID
            join CmRelatedProcess crp  with (NOLOCK) on crp.ProcessRelationshipId = rpr.ReportProcessRelationshipID
        )
select rp.ReportProcessID + ISNULL('=>' + reference.processID, '') as [ReportProcessID],
rp.ProcessStarted,
rp.ProcessTitle,
rp.SessionID
from ReportProcess rp with (NOLOCK)
left outer join reference on reference.sessionID = rp.SessionID


If you get the same error, try placing a ';' character before the 'with'. For example: ;with
If that still fails, what version of SQL are you running?

Jan 19, 2015 05:58 PM

THis is what I get back.  I have not modified the package in any other way

Log Fatal: What just happened?

 

: Time Spent: 0:6

 

: Component: Get All Report Process IDs :

 

: Message: Incorrect syntax near the keyword 'with'. If this statement is a common table expression or an xmlnamespaces clause, the previous statement must be terminated with a semicolon.

Incorrect syntax near the keyword 'ELSE'. :

 

: StackTrace: System.Data.SqlClient.SqlException: Incorrect syntax near the keyword 'with'. If this statement is a common table expression or an xmlnamespaces clause, the previous statement must be terminated with a semicolon.

Incorrect syntax near the keyword 'ELSE'.

at GetAllReportProcessIDs.SqlQuery.GetAllReportProcessIDs.Run(IData data)

at LogicBase.Core.ExecutionEngine.SinglePathProcessComponentExecutionDelegate.Execute(IData data, IOrchestrationComponent comp, String& outputPath, IExecutionEngine engine, TLExecutionContext context)

at LogicBase.Core.ExecutionEngine.AbstractExecutionEngine.RunComponent(TLExecutionContext context, IData data, IOrchestrationComponent comp)

Component Executed: Create Log Entry (LogicBase.Components.Default.Logging.CreateLogEntryComponent), exit path is ''

Data:

CurrentUserTimeZone = "Central Standard Time"

EnsembleSecurityToken = EnsembleSecurityToken servicedesk@tastefullysimple.com

ExceptionComponentClassName = "GetAllReportProcessIDs.SqlQuery.GetAllReportProcessIDs"

ExceptionComponentName = "Get All Report Process IDs"

ExceptionTriggerComponentID = "0f848856-a160-11e3-b00c-0050560517cd"

ExceptionTriggerExceptionClassName = "System.Data.SqlClient.SqlException"

ExceptionTriggerMessage = "Incorrect syntax near the keyword 'with'. If this statement is a common table expression or an xmlnamespaces clause, the previous statement must be terminated with a semicolon.

Incorrect syntax near the keyword 'ELSE'."

ExceptionTriggerStackTrace = "System.Data.SqlClient.SqlException: Incorrect syntax near the keyword 'with'. If this statement is a common table expression or an xmlnamespaces clause, the previous statement must be terminated with a semicolon.

Incorrect syntax near the keyword 'ELSE'.

at GetAllReportProcessIDs.SqlQuery.GetAllReportProcessIDs.Run(IData data)

at LogicBase.Core.ExecutionEngine.SinglePathProcessComponentExecutionDelegate.Execute(IData data, IOrchestrationComponent comp, String& outputPath, IExecutionEngine engine, TLExecutionContext context)

at LogicBase.Core.ExecutionEngine.AbstractExecutionEngine.RunComponent(TLExecutionContext context, IData data, IOrchestrationComponent comp)"

Later = 1/19/2015 4:53:36 PM

PlainConnectionString = "Data Source=10.2.0.171;Initial Catalog=ServiceDeskProcessManager;Integrated Security=True;Pooling=True;Connect Timeout=30"

ThisFormData =

TimeSpent = 00:00:06.1210000

Component Executed: End (LogicBase.Components.Default.Process.EndComponent), exit path is ''

Data:

CurrentUserTimeZone = "Central Standard Time"

EnsembleSecurityToken = EnsembleSecurityToken servicedesk@tastefullysimple.com

ExceptionComponentClassName = "GetAllReportProcessIDs.SqlQuery.GetAllReportProcessIDs"

ExceptionComponentName = "Get All Report Process IDs"

ExceptionTriggerComponentID = "0f848856-a160-11e3-b00c-0050560517cd"

ExceptionTriggerExceptionClassName = "System.Data.SqlClient.SqlException"

ExceptionTriggerMessage = "Incorrect syntax near the keyword 'with'. If this statement is a common table expression or an xmlnamespaces clause, the previous statement must be terminated with a semicolon.

Incorrect syntax near the keyword 'ELSE'."

ExceptionTriggerStackTrace = "System.Data.SqlClient.SqlException: Incorrect syntax near the keyword 'with'. If this statement is a common table expression or an xmlnamespaces clause, the previous statement must be terminated with a semicolon.

Incorrect syntax near the keyword 'ELSE'.

at GetAllReportProcessIDs.SqlQuery.GetAllReportProcessIDs.Run(IData data)

at LogicBase.Core.ExecutionEngine.SinglePathProcessComponentExecutionDelegate.Execute(IData data, IOrchestrationComponent comp, String& outputPath, IExecutionEngine engine, TLExecutionContext context)

at LogicBase.Core.ExecutionEngine.AbstractExecutionEngine.RunComponent(TLExecutionContext context, IData data, IOrchestrationComponent comp)"

Later = 1/19/2015 4:53:36 PM

PlainConnectionString = "Data Source=10.2.0.171;Initial Catalog=ServiceDeskProcessManager;Integrated Security=True;Pooling=True;Connect Timeout=30"

ThisFormData =

TimeSpent = 00:00:06.1210000

Jan 19, 2015 05:01 PM

FYI: The project is supposed to be able to fetch your SQL ConnectionString automatically. The Project Property is a fall-back if the automated method fails.

 

As previously hinted, the project log should tell us what the problem is.

Jan 19, 2015 04:46 PM

You'll need to review the Workflow logs to find the issue.  What errors occur when the process stops?

Jan 19, 2015 04:37 PM

This was show to me as possible solution to cleaning out old test Change Request.  I opened the package in Process Manager, made the change to access my database.  When I run it in debug mode it will let me sign on then it comes back that process is complete and just stops.  What am I doing wrong?

Nov 11, 2014 12:14 PM

Hi,

I'm sorry. Outstanding tickets there after excluding the counter was reset

 

Thank You!

André Florencio

Nov 10, 2014 12:09 PM

The project calculates the LastUsedIdentity in the 'Reconcile RPG Table' Embedded Model.
I would be interested in knowing if the project did not calculate correctly.

NOTE: Always check the ReportProcessGenerator and ReportProcess tables before resetting your Ticket count to zero, there may be tickets left in the system.

Nov 10, 2014 08:07 AM

The process id # is controlled by the table ReportProcessGenerator. If you simply remove all the entries associated with IMs it will reset the counter. You can use the following script to reset the number.

DELETE FROM ReportProcesssGenerator

WHERE Type LIKE 'IM-%'

Nov 10, 2014 06:39 AM

Hi bcason,

 

First of all thank you so much!

Is there any way to reset the count of the process? (IM-000001)

I used the Workflow and i couldn't reset de number of the process.

 

Thank you!

 

Regards,

André Florencio

Jul 17, 2014 09:18 AM

Thanks for this! So useful (but not to be given to children)!

Related Entries and Links

No Related Resource entered.