Peter_Fekete_8604

HOW TO use ACTIVATE_UC_OBJECT for script with PromptSets or Read Prompts

Discussion created by Peter_Fekete_8604 on Mar 3, 2017
Question
Is it possible to start dialog box :BEGINREAD… ENDREAD input mask in a script that is activated by ACTIVATE_UC_OBJECT?

Answer
:BEGINREAD… ENDREAD is part of the :READ script statement

Input masks which can be created using the :READ script statement are displayed if a script runs in dialog mode. 
The system assumes that a user who is logged on to the Automic Web Interface at this point in time can react to such a mask.

In following cases does the script NOT run in Dialog Mode by design:
  • the option Generate at runtime has been activated in the task.
  • the option Generate at runtime has been activated in the workflow in which the task will run. If several workflows are nested, 
  • the settings of the top workflow apply.
  • the task runs in a Schedule.
  • the task is activated using a script function such as ACTIVATE_UC_OBJECT.
  • a CallAPI starts the task.
  • the task is activated via an object setting (e.g. in the Result tab of a workflow).
  • the task runs in a group which serves as a queue.

Conclusion
In case to prevent standstill caused by inactive user, the system does not run the script in dialog mode when it is invoked with ACTIVATE_UC_OBJECT 

Suggested solution
PromptSet were ment for this exact situation, because they do not affect the script processing:

Create a PromptSet (PRPT) object where you can query all the desired input values, labels and other components. 
Those will be automatically referenced with variable names.

30di1ggywsd5.png 

Reference the prompt set in Variables and Prompts TAB in the script object

duoytchqeg90.png

and when you activate the script with ACTIVATE_UC_OBJECT do not forget to ENABLE_PROMPTS parameter
:set &ACTIVATESECONDSCRIPT# = ACTIVATE_UC_OBJECT("SCRI.ACTIVATED",,,,,PASS_VALUES,,,ENABLE_PROMPTS) 


ENABLE_PROMPTS parameter in ACTIVATE_UC_OBJECT     

Outcomes