Automic Workload Automation

Expand all | Collapse all

How to cancel JOBP in Preparing status

deactivated user

deactivated userJul 06, 2018 02:39 AM

  • 1.  How to cancel JOBP in Preparing status

    Posted Jul 02, 2018 12:36 AM

    Hello.

    I have JOBP that is in Preparing status few thousands times. I choice cancel (recursive) but it take a very long time to clear executions? Is there a faster way to kill this process? This JOBP will be deleted.



  • 2.  Re: How to cancel JOBP in Preparing status

    Broadcom Employee
    Posted Jul 03, 2018 04:23 PM

    Hi Szymon,

     

    Could you tell the exact name of the job scheduling manager? You can choose it from the categories list. This will help the right people to see your question and provide input.

     

    Thank you,

     

    Lucy



  • 3.  Re: How to cancel JOBP in Preparing status

    Posted Jul 06, 2018 01:35 AM

    Hello.

    I use AWA. Automation Engine API 12.1.0+build.9426 and choice CA Workload Automation in categories list. I hope that was good choice?

     

    Szymon



  • 4.  Re: How to cancel JOBP in Preparing status

    Posted Jul 06, 2018 02:34 AM

    Hi Simpleuser,


    As this is currently posted in the CA Workload Automation space and you had mention that you are using AWA / Automation Engine v12.1 I will move this discussion thread over to the CA Automic Workload Automation  section to better reach the product audience.  



  • 5.  Re: How to cancel JOBP in Preparing status

    Posted Jul 06, 2018 02:39 AM

    Hello.

     

    Thanks



  • 6.  Re: How to cancel JOBP in Preparing status

    Posted Jul 06, 2018 07:44 AM

    To the best of my knowledge, if a workflow is stuck in Preparing status, it is not possible to to cancel it using the normal Cancel or Cancel (recursive) functions. Instead, one must use the Modify status manually function.



  • 7.  Re: How to cancel JOBP in Preparing status

    Posted Jul 06, 2018 08:01 AM

    Hi Michael.

    In Preparings status canceling (recursive) working but have to mark all the tasks manualy and use cancel. Generating status have to be changed manualy. I had few "generating" tasks and use "working for host" on them and then cancel. My problem is how to speed up canceling proces. Is there a way to select every RUN ID at once? The problem is that I don't see main RUN ID that could kill all child tasks.



  • 8.  Re: How to cancel JOBP in Preparing status

    Posted Jul 06, 2018 08:07 AM

    Ah yes, I may have gotten those to states confused.

     

    If the run ID of the parent workflow is available, you could do something like this:

    1. Write an SQLI VARA that lists all of the run IDs of the child tasks of a workflow with a specified run ID.
    2. Write a script that parses this VARA using PREP_PROCESS_VAR, and for each run ID in the data sequence, cancels the task using CANCEL_UC_OBJECT.


  • 9.  Re: How to cancel JOBP in Preparing status

    Posted Jul 06, 2018 08:32 AM

    This SQL query will list the run IDs of all of the tasks in an active workflow.

    select
    --- EH_Name,EJPP_Lnr,EJPP_Object,
    EJPP_TaskIdnr
    from EH,EJPP
    where EH_AH_Idnr = EJPP.EJPP_AH_Idnr
    and EH_AH_Idnr = ?
    and EJPP_OType not in ('<START>','<XTRNL>','<IF>','<FE>','<END>')
    order by EJPP_Lnr

    Replace the bind parameter with the workflow run ID.



  • 10.  Re: How to cancel JOBP in Preparing status

    Posted Jul 06, 2018 08:14 AM

    I cannot find parent ID. It is a loop on proces that create itself over and over.



  • 11.  Re: How to cancel JOBP in Preparing status

    Posted Jul 06, 2018 08:22 AM

    Do you mean a FOREACH workflow or something else like a loop in a script? What is the task that is generating these tasks? Can you cancel that task?



  • 12.  Re: How to cancel JOBP in Preparing status

    Posted Jul 06, 2018 08:31 AM

    I was testing few different tasks with multiple transfers and when copy script from scri to JOBP instead of "set &ret# = activate_uc_object(JOBF.name)" I use set &ret# = activate_uc_object(JOBP.name) and had loop on JOBP itself.



  • 13.  Re: How to cancel JOBP in Preparing status

    Posted Jul 06, 2018 08:34 AM

    I’d say cancel the task that is running ACTIVATE_UC_OBJECT. This task must have a run ID, no?



  • 14.  Re: How to cancel JOBP in Preparing status

    Posted Jul 06, 2018 08:46 AM

    If you have many tasks in the Activities table that you want to cancel/deactivate, and if you cannot find a way to do it using AE scripting, and if you do not want to do it manually, then you can always contact CA Automic Support. They can provide an SQL statement that will remove the tasks directly from the relevant tables. You still have to be able to identify the tasks somehow though.



  • 15.  Re: How to cancel JOBP in Preparing status

    Posted Jul 06, 2018 09:17 AM

    I use old user_interface and can mark 5000 tasks instead of 500 from web interface  All hanging tasks killed.