Example of using Create a Request action
The Create a Request action from the AARI Web package enables you to create a new request in AARI on the web through a bot. In this example, use the Create a Request action to pass data through bot variables to initial form of the AARI process.
Pré-requisitos
- You must have a Bot Creator license and be assigned a custom
role with the following permissions:
- Check-in and check-out permission
- Create folder permission
- Create a process and check-in the process to the public workspace
- Assign at least one team to the process with the default team selected
- Select the by bot option in the Request creation field
Procedimento
- Log in to the Control Room as a Bot Creator user.
-
Create the initial form.
- On the left plane, click Automation.
- Click Create new > Form.
- Enter the form name employee_register_initial_form.
-
Enter the folder location Bots\Employee
Registration.
To change where your form is stored, click Choose and follow the prompts.
- Click Create & edit.
-
Use the following Elements and
Element label in the form.
Elements Element label TextBox Full Name Number ID Date Date of Joining Dropdown Gender Checkbox ID - For the Dropdown element, enter Male, Female in the Enter list items separated by commas field.
- For the Checkbox element, click the plus icon in Checkbox content field and add the locations San Jose, Tokyo, India.
- Click Save.
- Click Close.
-
Create a new process.
- In the same folder location, click Create new > Process.
- Enter the process name employee_register.
- Click Create & edit.
- Click Start to add an initial form to the process.
- In the Select initial data form field, browse and select the initial form, employee_register_initial_form.
- Provide Request title as Employee Registration.
- Click Save.
- Click Close.
- Check in this process to the public workspace.
-
Create a new bot.
- In the same folder location, click Create new > Bot.
- Enter the bot name employee_register_request_bot.
- Click Create & edit.
-
Create the following variables:
- emp_name: String type; use as input
- emp_id: Number type; use as input
- emp_date_of_joining: Datetime type; use as input
- emp_gender: List type; use as input; click the plus icon and add the default values as Male and Female
- emp_location: Dictionary type, Boolean subtype; use
as input; click the plus and add the key and
value pair as given below:
Key Value CheckBoxGroup0_0 True CheckBoxGroup0_1 False CheckBoxGroup0_2 False - employee_registration_request_id: Number type; use as output
-
Use the Create a Request action from AARI Web package.
- In the Actions palette, double-click or drag the Create a Request action from the AARI Web package.
- In the Public Process field, browse and select the public process employee_register. The initial form fields from the process are displayed in the Input values field. These fields are from supported interactive form elements.
-
In the Input values field, enter the values or
variables to complete the required information to the initial form as
given below:
- emp_name: $emp_name$
- emp_id: $emp_id$
- emp_date_of_joining: $emp_date_of_joining$
- emp_gender: $emp_genders$
- emp_location:
$emp_location$. To select the
location San Jose in the initial form field, add the key and
value pair as given below:
Key Value CheckBoxGroup0_0 True CheckBoxGroup0_1 False CheckBoxGroup0_2