Automic Workload Automation

 View Only
Expand all | Collapse all

How to hold an Active JOBP Workflow

  • 1.  How to hold an Active JOBP Workflow

    Posted Jan 20, 2022 11:53 PM
    Hi Pete,

    We have already implemented different Queues for different applications, but still in certain scenarios we need to stop only one application and not all . so we need to pick and choose those applications which are active and need to be kept on hold.

    Regards,
    Amey Deshpande





  • 2.  RE: How to hold an Active JOBP Workflow

    Posted Jan 21, 2022 02:07 AM
    Edited by Rohit Vankayala Jan 21, 2022 02:15 AM
    Hello Amey,

    Queue can be stopped via script and this can be scheduled.

    :SET &RET# = MODIFY_SYSTEM("MODE", "QUEUE_NAME", "STOP")
    :IF &RET# = "0"
    : PRINT "Processing the Queue object QUEUE_NAME has STOPPED successfully"
    :SET &EMAIL# = SEND_MAIL("EMAIL_TO","EMAIL_CC","Automic Production QUEUE_NAME queue stopped","QUEUE_NAME processes are stopped.")
    :ELSE
    : PRINT "QUEUE_NAME: Error when changing the status to STOP."
    :SET &EMAIL# = SEND_MAIL("EMAIL_TO","EMAIL_CC","Automic Production QUEUE_NAME queue did not stop. Stop it Manually","QUEUE_NAME processes are not stopped. Stop queue Manually")
    :ENDIF

    NOTE: Above script should be scheduled in different queue (like client_queue or Maintenance queue).

    To stop an active workflow, runid is needed. RunId can be extracted via EH table using SQLI variable and pass the runid to TOGGLE_OBJECT_STATUS.
    more information on how to use --> TOGGLE_OBJECT_STATUS - Automic doc

    ------------------------------
    Process Automation Expert
    HWS Informationssysteme GmbH
    Germany
    ------------------------------



  • 3.  RE: How to hold an Active JOBP Workflow

    Posted Jan 23, 2022 01:06 AM
    Hi Rohit,

    Our issue is not holding all the workflows or jobs by stopping queue.

    We have scenarios where active workflow needs to be hold. 

    E.g.  In between 6:00 am - 8:00 am we have  applications are scheduled from a queue , during that time we just want to hold only one daily active application and not other from the queue. 

    And we are struggling for the same.

    Regards,
    Amey Deshpande 





  • 4.  RE: How to hold an Active JOBP Workflow

    Posted Jan 24, 2022 10:35 AM

    You can add precondition by creating common parameter with VARA as input for each application.

     

    Thanks

    Prakash Subramanian

    IT Batch Operations

     

    CSAA Insurance Group, a AAA Insurer

    5353 West Bell Road, MS Z01A, Glendale, AZ 85308

    p: 602.467.1960     c: 480.294.4818

    prakash.subramanian@csaa.com

     

    100 years of insurance the AAA way

     

    This message may contain information, including personally identifiable information that is confidential, privileged, or otherwise legally protected. If you are not the intended recipient, please immediately notify the sender and delete this message without copying, disclosing, or distributing it.






  • 5.  RE: How to hold an Active JOBP Workflow

    Posted Jan 24, 2022 10:54 AM
    Hello Amey,

    As per the description provided by you, each application is using dedicated queue. If the downtime is planned\rotuine for every maintenance\activity then a calendar with downtime can be added into queue.

    This will auto-assess the planned schedule and process will be triggered post downtime.

    If you would like to stop only active workflows in a specific queue, then you can use the below script with VARA.SQLI to pass runid.

    • VARA.SQLI --> select DISTINCT EH_AH_Idnr from EH with (nolock) where EH_OType = 'JOBP' and EH_Status = 1550 and EH_Queue = '<QUEUE_NAME>' and EH_Client = <client_number>
    • Script
    :SET &HND# = PREP_PROCESS_VAR(VARA.SQLI)
    :PROCESS &HND#
    :   SET &RUN_ID# = GET_PROCESS_LINE(&HND#,1)
    :   SET &RET# = TOGGLE_OBJECT_STATUS(&RUN_ID#, "STOP")
    :ENDPROCESS
    :CLOSE_PROCESS &HND#

    Regards,
    Rohit

    ------------------------------
    Process Automation Expert
    HWS Informationssysteme GmbH
    Germany
    ------------------------------



  • 6.  RE: How to hold an Active JOBP Workflow

    Posted Jan 21, 2022 10:41 AM

    For our use-cases where we have just a few processes that need to be skipped, we are using a VARA object as a state indicator. This is sample code from one of those processes.  The objects that run this code shut down gracefully if "gw.daytime.state" is set to "off". For this approach to work smoothly, the objects that run this code must be set to "generate at runtime" so that they will not generate any reports that demand they remain in the activity window.

    :set &DaytimeState# = get_var(gw.daytime.state,state,1)
    :print "Guidewire Daytime state: &DaytimeState#"
    
    :if &DaytimeState# = "OFF"
    :  print "The GW.DAYTIME.STATE is OFF.  Terminating."
    :  stop NOMSG
    :endif


    ------------------------------
    Pete Wirfs
    SAIF Corporation
    Salem Oregon USA
    ------------------------------



  • 7.  RE: How to hold an Active JOBP Workflow

    Posted Jan 24, 2022 10:56 AM

    Hello Amey, In our environment, we had similar need & implemented following approach.

    We created one NOTIFICATION object, lets call it as A.
    We created one specific User Group, lets call it as B. Assigned user group B to the Notification object A.
    Now, whenever A gets executed only user part of B user group will get the alerts & will be able to accept the notification.
    Now please add the A into the job plan's respective position, where you want to hold a manual stop point.

    When the job plan will get executed, depending upon the position of notification object A, it will give notification & will wait to get that accepted. Unless the notification object is accepted, the job plan will remain active / paused at the notification object step. 

    Based on your pre requisites, you can accepts the notification following the respective RUNIDs. As you accept the notifications, job plans will progress / remain paused.  



    ------------------------------
    Regards,
    Prosenjit
    ------------------------------



  • 8.  RE: How to hold an Active JOBP Workflow

    Posted Jan 26, 2022 11:03 PM
    Hi Prosenjit,

    It looks like an interesting use case, if you have any example of how you have implemented it.
    Can you please send us a message?

    Regards,
    Amey Deshpande





  • 9.  RE: How to hold an Active JOBP Workflow

    Posted Jan 31, 2022 10:23 AM
    Attaching the screen of those set up objects from test set up.










    ------------------------------
    Regards,
    Prosenjit
    ------------------------------



  • 10.  RE: How to hold an Active JOBP Workflow

    Posted Jan 31, 2022 01:00 PM
    Hi Prosenjit,

    Thank you for sharing the details. but from this I understood that this will only work when we have to have plan points in the workflow where we want to hold the application.

    But we have scenarios where due planned activities sometimes form a workflow (JOBP) - JOB A needs to be held or sometimes JOB B needs to be kept on hold depending on time.

    Also will you be able to let me know what is the suspend option on JOBP when it's in active state. will that work in a similar way like hold.

    Regards,
    Amey Deshpande









  • 11.  RE: How to hold an Active JOBP Workflow

    Posted Feb 01, 2022 12:16 AM

    Hello Amey,

    That's correct. In above setup, you need to choose the position where to hold the process for the approval.

    Regarding your question on "Suspend" option, its available in the AutomicWebDocument :
    https://docs.automic.com/documentation/webhelp/english/ALL/components/DOCU/12.3/Automic%20Automation%20Guides/help.htm#AWA/ProcMonitoring/WorkingWithTasks/PM_AvailableFunctions.htm?Highlight=Suspend



    ------------------------------
    Regards,
    Prosenjit
    ------------------------------