You are viewing an old version of this page. View the current version.
Compare with Current
View Page History
« Previous
Version 3
Next »
In this article, we will walkthough the thought process on designing a solution for the following business use case:-
- Visitor would request for demo by submitting a form in the Joget app.
- Upon submission of the form, fields will be validated to make sure that all mandatory fields are filled up.
- Upon successful validation of data, the form data will be shared with external system (i.e. CRM software) for further processing through the use plugins (i.e. JSON Tool).
- The main objective is to ensure successful delivery of data with the external system.
This is an example on how the form would look like.
![](/community/download/attachments/182321336/form-submit.png?version=1&modificationDate=1636794410000&api=v2)
Figure 1
The only external factor that may be outside of the Joget platform's control would be the external integration with the CRM software. We will walkthrough a few scenarios on how best to design for this business use case with UI/UX kept in mind.
We will design the app and discuss where best to invoke the external API.
- We will start with desiging the form itself. The form itself is quite simple, with just 3 fields and all of them made mandatroy.
![](/community/download/attachments/182321336/1-design-form.png?version=1&modificationDate=1636794511000&api=v2)
Figure 2 - In the userview, we are making use of the Form Menu and link it to the form we have just designed.
![](/community/download/attachments/182321336/2-form_menu.png?version=1&modificationDate=1636794704000&api=v2)
Figure 3 - Do not forget to create a CRUD menu too so that we can browse through all the submissions easily using Generate CRUD.
![](/community/download/attachments/182321336/3-crud.png?version=1&modificationDate=1636794942000&api=v2)
Figure 4 - At this point of time, there's no integration yet with the external CRM.
When end user hits on the Submit button, the following will take place.
- Form Validation - Joget would iterate through each and every form element and invoking the validator (if configured).
![](/community/download/attachments/182321336/form-validation.png?version=1&modificationDate=1636796301000&api=v2)
Figure 5
If all validations pass, then it will move to the next step, else, end user will be redirected back to the same form with validation errors displayed like what is shown in the screenshot below.
![](/community/download/attachments/182321336/4-validation_error.png?version=1&modificationDate=1636795844000&api=v2)
Figure 6
- Form Store - Since validations have passed, Joget will now proceed to the next step, form data will be passed to the store binder.
![](/community/download/attachments/182321336/form-binder.png?version=1&modificationDate=1636796341000&api=v2)
Figure 7
By default, the load/store binder is Workflow Form Binder where it will load and store form data into the table name declared in the form properties. In this case, the table name is "demo_request". - Since we are using Workflow Form Binder, this would also mean that we are saving the form data locally in Joget's database.
With what we have learned so far, this can be presented using the following diagram.
![](/community/download/attachments/182321336/submission-flow.png?version=1&modificationDate=1636796775000&api=v2)
Figure 8
Post Form Submission Processing
By using Post Form Submission Processing in Form, This is probably the easiest and quickest method. This allows us to invoke any Process Tool & Post Form Submission Processing Plugin. JSON Tool is one such candidate.
![](/community/download/attachments/182321336/post-process-json-tool.png?version=1&modificationDate=1636797148000&api=v2)
Figure 9