BPM, Workflow, and Case

BPM, Workflow, and Case

Come for answers. Stay for best practices. All we’re missing is you.

 View Only
  • 1.  Error purging process instances using wsadmin command

    Posted Thu April 29, 2021 12:24 PM
    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
    ------------------------------


  • 2.  RE: Error purging process instances using wsadmin command

    Posted Thu May 20, 2021 09:51 AM
    Sia Laszlo,
    I'll forward to an expert I know who might be able to help. Sorry if we missed it.
    köszönöm
    David


    ------------------------------
    DAVID Jenness
    ------------------------------



  • 3.  RE: Error purging process instances using wsadmin command

    Posted Thu May 20, 2021 10:01 AM
    Edited by Atanu Roy Thu May 20, 2021 10:01 AM
    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
    ------------------------------



  • 4.  RE: Error purging process instances using wsadmin command

    Posted Thu May 20, 2021 10:06 AM
    Hi,

    Unfortunately it do not help :(

    Image

    Laszlo

    Az Android Outlook letöltése





  • 5.  RE: Error purging process instances using wsadmin command

    Posted Thu May 20, 2021 10:29 AM
    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
    ------------------------------



  • 6.  RE: Error purging process instances using wsadmin command

    Posted Thu May 20, 2021 10:23 AM
    I have the same issue, I wish I could help. Maybe starting from scratch will help...

    ------------------------------
    David Compton
    ------------------------------



  • 7.  RE: Error purging process instances using wsadmin command

    Posted Thu May 20, 2021 10:30 AM
    Finally I gave it up. I delete them from the Process Inspector...

    Az Android Outlook letöltése





  • 8.  RE: Error purging process instances using wsadmin command

    Posted Fri May 21, 2021 04:41 AM
    Edited by QuikJean Fri May 21, 2021 05:46 AM
    Hi Laszlo

    I was doing the maintenance once in a while using the Process Inspector too and when I had a look at wsadmin, I found this was a disaster to code using it... so I recently created a BPM APP to do it automatically every weekend using BPM Rest API.
    I am using BAW 20.0.0.2 but I think this can run on some of the previous version of BAW. If you are interested (at least to see it), let me know and I'll find a way to host the APP somewhere.

    Jean

    ------------------------------
    QuikJean
    ------------------------------