Are you not able to open the link ?
If yes, below is the details -
In opposite to COMPLETED
and TERMINATED
, FAILED
is not an end state.In this case you need to add the option -force
.See KnowledgeCenter for further details about using https://www.ibm.com/support/knowledgecenter/en/SSFPJS_8.6.0/com.ibm.wbpm.ref.doc/topics/rref_bpmprocessinstancespurge.html (and its corresponding MBean method).
Here is a sample how to call the PALService
MBean via wsadmin
(with "MYAPP" and "V1" as application and snapshot acronym):
import javax.management as mgmt import java.lang.String import java.lang.Boolean import jarray jForce=java.lang.Boolean("True") snapshotArr = ["V1"] jSnapshotArr = jarray.array(snapshotArr, java.lang.String) stateArr = ["FAILED", "COMPLETED", "TERMINATED", "ACTIVE"] jStateArr = jarray.array(stateArr, java.lang.String) mbean = AdminControl.completeObjectName ("type=PALService,node=Node1,process=server1,*") AdminControl.invoke_jmx(mgmt.ObjectName(mbean), "processInstancesPurge",["MYAPP",jSnapshotArr,jStateArr,None,None,None,None,None,None,jForce], ["java.lang.String","[Ljava.lang.String;","[Ljava.lang.String;","[Ljava.lang.String;","java.lang.String","java.lang.String","java.lang.String","java.lang.String","java.lang.String","java.lang.Boolean"])
Please, note that the parameters -endedAfterLocal
and -endedBeforeLocal
can only be used with an end state.Using these parameters for FAILED
instances will not work as they don't have an end date.The query result would be empty and no instances would be purged.
By the way, the https://www.ibm.com/support/knowledgecenter/en/SSFPJS_8.6.0/com.ibm.wbpm.admin.doc/topics/pal_mbean_examples.html have currently syntactical errors.The documentation will be fixed with DOC APAR JR59769, which is planned to be delivered with Cumulative Fixe 18.0.0.2 (aka CF2018.12) by the end of 2018.
------------------------------
Atanu Roy
------------------------------
Original Message:
Sent: Thu May 20, 2021 10:05 AM
From: Laszlo Kertesz
Subject: Error purging process instances using wsadmin command
Hi,
Unfortunately it do not help :(
Laszlo
Original Message:
Sent: 5/20/2021 10:01:00 AM
From: Atanu Roy
Subject: RE: Error purging process instances using wsadmin command
Hi Laszlo,
Hope this helps -
https://www.ibm.com/mysupport/s/question/0D50z000062kmTu/why-does-processinstancespurge-not-work-for-failed-instances?language=en_US
------------------------------
Atanu Roy
Original Message:
Sent: Thu April 29, 2021 12:23 PM
From: Laszlo Kertesz
Subject: Error purging process instances using wsadmin command
Hi All,
Following the description, I tried to purge all failed process instances using this Python text (the command is in the 5th line):
print("-------------------------------------------------------")
print("Deleting failed process instances")
print("")
AdminTask.ProcessInstancesPurge('[-instanceStatus FAILED -force]')
print("-------------------------------------------------------")
print("Failed process instance deletion finished")
but I get this error:
com.ibm.bsf.BSFException: exception from Jython:
Traceback (innermost last):
File "<string>", line 5, in ?
AttributeError: ProcessInstancesPurge
The connection was successful before executing the Python file of course.
Another admin task was executed sucessfully.
What's wrong? How to fix the error? Why do not work a command when I follow the description?
Thx,
------------------------------
Laszlo
------------------------------