-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Agent Backend for Royale Form Builder #978
Comments
I started on the agent templates in https://github.com/Moonshine-IDE/Moonshine-Domino-CRUD I created issues for individual features on that project. I'll update this issue when I have an initial working issue ready. |
There was some confusion about the role of the agents today. Here are some notes from the discussion. The overall goal is to have a working Royale interface for a Domino database. To implement this, we need these components
Here is a diagram of how the components work together: |
I created an early version of the template for the Java agents: https://moonshine-ide.com/downloads/Moonshine-Domino-CRUD/dev/template.zip This TemplateREADME.md, also included in the zip, explains the structure of the template, and how to use the template. I wrote up an example of the template generation logic in Groovy. Hopefully this will be useful at least as pseudocode to clarify the algorithm. For now, add a new action in the project menu called "Generate Java Agents". This should
My goal for downloading the template is:
The template is very small currently (32 KB), so the download shouldn't be a problem. The template may eventually be read from an official release on https://github.com/Moonshine-IDE/Moonshine-Domino-CRUD, but the project is private for now. Let me know if you have any questions or concerns for this. For now, this update is limited to generating the Java agents. There are may other updates pending:
I'd like to let @rat-moonshine start working on the Royale code soon. My plan for this is to supply:
|
Here is an example project generated with the Groovy class: Project: 2022_06_10__CRUDExample.zip From this configuration:
UPDATE: I also added some debugging lines in
|
I tested the updates today, and the generated agents compile and work properly. I tested
As discussed in the morning meeting, these features aren't working as expected:
|
- Project name fix - Adjusted console messages - Opening project in Moonshine post-creation - Notes path fix in build.gradle #978
Updates:
|
While testing during the meeting, I got this error:
Here is the project: However, I tested this against the same project earlier today, but I didn't see the error. |
The Moonshine-Domino-API is getting close. The next step after this will be to generate an example FormBuilder project and manually import the agents so that @rat-moonshine can start testing the Royale implementation. The initial example project should be simple, but I'll eventually want to make the project more complex so that I can different special cases like:
|
@rat-moonshine, is there anything still pending on the agent generation side? If not, please merge it for tomorrow so that we can work from the master build only in the meeting/demo tomorrow. One remaining issue I can think of is finding a "final" location for the template file, but this would be easy to change after the merge (as long as we remember). There is still a lot to do to integrate the agents in Royale. We can continue this in a new branch and/or new issue. |
This issue is now merged into |
- Code generation in-progress for server calls in Royale project #978
I encountered with different problems today while testing the backend agents in generated Royale project. This makes me thinking whether I'm using the correct URL for the purpose? Currently, I'm using test URLs from @JoelProminic from domino-49.prominic.net, and I see following problems.
Maybe the new logic isn't accessible because it is not released yet (?) |
In order to resolve the CRUD errors, I had to move the agents to rest-swf.prominic.net. The base URL is now: https://rest-swf.prominic.net/A55D78/Test-Moonshine-Domino-CRUD.nsf In addition, we'll need to run the test application from a local server, with a corresponding hosts file entry for localdev.prominic.net. We are doing something similar for MyAccount. We couldn't use the default server started by Moonshine because the CORS entry on rest-swf specifically requires https for localdev.prominic.net. |
I have released v0.3 of Moonshine-Domino-CRUD, which has changes for the keys. Instead of using the sorted columns from FormBuilder for the lookup keys, the agents now expect DominoUniversalID as the key. This is the ID generated by the Domino backend.o You can retrieve DominoUniversalID from the document object in the Create agent response, or from the Read agent. Note that the template still uses the
|
I should had add this earlier, @JoelProminic you can download the branch build for macOS to test the updates. Today I able to integrate only listing, addition and deletion agents. Please note, in OnDisk project's |
I moved the AuthorBookFan project to GitHub for more convenient updates: https://github.com/Moonshine-IDE/FormBuilder-Example-AuthorBookFan Updates:
Once we have this example working, we can add additional features like:
|
@JoelProminic I wonder how you compiles the generated Royale project from this application in Moonshine-IDE (?) Using hyphen in class-names seems not identified as valid identifier:
|
Updates: When the Book module now works correctly in CRUD, there's something with the Author agents. It seems like I'm sending correct values but the add and update agents are still returning errors, I wonder if this related with date-fields involvement (?) The branch build is now ready for a testing. |
Updates:
|
Array submission is working when values are provided for Text, Number, and DateTime multivalue fields. However, if no value are provided, the Royale application submits "null" which is an invalid value. Instead, it should submit an empty array: Similarly, I see that if a DateTime value is not set, the parameter is passed as "null". I was originally planning to have you not set the parameter in this case, but this does not work if we need some way to remove the value for a DateTime field on the Domino side. This is not something I do a lot with my agents, so I need to do some more planning for this. The Back icon looks fine now. I see that the application is staying in the form if there is an error, but it is displaying errorMessage in a snackbar message. Instead, I want to display the errorMessage in red just above the Submit and Cancel buttons. The "Request submitted successfully" snackbar message should not trigger a snackbar message on successful call to the Read agent (page load or Refresh button). We can keep this for now if you need it for debugging, but I originally thought this was a bug with the status of the application. The column values for DateTime and Multivalue fields look mostly good, but I see that it still shows |
I see that I forgot to writeup the
For now, I would like to see these errors displayed below the errorMessage at the bottom of the form. In the long term, we could display them next to the corresponding field. The default validation logic only validates the type of fields. To support testing
|
Updates:
On column value showing as |
- Removed snackbar during load-list - Error and validation-error messages now displaying at bottom - Added disabled-bead and busy-indicator #978
I confirmed that the empty multivalue parameters were fixed. This is ready to be merged. We will start on similar logic for Domino Visual Editor. |
This is now merged into |
We originally planned to have an agent backend for #704. We would generate agents for each Form, build them with NSFODP, and then build and deploy them in a Vagrant Domino instance (or configured Domino server?).
To support this, we need:
UPDATE: Branch information:
Branch: features/issue_978_CRUD_agents_integration
Build: https://moonshine-ide.com/downloads/releases/dev/macos/branches/features/issue_978_CRUD_agents_integration
Test Project: https://github.com/Moonshine-IDE/FormBuilder-Example-AuthorBookFan
The text was updated successfully, but these errors were encountered: