Automic Workload Automation

 View Only
Expand all | Collapse all

Promptset & Popup

  • 1.  Promptset & Popup

    Posted Nov 06, 2019 10:29 AM
    Hello,

    I have a problem with a new kind of job
    The request is to have a workflow with a promptset for some end users
    This workflow should not run if a previous run is still active or blocked AND a popup should display a warning message (no input required)

    My problem is that I can't manage to have 2 popup
    I tried several solutions but everytime the second popup appears as an Request in the top of the windows

    To display the warning message, I tried :
    • To use a :BEGINREAD statement in the main workflow' process if a previous workflow is already active followed by an CANCEL_UC_OBJECT(ALL)
    • A standalone job which use a :BEGINREAD statement if the workflow is already active and if not the ACTIVATE_UC_OBJECT (ENABLE_PROMPTS) function to launch the workflow
    • To move the prompset inside the workflow (on the first sub-workflow - with the rights settings) and add a previous job with a :BEGINREAD statement if a previous workflow is already active followed by an CANCEL_UC_OBJECT(ALL)

    I even tried to put the warning message after the promptset and everytime the second "popup" would not be displayed and still appears as a request at the top of the windows

    I would appreciate if anyone has already manage to implement this kind of "double popups"

    PS : sending an email instead of displaying a warning message works fine but they want a popup

    Regards,
    Yohan

    ------------------------------
    OneAutomation Consultant
    ------------------------------


  • 2.  RE: Promptset & Popup

    Posted Nov 06, 2019 11:36 AM
    What version are you working in?   Under V11, prompts did give us "pop ups" via the java client.  But under V12 and the web based interface, this behavior is very different.   It is possible you could "solve" this problem for V11, only to discover that they don't like it under V12.

    ------------------------------
    Pete
    ------------------------------



  • 3.  RE: Promptset & Popup

    Posted Nov 07, 2019 02:37 AM
    Hello Peter,

    Sorry, I forgot to mention that we are using v12.2

    ------------------------------
    OneAutomation Consultant
    ------------------------------



  • 4.  RE: Promptset & Popup

    Posted Nov 07, 2019 04:51 AM
    Edited by Carsten Schmitz Nov 07, 2019 04:59 AM
    Hi Yohan.

    I am actually somewhat puzzled. If you are using 12.2, you must be using the Automic Web Interface, correct?

    I am not sure I'd go the popup route with that at all, or how you'd actually get one.

    While there is the Web ​Notifications which is sort of a popup type message, I would consider this as far too fragile and sort of moving goal post for an implementation of a new system. Among the reasons being, it's not a popup that requires a button press, it's implementation specific for the browser, it's usually disabled by default and users need to explicitly allow web notifications.

    Additionally, out of curiosity I tried generating popups with e.g. :send_msg, and they do not trigger a popup at all in 12.x, at least in my browser. They merely cause a message in the message window which is very easy to overlook.

    Or are you by chance somehow still using the Java client?

    (edit: okay, I have now tested with the ALARM-type call object and I get a popup, and if it happens fast enough, there can be multiple at once on my screen. But they go away after a few seconds on their own, even if it's just one - easy to miss. And I would not rely on those either. Too implementation specific with the browser version in my mind ...)

    Regards,
    Carsten


  • 5.  RE: Promptset & Popup

    Posted Nov 07, 2019 05:04 AM
    Hello Carsten,

    Yes we are using AWI and not the Java client
    And I have the same behavior like you for the SEND_MSG function but I think this is normal behavior according the documentation (https://docs.automic.com/documentation/webhelp/english/AWA/12.2/DOCU/12.2/AWA%20Guides/help.htm#Script/Reference/SEND_MSG.htm?Highlight=SEND_MSG)

    However, the PromptSet and the :BEGINREAD statment both display a popup in AWI
    But with linked jobs (ie : in the same workflow or when using ACTIVATE_UC_OBJECT), only the first method display a popup. All others Promptset or :BEGINREAD are send to the request pane without pop up

    Regards,
    Yohan


    ------------------------------
    OneAutomation Consultant
    ------------------------------



  • 6.  RE: Promptset & Popup

    Posted Nov 07, 2019 05:16 AM
    Edited by Carsten Schmitz Nov 07, 2019 05:18 AM
    ​Hi Yohan.

    Thanks for the response and the details.

    I tried this, again out of curiosity, now with :BEGINREAD also. For me (browser with a Chrome engine) it produces a light blue popup at the top of the screen that, despite having a link to click to provide input included, vanishes after a few seconds regardless. Much like the "popup" from the ALERT-type CALL object.

    Not sure about your mileage, but this would get missed in our operation in a heartbeat even for the first popup. So I kinda remain doubtful on the utility of that as a whole, sorry.

    Best,
    Carsten


  • 7.  RE: Promptset & Popup

    Posted Nov 07, 2019 05:21 AM
    Dear Yohan,

    I don't know what you actually mean by "pop up". We are using Version 12.2 and I never get a pop-up-window, just the request dialog. It somtimes pops up without klicking on the button on top of the page, but that acutally happens only when starting a workflow, that is generated at activation time and has a prompt set. If it starts an object with a promptset within the workflow, just the button on top of the page appears, but the request dialog is not appearing by itself.

    I can't think of any trick that changes this behavior.

    ------------------------------
    Regards, Nicole
    ------------------------------



  • 8.  RE: Promptset & Popup

    Posted Nov 07, 2019 05:35 AM
    Nicole,

    Sorry for the wrong term.
    By popup I meant request dialog
    Your description of the behavior is exactly the problem I have
    I was really hoping that it would be possible to have 2 request dialog within a workflow

    Regards

    ------------------------------
    OneAutomation Consultant
    ------------------------------



  • 9.  RE: Promptset & Popup

    Posted Nov 07, 2019 07:07 AM
    Yohan,

    you can have two request dialogs, but the second would not pop up by itself. I don't understand either,why they have implemented it like that.

    I would rather want to have two types of requests (or message or alert): one type that opens the request dialog right away and one type that is indicated by this request button on top of the page - regardless when and in which order the requests are sent.

    Anyway, I hope you can find a convenient solution for your customers.

    ------------------------------
    Regards, Nicole
    ------------------------------



  • 10.  RE: Promptset & Popup
    Best Answer

    Posted Nov 07, 2019 03:57 AM
    Dear Yohan,

    I would configure the workflow as following:
    in the attributes tab:
    • runtime parameters: allow 1 simultaneous executions
    • Task result evaluation: OK status: ended_ok, If not, then execute an call object
    You can define a call object with type alert and sending it to the caller by putting the following lines into the process tab:

    ! Get Operator
    :set &userid# = SYS_USER_NAME
    :set &dep# = SYS_USER_DEP
    :ADD_ATT RECIPIENT, '&userid#/&dep#'​

    You can leave he recipient field empty, it will be "filled" by the above lines during execution.

    You should also be aware of that if a user gets a second alert, it will be just another tab in the request dialog. So, maybe your second "pop up" works, but is just not noticed by the user.


    ------------------------------
    Regards, Nicole
    ------------------------------



  • 11.  RE: Promptset & Popup

    Posted Nov 07, 2019 04:27 AM
    Hello Nicole,

    Thanks for your idea but unfortunatly, the behavior is the same
    At the second launch, the prompset is display as a popup, then after clicking on submit, the call notification is displayed as a request and not as a popup
    Moreover, this call (which indicate that the workflow could not be lauched due to an unterminated previous executions) will be displayed if the workflow encounter an error

    Regards,
    Yohan

    ------------------------------
    OneAutomation Consultant
    ------------------------------



  • 12.  RE: Promptset & Popup

    Posted Nov 07, 2019 04:36 AM
    Edited by Rebecca Vachon Nov 07, 2019 04:43 AM

    But you could have so much fun with this - a never ending promptset

    Tested in 12.2.1 & 12.3
    Edit: yes it is terrible code

    :SET &REPEAT# = "Y"
    :WHILE &REPEAT# = "Y"
    :SET &ACTIVE# = SYS_ACTIVE_COUNT("*", &$OBJECT_TYPE#, &$NAME#)
    :  BEGINREAD "Enter Values"
    :    READ &P_USER_LOGIN_NAME#, "08", "Please enter username", &P_USER_LOGIN_NAME#, "MK"
    :    IF &ACTIVE# GE 1
    :      READ &P_STATUS#, "08", "TASK Already Running", "I Know this", "C"
    :      SEND_MSG SYS_USER_NAME(), SYS_USER_DEP(), "TASK Already Running!!!"
    :      SET &REPEAT# = "Y"
    :    ENDIF
    :    READ &F_DESCIP, "08", "Please enter a SNOW ID#", &F_DESCIP, "MK"
    :  ENDREAD
    :  PRINT "How Many Active? &ACTIVE#"
    :  IF &P_USER_LOGIN_NAME# <> "END"
    :    SET &REPEAT# = "Y"
    :    SET_LAST_ERR 10006, "Please enter a valid login name"
    :  ELSE
    :    SET &REPEAT# = "N"
    :  ENDIF
    :ENDWHILE​