WAI Extend Generate
Extend WO allows adding a new behavior to an existing WO (Workcube Object) without touching its files. The addition is always done as an extension: the generated code is written to a separate file and linked to the selected events of the WO. If the extension is deleted or disabled, WO returns to its previous state.
The screen only adds extensions. Changing the WO's own form, adding fields to the main form, or correcting files according to standards is the job of the Enhance with WAI screen.
Where to open
In the detail of a WO on the developer screen, Expand WO is selected from the WAI menu at the top right (fa fa-puzzle-piece icon).
index.cfm?fuseaction=dev.wo&event=wai&woid=&wai_wo= &waiwo_type=wo_extend
On the left of the screen is the step-by-step form, and on the right is the Dev Mode chat pinned to this WO. Screenshots or mockups can be added from the chat; the results also fall into the conversation.
Extension types
Type | What does | Events | Location |
|---|---|---|---|
Display | Appears on the page. It is added with its own box at the top or bottom of the event page; If it saves data, it has its own form and its own save button. | List, Add, Update, Detail, Dashboard, Info | Above / below the page content |
Action | It works during the recording process, it does not show anything on the screen. Example: writing rows to a linked table after recording, keeping a log, checking. | Add, Update, Delete | Before / after recording |
How it works
- Verification: Extension type and the events it will work on are selected. The event list is read from the WO register and the controller together; Events that are not open in WO cannot be selected. The WO's recording path and main table are shown in the information line.
- Clarification: The extension is named, its location is selected and what is requested is written in free text. Words can be selected from the dictionary for names and labels.
- Fields: If desired, a table can be selected and its columns brought; Clicking on a column creates a field row for that column. The remaining column "No connection" remains only in the interface.
- Write: The code is generated, passes automatic control, is written to the file and connected to the selected events. Conclusion to the conversation; A brief explanation of what it does is dropped by the links "Open in Monaco" and "Add context".
Made for correct code
- Real names: The current variable and form field names of the page and data cfc functions are given to the artificial intelligence along with their arguments; names are not made up.
- Real schema: The real columns of the selected tables and the tables mentioned in the description are given. If the generated query has a name that is not in the schema, the file will not be written.
- Recording path: It is determined whether the WO is recorded via data cfc (datagate) or query file (form_converter); action extension is written with the correct variables in that path.
- Action rules: Action extension does not produce any output and checks that it works in the recording flow. This control is essential because the same file is run at page opening and AJAX requests.
- Display rules: Display extension does not touch the boxes and areas of the page, does not use the structures used by the page designer, and sends the record to its own function, not to the main record of the page.
- Record integrity: Code that does not comply with the rules is not written to the file. If the database record fails after the file is written, the file is also deleted.
Main table and child tables
Extension operates outside of WO's main form; therefore it cannot save the columns of the main record.
- Extended Fields or Optimize with WAI is used for main table columns. If these columns are selected, the request is rejected and redirected.
- Linked tables (tables with their own records) work with the extension: the extension writes to these tables with its own form and data cfc functions. If the required function is not included in the data cfc, its skeleton is added automatically.
Usage with Optimize
- The Open in Refine button appears in the rejected request in Expand; The request text is moved to the chat of the Refine screen.
- If a request for a new box, section, widget, or extension is detected in the Refine chat, the Extend screen is recommended. Open in Expand moves the text, Continue here runs the request in Optimize.
Error messages and log history
- For connection errors, the real cause (HTTP status and server's message) is shown. If the artificial intelligence service gives a temporary error, the request is automatically repeated once.
- Each request; The selections, along with the model used and the result, are written to the wai_wo_extend log on the server. The team accesses the prompt history from here.
Feedback
Shall we talk about Workcube?
Call duration has expired.