Charly,
As you know, deleting the /tmp and /work folders in Wildfly/JBoss will only redeploy the IDM ear files (iam_im and castylesr5.1). The JMS queues are not cleared; and the TP tables are read at start-up to reschedule any In Progress tasks/events for execution. If you uncheck all the boxes on the VST task and select In Progress for the "Where task status equals" value, you will see all of the records pulled in by the Task Management module.
The Cleanup TP scripts in the IAM Suite/IdentityManager/tools folder do not use the same query filter as the VST. The following query maps to the VST filter:
SELECT *
FROM tasksession12_5
WHERE environmentid = 1
AND (
(
(
(tasksession12_5.state = 0) -- begin_state
OR (tasksession12_5.state = 1) -- pre_stage
OR (tasksession12_5.state = 2) -- invalid_state
OR (tasksession12_5.state = 4) -- pending_state
OR (tasksession12_5.state = 8) -- executing_state
OR (tasksession12_5.state = 16) -- approved_state
OR (tasksession12_5.state = 32) -- rejected_state
OR (tasksession12_5.state = 64) -- post_state
OR (tasksession12_5.state = 768) -- unknown_state
OR (tasksession12_5.state = 1024) -- initial state
OR (tasksession12_5.state = 2048) -- primary pending_state
OR (tasksession12_5.state = 8192) -- secondary pending_state
OR (tasksession12_5.state = 1048576) -- task aborted
)
AND last_access_time < '09/01/2019 12:59:59 PM'
)
)
AND (initiatorid IS NULL OR initiatorid = tasksessionid);
This maps closely to a DEBUG trace on the ims.Submitted.Tasks module:
12:19:44,946 DEBUG [ims.SubmittedTasks] (default task-50) retrieving search filters...
12:19:44,946 DEBUG [ims.SubmittedTasks] (default task-50) Task State is Workflow in progress
12:19:44,946 DEBUG [ims.SubmittedTasks] (default task-50) In CASE MATCHING PENDING
12:19:44,946 DEBUG [ims.SubmittedTasks] (default task-50) addFilter attribute operator filterstateEQUALS1024
12:19:44,946 DEBUG [ims.SubmittedTasks] (default task-50) addFilter attribute operator filterstateEQUALS0
12:19:44,946 DEBUG [ims.SubmittedTasks] (default task-50) addFilter attribute operator filterstateEQUALS1
12:19:44,946 DEBUG [ims.SubmittedTasks] (default task-50) addFilter attribute operator filterstateEQUALS4
12:19:44,946 DEBUG [ims.SubmittedTasks] (default task-50) addFilter attribute operator filterstateEQUALS8
12:19:44,946 DEBUG [ims.SubmittedTasks] (default task-50) addFilter attribute operator filterstateEQUALS16
12:19:44,946 DEBUG [ims.SubmittedTasks] (default task-50) addFilter attribute operator filterstateEQUALS64
12:19:44,946 DEBUG [ims.SubmittedTasks] (default task-50) addFilter attribute operator filterstateEQUALS2048
12:19:44,946 DEBUG [ims.SubmittedTasks] (default task-50) addFilter attribute operator filterstateEQUALS4096
12:19:44,946 DEBUG [ims.SubmittedTasks] (default task-50) addFilter attribute operator filterstateEQUALS8192
12:19:44,946 DEBUG [ims.SubmittedTasks] (default task-50) calling searchTasks..
Again, you are dependent on someone with DBA acess to the TP tables DB to run the script.
------------------------------
Enrique Torres
Sr. Principal Architect
Enterprise Studio
HCL Technologies
------------------------------
Original Message:
Sent: 11-18-2019 03:15 PM
From: Pete Williams
Subject: Tasks in progress
Hi Charly,
Could you please elaborate more on what you mean by if you "delete the /tmp and /work folders"?
Also, while I understand you do not have access to run the SQL commands that Widjaja shared, I am certain you have a friendly neighborhood DBA who could assist you in running these. This is by far the quickest and most effective way of cancelling stuck in progress task. We run into a similar issue on a periodic basis and have our DBAs execute similar commands.
But if that is not something you can have a DBA run, below are two suggestion you could try is:
- Login as user and cancel the submitted tasks. This really only works if you are able to access the UI as that particular user that is running the task. Now as you said you have hundreds of these so this may not be the most viable option.
- Try using Cleanup Submitted Tasks. I have not personally tried doing this through CST, but there is an option to Cancel In Progress Tasks Only when executed. Click here for more information.
Hopefully one of these is a viable solution.
Thanks,
Pete
Original Message:
Sent: 11-14-2019 10:06 AM
From: charly setbon
Subject: Tasks in progress
Thanks Widjaja
As I mentioned, I do not have access to the DB so i cannot execute this SQL statement.
If i delete the /tmp and /work folder and restart JBOSS, will IDM still try to resubmit these tasks on startup?
This is not a PROD environment.
Original Message:
Sent: 11-13-2019 09:40 PM
From: Widjaja Sangtoki
Subject: Tasks in progress
Hi Charly,
We can set the status of those tasks to 'cancelled' updating the runtime database table in this case.
Check the following KB article
https://ca-broadcom.wolkenservicedesk.com/external/article?articleId=30407
or you can shutdown IM and just do the following SQL update statement.
update tasksession12_5 set state=256 where state NOT IN (2,32,128,512,256,1048576,16384) and next_state is NULL;
Please check also
https://ca-broadcom.wolkenservicedesk.com/external/article?articleId=17918
Regards,
Widjaja
Original Message:
Sent: 11-13-2019 05:06 PM
From: charly setbon
Subject: Tasks in progress
Hi all.
I have hundreds of tasks in progress and IDM is stuck.
I actually do not need these tasks. Is there a way to prevent them from being resubmitted when I restart IDM?
I don't want them to start, and I do not have access to the DB to change their status.
Thanks