Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Create master table and master data at schema ERP_ONEWEB with below SQL. (PostgreSQL)
Create transaction table at schema ERP_ONEWEB with below SQL. (PostgreSQL)
Create database sequence lists below. REQUEST_ID_SEQ ORDER_ITEM_ID_SEQ ORDER_ITEM_SUPPLIER_ID_SEQ
Order Management Application is an application used to manage order requests (Electronic equipment) within an organization. When a user submits an order request for new equipment, the Order Management Application will automatically take care of the full process of requesting the equipment from suppliers, approving the order request, and finally making the purchase. Since the entire process is automated, there is very less chance of things going wrong.
Following are the features of ONEWEB used in Order Management.
Process Designer Start/End Event Database Activity Java Activity Human Activity Exclusive Gateway
App Designer
Normal input field Dynamic List field SQL Work queue Search Like Customization
We will now learn about how to use App Designer to create screens of Order application.
There are the various screens for Order Request
Create Order Request screen.
Create Order Item screen.
Order Request Screen for BackOffice
Order Item Screen for BackOffice
Order Request Screen for Approval
Order Item Screen for Approval
Order Request Screen for Admin PO
Learn about step to clone entity for role Admin who will add supplier lists.
1. From ONEWEB App Designer screen, click Entities > Clone Entity. The dialog of Clone Entity opens.
2. Select existing entity to " Requester" at Select Existing Entity, put new entity name to "Doc Order Request Item - Admin" at Name of Clone Entity and click Clone. Wait until message "Entity has been imported successfully" and button name "Open Cloned Entity" show.
3. Click Open Cloned Entity. (The popup dialog of Search Entities shows all entities. Now click on icon pencil to edit.)
4. From module Order Request, edit Project by click icon pencil and switch viewFlag to "Y" and click OK.
5. From module Order Request, edit Phase by click icon pencil and switch viewFlag to "Y" and click OK.
6. From module Order Request, edit Description by click icon pencil and switch viewFlag to "Y" and click OK.
7. From Order Request Module click icon append row. The system will append new row to the table.
8. From Tools > Field drag Dynamic List to the first cell of new row (From step 7) the dropdownLabel shows.
Click icon pencil. The dialog of Dynamic List Box Configuration opens.
Change Table Name to "wf_ms_list_box".
Change Column Show to "DISPLAY_NAME".
Change Column Value to "DISPLAY_CODE".
Put "category_code = 'ADMIN_DECISION'" to Condition Value.
Change FIELD_ID to "DECISION".
Click icon Populate from FIELD_ID. The system will auto generate ShowFieldName to "Decision".
Click OK.
9. From Tools > Field drag Textarea to the second cell of new row (From step 7) the textareaLabel shows.
Click icon pencil. The dialog of Text Area Configuration opens.
Change FIELD_ID to "DECISION_REMARK".
Click icon Populate from FIELD_ID. The system will auto generate ShowFieldName to "Decision Remark".
Click OK.
10. From entity button, remove button SAVE that Page Action is "ENTITY_INSERT" and click OK.
11. From entity button, remove button CANCEL that Page Action is "ENTITY_INSERT" and click OK.
12. From entity button, remove button CREATE.
13. From module Order Request Item, edit Hardwareid by click icon pencil and switch viewFlag to "Y" and click OK.
14. From module Order Request Item, edit Spec by click icon pencil and switch viewFlag to "Y" and click OK.
15. From module Order Request Item, edit Unit by click icon pencil and switch viewFlag to "Y" and click OK.
16. From module Order Request Item, edit Remark by click icon pencil and switch viewFlag to "Y" and click OK.
17. From module button, delete button "ADD" and "DELETE".
18. Click Save this Entity.
The completed entity looks as shown below
Learn about step to create entity for administrator who will add possible supplier.
1. From the App space screen, click Form and then popup dialog will opens.
2. Enter name in field Component Name and click Start Design.
3. From Tools > Tabs drag 2-Layer Tab to the silver box under entity name. The dialog of Add Tab data opens. Put "Order Request Item" to Title and then click Add.
4. From Tools > Module drag 1-1 to the box under the Order Request Item tab.
Click icon pencil. The dialog of Module Configuration opens.
Change Module Name to "Order Item".
Change Table Name to "wf_order_req_item (T)"
Click OK.
Click icon Configuration Layout and the dialog opens.
Select 2 Column and then click Accept. The table that has 2 columns will show.
5. From Tools > Field drag Dynamic List to the first cell of the table (From step 4.6) The dropdownLabel shows.
Click icon pencil. The dialog of Dynamic List Box Configuration opens.
Change Table Name to "wf_ms_hardware".
Change Column Show to "HARDWARE_NAME".
Change Column Value to "HARDWARE_ID".
Change FIELD_ID to "HARDWAREID".
Change ShowFieldName to "Hardware Id".
Switch viewFlag to "Y".
Click OK.
6. From Tools > Field drag Textarea to the second cell of the table. (From step 4.6) The textareaLabel shows.
Click icon pencil. The dialog of Text Area Configuration opens.
Change FIELD_ID to "SPEC".
Click icon Populate from FIELD_ID. The system will auto generate ShowFieldName to "Spec".
Switch viewFlag to "Y".
Click OK.
7. From Order Item Module click icon append row. The system will append new row to the table.
8. From Tools > Field drag Text Box to the first cell of new row. (From step 7) The textLabel shows.
Click icon pencil. The dialog of Text box Configuration opens.
Select "Integer" at Number Formatter.
Change FIELD_ID to "UNIT".
Click icon Populate from FIELD_ID. The system will auto generate ShowFieldName to "Unit".
Switch viewFlag to "Y".
Click OK.
9. From Tools > Field drag Textarea to the second cell of new row (From step 7) The textareaLabel shows.
Click icon pencil. The dialog of Text Area Configuration opens.
Change FIELD_ID to "REMARK".
Click icon Populate from FIELD_ID. The system will auto generate ShowFieldName to "Remark".
Switch viewFlag to "Y".
Click OK.
10. From Order Item Module click icon append row. The system will append new row to the table.
11. From Tools > Field drag Hidden to the first cell of new row. (From step 10) The hiddenLabel shows.
Click icon pencil. The dialog of Hidden Field Configuration opens.
Put "id = 'ORDER_ITEM_ID'" to Source tag (for link with parent entity).
Change FIELD_ID to "ORDER_ITEM_ID".
Click icon Populate from FIELD_ID. The system will auto generate ShowFieldName to "Order Item Id".
Click OK.
12. From Tools > Field drag Hidden to the first cell of new row. (From step 10) The hiddenLabel shows.
Click icon pencil. The dialog of Hidden Field Configuration opens.
Put "id = 'REQUEST_ID'" to Source tag (for link with parent entity).
Change FIELD_ID to "REQUEST_ID".
Click icon Populate from FIELD_ID. The system will auto generate ShowFieldName to "Request Id".
Click OK.
13. From Tools > Button drag Entity Button to space under the Module Order Request. The SUBMIT_VALUE show.
Click icon pencil. The dialog of Button Configuration opens.
Change buttonName to "SAVE".
Change Page Action to "ENTITY_INSERT".
At Button Action select first radio and change button action to "saveEntity()".
Click OK.
14. From Tools > Button drag Entity Button to space under the Module Order Request. The SUBMIT_VALUE show.
Click icon pencil. The dialog of Button Configuration opens.
Change buttonName to "SAVE".
Change Page Action to "ENTITY_UPDATE".
At Button Action select first radio and change button action to "saveEntity()".
Click OK.
15. From Tools > Button drag Entity Button to space under the Module Order Request. The SUBMIT_VALUE show.
Click icon pencil. The dialog of Button Configuration opens.
Change buttonName to "CANCEL".
Change Page Action to "ENTITY_INSERT".
At Button Action select first radio and change button action to "cancelEntity()".
Click OK.
16. From Tools > Button drag Entity Button to space under the Module Order Request. The SUBMIT_VALUE show.
Click icon pencil. The dialog of Button Configuration opens.
Change buttonName to "CANCEL".
Change Page Action to "ENTITY_UPDATE".
At Button Action select first radio and change button action to "cancelEntity()".
Click OK.
17. From Tools > Tabs drag Normal Tab to the silver box under the table. The dialog of Add Tab data opens. Put "Supplier List" to Title, select 1 column and then click Add. The Order Item tab show.
18. From Tools > Module drag 1-Many to the box under the Order Item tab.
Click icon pencil. The dialog of Module Configuration opens.
Change Module Name to "Supplier".
Change Table Name to "wf_order_req_item_supplier (T)".
Click OK.
19. From Tools > Field drag Hidden to Module Supplier. The hiddenLabel shows.
Click icon pencil. The dialog of Hidden Field Configuration opens.
Change FIELD_ID to "ORDER_ITEM_SUPPLIER_ID".
Click icon Populate from FIELD_ID. The system will auto generate ShowFieldName to "Order Item Supplier Id".
Click OK.
20. From Tools > Field drag Hidden to Module Supplier. The hiddenLabel shows.
Click icon pencil. The dialog of Hidden Field Configuration opens.
Change FIELD_ID to "ORDER_ITEM_ID".
Click icon Populate from FIELD_ID. The system will auto generate ShowFieldName to "Order Item Id"
Click OK.
21. From Tools > Field drag Text Box to Module Supplier. The textLabel shows.
Click icon pencil. The dialog of Text box Configuration opens.
Change FIELD_ID to "SUPPLIER_NAME".
Click icon Populate from FIELD_ID. The system will auto generate ShowFieldName to "Supplier Name".
Change FieldGroup to "1" and change Seq to "1".
Switch ShowSearch to "Y".
Change showSearchSeq to "1".
Select "CHECK_NULL" at Validate Code and click icon plus. The new record of Validate Code show.
Click OK.
22. From Tools > Field drag Text Box to Module Supplier. The textLabel shows.
Click icon pencil. The dialog of Text box Configuration opens.
Select "Integer" at Number Formatter.
Change FIELD_ID to "IN_STOC
Click icon Populate from FIELD_ID. The system will auto generate ShowFieldName to "In Stock".
Change FieldGroup to "1" and change Seq to "2".
Switch ShowSearch to "Y".
Change showSearchSeq to "2".
Select "CHECK_NULL" at Validate Code and click icon plus. The new record of Validate Code show.
Click OK.
23. From Tools > Field drag Text Box to Module Supplier. The textLabel shows.
Click icon pencil. The dialog of Text box Configuration opens.
Select "Currency" at Number Formatter
Change FIELD_ID to "UNIT_PRICE".
Click icon Populate from FIELD_ID. The system will auto generate ShowFieldName to "Unit Price".
Change FieldGroup to "2" and change Seq to "1".
Switch ShowSearch to "Y".
Change showSearchSeq to "3".
Select "CHECK_NULL" at Validate Code and click icon plus. The new record of Validate Code show.
Click OK.
24. From Tools > Field drag Textarea to Module Supplier. The textareaLabel shows.
Click icon pencil. The dialog of Text Area Configuration opens.
Change FIELD_ID to "REMARK".
Click icon Populate from FIELD_ID. The system will auto generate ShowFieldName to "Remark".
Change FieldGroup to "2" and change Seq to "2".
Click OK.
25. From Tools > Button drag Module Button to space under the Module Supplier. The SUBMIT_VALUE show.
Click icon pencil. The dialog of Button Configuration opens.
Change buttonName to "ADD".
Change Page Action to "SUB_SEARCH".
At Button Action select first radio and change button action to "popupActionFlow('[MODULE_ID]')".
Click OK.
27. From Tools > Button drag Module Button to space under the Module Supplier. The SUBMIT_VALUE show.
Click icon pencil. The dialog of Button Configuration opens.
Change buttonName to "SAVE".
Change Page Action to "INSERT".
At Button Action select first radio and change button action to "actionFormSubmit('insertMany','Y')".
Click OK.
28. From Tools > Button drag Module Button to space under the Module Supplier. The SUBMIT_VALUE show.
Click icon pencil. The dialog of Button Configuration opens.
Change buttonName to "SAVE".
Change Page Action to "UPDATE".
At Button Action select first radio and change button action to "actionFormSubmit('insertMany','Y')".
Click OK.
29. From Tools > Button drag Module Button to space under the Module Supplier. The SUBMIT_VALUE show.
Click icon pencil. The dialog of Button Configuration opens.
Change buttonName to "CANCEL".
Change Page Action to "INSERT".
At Button Action select first radio and change button action to "$('#many_[MODULE_ID]_dialog').dialog('close');".
Click OK.
30. From Tools > Button drag Module Button to space under the Module Supplier. The SUBMIT_VALUE show.
Click icon pencil. The dialog of Button Configuration opens.
Change buttonName to "CANCEL".
Change Page Action to "UPDATE".
At Button Action select first radio and change button action to "$('#many_[MODULE_ID]_dialog').dialog('close');".
Click OK.
31. Configure Order Item module key.
From module Order Item click icon pencil. The dialog of Module Configuration opens.
Select "ORDER_ITEM_ID at Module Key.
Put "IT" to Prefix.
Put "18" to KeyLen.
Put "ORDER_ITEM_ID_SEQ" to Sequence.
Click icon plus. The new record of Module Key show.
Click OK.
32. Configure Supplier module key.
From module Supplier click icon pencil. The dialog of Module Configuration opens.
Select "ORDER_ITEM_SUPPLIER_ID" at Module Key.
Put "SP" to Prefix.
Put "18" to KeyLen.
Put "ORDER_ITEM_SUPPLIER_ID_SEQ" to Sequence.
Click icon plus. The new record of Module Key show.
Select "ORDER_ITEM_ID" at Module Key.
Select "ORDER_ITEM_ID" at Parent Key.
Click icon plus. The new record of Module Key show.
Click OK.
33. Click button Save this Entity.
The completed entity looks as shown below
Learn about step to link parent entity (Order Request Entity for Admin) with child entity (Order Request Item)
1. From ONEWEB App Designer screen, click Utilities > Parent Child Entity and then click icon plus on the popup dialog. Parent Child Entity Configuration opens.
2. Select Parent Entity to "Doc Order Request - Admin"
3. Select Child Entity to "Doc Order Request Item - Admin"
4. Select Parent Tab to "Order Item"
5. Select Child Tab to "Supplier List"
6. Select Parent Module to "Order Request Item"
7. Put "REQUEST_ID" to Parent's Fields.
8. Put "REQUEST_ID" to Interface Parameters.
9. Put "REQUEST_ID" to Child's Fields.
10. Put "ADD" to Display Value.
11. Click Save. The new record that PARENT ENTITY start with "Doc Order Request - Admin show and the system will automatic add module button name "ADD" to the parent entity (Doc Order Request Item - Admin).
12. Go back to edit entity Doc Order Request Item - Admin.
Edit module button "ADD" by click icon pencil.
Change Page Action to -- Please select -- for hide button from this entity.
Click OK and save entity
Learn about step to use process button link with process flow from Process Designer.
Pre-Condition Create process flow from Process Designer.
Submit button for start flow at entity "Doc Order Request - Requester".
1. From App Designer, search entity "Doc Order Request - Requester" and click edit it.
2. From Button, drag Process Button to entity button's area. The button name "SUBMIT_VALUE" will appear then click icon pencil to edit it.
3. At tab Process
Select Process Type to "Process".
Select Project to "DOC Order Request".
Select Process to "DOC Order Request".
Select Process Action to "Start".
Move cursor to icon "Load from AD" and click. The system will populate list of business object to mapping with screen.
Click icon minus in front of "Order Request Item" to hide attribute list.
Move cursor to "Request Id" under "Order Request" drag it and move to link with "RequestId" under "DOCOrderRequestBO".
Move cursor to "Requester" under "Order Request" drag it and move to link with "Requester" under "DOCOrderRequestBO".
4. At tab Pre Action
Click first radio and select method saveEntity().
5. At tab Other Settings.
Change buttonName to "SUBMIT".
Select Page Action to "ENTITY_INSERT"
6. Click OK.
7. Do step 2 to 6 again by change value at step 5.2 from "ENTITY_INSERT" to "ENTITY_UPDATE".
We will have two SUBMIT buttons from mode insert and mode update.
8. Click Save this Entity.
Submit button for complete flow at entity "Doc Order Request - Admin".
1. From App Designer, search entity "Doc Order Request - Admin" and click edit it.
2. From Button, drag Process Button to entity button's area. The button name "SUBMIT_VALUE" will appear then click icon pencil to edit it.
3. At tab Process.
Select Process Type to "Process".
Select Project to "DOC Order Request".
Select Process to "DOC Order Request".
Select Process Action to "Complete".
Move cursor to icon "Load from AD" and click. The system will populate list of business object to mapping with screen.
Click icon minus in front of "Order Request Item" to hide attribute list.
Move cursor to "Request Id" under "Order Request" drag it and move to link with "RequestId" under "DOCOrderRequestBO".
Move cursor to "Requester" under "Order Request" drag it and move to link with "Requester" under "DOCOrderRequestBO".
Move cursor to "Decision" under "Order Request" drag it and move to link with "Decision" under "DOCOrderRequestBO".
4. At tab Pre Action.
Click first radio and select method saveEntity().
5. At tab Other Settings.
Change buttonName to "SUBMIT".
Select Page Action to "ENTITY_UPDATE"
6. Click OK.
7. Click Save this Entity.
Submit button for complete flow at entity "Doc Order Request - Back Office".
1. From App Designer, search entity "Doc Order Request - Back Office" and click edit it.
2. From Button, drag Process Button to entity button's area. The button name "SUBMIT_VALUE" will appear then click icon pencil to edit it.
3. At tab Process.
Select Process Type to "Process".
Select Project to "DOC Order Request".
Select Process to "DOC Order Request".
Select Process Action to "Complete".
Move cursor to icon "Load from AD" and click. The system will populate list of business object to mapping with screen.
Click icon minus in front of "Order Request Item" to hide attribute list.
Move cursor to "Request Id" under "Order Request" drag it and move to link with "RequestId" under "DOCOrderRequestBO".
Move cursor to "Requester" under "Order Request" drag it and move to link with "Requester" under "DOCOrderRequestBO".
Move cursor to "Decision" under "Order Request" drag it and move to link with "Decision" under "DOCOrderRequestBO".
Move cursor to "Total Amt" under "Order Request" drag it and move to link with "TotalAmt" under "DOCOrderRequestBO".
4. At tab Pre Action.
Click first radio and select method saveEntity().
5. At tab Other Settings.
Change buttonName to "SUBMIT".
Select Page Action to "ENTITY_UPDATE"
6. Click OK.
7. Click Save this Entity.
Submit button for complete flow at entity "Doc Order Request - Authorize".
1. From App Designer, search entity "Doc Order Request - Authorize" and click edit it.
2. Do the same steps for [Submit button for complete flow at entity "Doc Order Request - Admin".] from 2 - 7
Submit button for complete flow at entity "Doc Order Request - Admin PO".
1. From App Designer, search entity "Doc Order Request - Admin PO" and click edit it.
2. From Button, drag Process Button to entity button's area. The button name "SUBMIT_VALUE" will appear then click icon pencil to edit it.
3. At tab Process.
Select Process Type to "Process".
Select Project to "DOC Order Request".
Select Process to "DOC Order Request".
Select Process Action to "Complete".
Move cursor to icon "Load from AD" and click. The system will populate list of business object to mapping with screen.
Click icon minus in front of "Order Request Item" to hide attribute list.
Move cursor to "Request Id" under "Order Request" drag it and move to link with "RequestId" under "DOCOrderRequestBO".
Move cursor to "Requester" under "Order Request" drag it and move to link with "Requester" under "DOCOrderRequestBO".
4. At tab Other Settings.
Change buttonName to "SUBMIT".
Select Page Action to "ENTITY_UPDATE"
5. Click OK.
6. Click Save this Entity.
Learn about step to clone entity for role Back Office who will select supplier from supplier lists.
1. From ONEWEB App Designer screen, click Entities > Clone Entity. The dialog of Clone Entity opens.
2. Select existing entity to "Doc Order Request Item - Admin" at Select Existing Entity, put new entity name to "Doc Order Request Item - Back Office" at Name of Clone Entity and click Clone. Wait until message "Entity has been imported successfully" and button name "Open Cloned Entity" show.
3. Click Open Cloned Entity. (The popup dialog of Search Entities shows all entities. Now click on icon pencil to edit.)
4. From module Order Request Item, click icon append row. The system will append new row to the table.
5. From Tools > Field drag Text Box to the first cell of new row (from step 4). The textLabel shows.
Click icon pencil. The dialog of Text box Configuration opens.
Put "readonly" to Source tag.
Select "Currency" at Number Formatter.
Change FIELD_ID to "SUMMARY_PRICE".
Click icon Populate from FIELD_ID. The system will auto generate ShowFieldName to "Summary Price".
Click OK.
6. From module Supplier, edit Supplier Name by click icon pencil.
Switch viewFlag to "Y".
Click OK.
7. From module Supplier, edit In Stock by click icon pencil.
Switch viewFlag to "Y".
Click OK.
8. From module Supplier, edit Unit Price by click icon pencil.
Switch viewFlag to "Y".
Click OK.
9. From module Supplier, edit Remark by click icon pencil.
Switch viewFlag to "Y".
Click OK.
10. From Tools > Field drag Text Box to Module Supplier. The noLabel shows.
Click icon pencil. The dialog of Text Box Configuration opens.
Select "Integer" at Number Formatter.
Change FIELD_ID to "REMAIN_ORDER_UNIT".
Click icon Populate from FIELD_ID. The system will auto generate ShowFieldName to "Remain Order Unit".
Change FieldGroup to "3" and change Seq to "1".
Switch onlyGuiFlag to "Y".
Switch viewFlag to "Y".
Click OK.
11. From Tools > Field drag Text Box to Module Supplier. The textLabel shows.
Click icon pencil. The dialog of Text box Configuration opens.
Select "Integer" at Number Formatter.
Change FIELD_ID to "UNIT_BY_BACK_OFFICE".
Put "Order Unit" to ShowFieldName.
Change FieldGroup to "4" and change Seq to "1".
Switch ShowSearch to "Y".
Put "4" to showSearchSeq.
Click OK.
12. From Tools > Field drag Text Box to Module Supplier. The textLabel shows.
Click icon pencil. The dialog of Text box Configuration opens.
Put "readonly" to Source tag.
Select "Currency" at Number Formatter.
Change FIELD_ID to "TOTAL_PRICE".
Click icon Populate from FIELD_ID. The system will auto generate ShowFieldName to "Total Price".
Change FieldGroup to "4" and change Seq to "2".
Switch ShowSearch to "Y".
Put "5" to showSearchSeq.
Click OK.
13. From Tools > Field drag Textarea to Module Supplier. The textareaLabel shows.
Click icon pencil. The dialog of Text Area Configuration opens.
Change FIELD_ID to "BACK_OFFICE_REMARK".
Click icon Populate from FIELD_ID. The system will auto generate ShowFieldName to "Back Office Remark".
Change FieldGroup to "5" and change Seq to "1".
Click OK.
14. From module button, delete button "ADD" and "DELETE".
15. Click Save this Entity.
The completed entity looks as shown below
Learn about step to clone entity for role Back Office who will select supplier from supplier lists.
1. From ONEWEB App Designer screen, click Entities > Clone Entity. The dialog of Clone Entity opens.
2. Select existing entity to "Doc Order Request - Admin" at Select Existing Entity, put new entity name to "Doc Order Request - Back Office" at Name of Clone Entity and click Clone. Wait until message "Entity has been imported successfully" and button name "Open Cloned Entity" show.
3. Click open the cloned Entity. (The popup dialog of Search Entities shows all entities. Now click on icon pencil to edit.)
4. From module Order Request, move Project Name to the right cell.
5. From Tools > Field drag Text Box to in front of Project Name. The textLabel shows.
Click icon pencil. The dialog of Text box Configuration opens.
Select "Currency" at Number Formatter.
Change FIELD_ID to "TOTAL_AMT".
Put "Total Amount" to ShowFieldName.
Switch viewFlag to "Y".
Click OK.
6. From module Order Request, edit Decision by click icon pencil, change Condition Value to "category_code = 'BACK_OFFICE_DECISION'" and click OK.
7. From Tools > Field drag Text Box to Module Order Item. The textLabel shows.
Click icon pencil. The dialog of Text box Configuration opens.
Select "Currency" at Number Formatter.
Change FIELD_ID to "SUMMARY_PRICE".
Click icon Populate from FIELD_ID. The system will auto generate ShowFieldName to "Summary Price".
Change FieldGroup to "3" and change Seq to "1".
Switch ShowSearch to "Y".
Change showSearchSeq to "4".
Click OK.
8. From module button, delete button "ADD".
9. Click Save this Entity.
The completed entity will look as shown below
Learn about the steps to create an entity for the requester who needs to make an order request.
1. From the App space screen, click Form and then popup dialog will opens.
2. Enter name in field Component Name and click Start Design.
3. From Tools > Tabs drag the 2-Layer Tab to the silver box under the entity name. The dialog of Add Tab data opens. Put "Order Request" to Title and then click Add.
4. From Tools > Module drag 1-1 to the box under the Order Request tab
Click icon pencil. The dialog of Module Configuration opens.
Change Module Name to "Order Request".
Change Table Name to "wf_service_request (T)".
Put "select wf_service_request.request_id, wf_service_request.requester, wf_service_request.project, wf_ms_project.project_name, wf_service_request.phase, wf_service_request.description, to_char(wf_service_request.create_date, 'DD/MM/YYYY HH24:MI:SS') as create_date from wf_service_request join wf_ms_project on wf_service_request.project = wf_ms_project.project_id" to SQL Work Queue.
Click OK.
Click icon Configuration Layout. The dialog opens.
Select 2 Column and then click Accept. The table that has 2 columns will show.
5. From Tools > Field drag Text Box to the first cell of the table. (From step 4.6) The textLabel shows.
Click icon pencil. The dialog of Text box Configuration opens
Put "readonly" to Soruce tag.
Change FIELD_ID to "REQUEST_ID".
Click icon Populate from FIELD_ID. The system will auto generate ShowFieldName to "Request Id".
Switch ShowSearch to "Y".
Change showSearchSeq to "1".
Click OK.
6. From Tools > Field drag Text Box to the second cell of the table. (From step 4.6) The textLabel shows.
Click icon pencil. The dialog of Text box Configuration opens.
Put "readonly" to Soruce tag.
Change FIELD_ID to "REQUESTER".
Click icon Populate from FIELD_ID. The system will auto generate ShowFieldName to "Requester".
Switch ShowSearch to "Y".
Change showSearchSeq to "2".
Click OK.
7. From Order Request Module click icon append row. The system will append new row to the table.
8. From Tools > Field drag Dynamic List to the first cell of new row (From step 7) The dropdownLabel shows.
Click icon pencil. The dialog of Dynamic List Box Configuration opens.
Change Table Name to "wf_ms_project".
Change Column Show to "PROJECT_NAME".
Change Column Value to "PROJECT_ID".
Change FIELD_ID to "PROJECT".
Click icon Populate from FIELD_ID. The system will auto generate ShowFieldName to "Project".
Switch SearchCriteria to "Y".
Change searchFieldGroup and searchCriteriaSeq to "1".
Select "CHECK_NULL" at Validate Code and click icon plus. The new record of Validate Code show.
Click OK.
9. From Tools > Field drag Dynamic List to the second cell of new row (From step 7) The dropdownLabel shows.
Click icon pencil. The dialog of Dynamic List Box Configuration opens.
Change Table Name to "wf_ms_phase".
Change Column Show to "PHASE_NAME".
Change Column Value to "PHASE_ID".
Change FIELD_ID to "PHASE".
Click icon Populate from FIELD_ID. The system will auto generate
Click OK.
10. From Order Request Module click icon append row. The system will append new row to the table.
11. From Tools > Field drag Textarea to the first cell of new row (From step 10) The textareaLabel shows.
Click icon pencil. The dialog of Text Area Configuration opens.
Change FIELD_ID to "DESCRIPTION".
Click icon Populate from FIELD_ID. The system will auto generate ShowFieldName to "Description".
Switch SearchCriteria, ShowSearch and searchLike to "Y".
Change searchFieldGroup to "1", searchCriteriaSeq to "2" and showSearchSeq to "4".
Click OK.
12. From Tools > Field drag NO Object to the second cell of new row. (From step 10) The no Label shows.
Click icon pencil. The dialog of No Object Field Configuration opens.
Change FIELD_ID to "CREATE_DATE".
Click icon Populate from FIELD_ID. The system will auto generate ShowFieldName to "Create Date".
Switch ShowSearch to "Y".
Change showSearchSeq to "5".
Switch onlyGuiFlag to "Y".
Click OK.
13. From Order Request Module click icon append row. The system will append new row to the table.
14. From Tools > Field drag NO Object to the first cell of new row. (From step 13) The noLabel shows.
Click icon pencil. The dialog of No Object Field Configuration opens.
Change FIELD_ID to "PROJECT_NAME".
Click icon Populate from FIELD_ID. The system will auto generate ShowFieldName to "Project Name".
Switch ShowSearch to "Y".
Change showSearchSeq to "2".
Switch onlyGuiFlag to "Y".
Click OK.
15. From Tools > Field drag Hidden to the second cell of new row. (From step 13) The hiddenLabel shows.
Click icon pencil. The dialog of Hidden Field Configuration opens.
Put "03" to Default value.
Change FIELD_ID to "REQUEST_TYPE".
Click icon Populate from FIELD_ID. The system will auto generate ShowFieldName to "Request Type"
Click OK.
16. From Tools > Button drag Entity Button to space under the Module Order Request. The SUBMIT_VALUE show.
Click icon pencil. The dialog of Button Configuration opens.
Change buttonName to "SEARCH".
Change Page Action to "ENTITY_SEARCH".
At Button Action select first radio and change button action to "searchResult()".
Click OK.
17. From Tools > Button drag Entity Button to space under the Module Order Request. The SUBMIT_VALUE show.
Click icon pencil. The dialog of Button Configuration opens.
Change buttonName to "CREATE".
Change Page Action to "ENTITY_SEARCH".
At Button Action select first radio and change button action to "addEntity()".
Click OK.
18. From Tools > Button drag Entity Button to space under the Module Order Request. The SUBMIT_VALUE show.
Click icon pencil. The dialog of Button Configuration opens.
Change buttonName to "SAVE".
Change Page Action to "ENTITY_INSERT".
At Button Action select first radio and change button action to "saveEntity()".
Click OK.
19. From Tools > Button drag Entity Button to space under the Module Order Request. The SUBMIT_VALUE show.
Click icon pencil. The dialog of Button Configuration opens.
Change buttonName to "SAVE".
Change Page Action to "ENTITY_UPDATE".
At Button Action select first radio and change button action to "saveEntity()".
Click OK.
20. From Tools > Button drag Entity Button to space under the Module Order Request. The SUBMIT_VALUE show.
Click icon pencil. The dialog of Button Configuration opens.
Change buttonName to "CANCEL".
Change Page Action to "ENTITY_INSERT".
At Button Action select first radio and change button action to "cancelEntity()".
Click OK.
21. From Tools > Button drag Entity Button to space under the Module Order Request. The SUBMIT_VALUE show.
Click icon pencil. The dialog of Button Configuration opens.
Change buttonName to "CANCEL".
Change Page Action to "ENTITY_UPDATE".
At Button Action select first radio and change button action to "cancelEntity()".
Click OK.
22. From Tools > Tabs drag Normal Tab to the silver box under the table. The dialog of Add Tab data opens. Put "Order Item" to Title, select 1 column and then click Add. The Order Item tab show.
23. From Tools > Module drag 1-Many to the box under the Order Item tab.
Click icon pencil. The dialog of Module Configuration opens.
Change Module Name to "Order Request Item".
Change Table Name to "wf_order_request_item (T)".
Click OK.
24. From Tools > Field drag Hidden to Module Order Item. The hiddenLabel shows.
Click icon pencil. The dialog of Hidden Field Configuration opens.
Change FIELD_ID to "REQUEST_ID".
Click icon Populate from FIELD_ID. The system will auto generate ShowFieldName to "Request Id".
Click OK.
25. From Tools > Field drag Hidden to Module Order Item. The hiddenLabel shows.
Click icon pencil. The dialog of Hidden Field Configuration opens.
Change FIELD_ID to "ORDER_ITEM_ID".
Click icon Populate from FIELD_ID. The system will auto generate ShowFieldName to "Order Item I
Click OK.
26. From Tools > Field drag Dynamic List to Module Order Item. The dropdownLabel shows.
Click icon pencil. The dialog of Dynamic List Box Configuration opens.
Change Table Name to "wf_ms_hardware".
Change Column Show to "HARDWARE_NAME".
Change Column Value to "HARDWARE_ID".
Change FIELD_ID to "HARDWAREID".
Click icon Populate from FIELD_ID. The system will auto generate ShowFieldName to "Hardwareid".
Change FieldGroup to "1" and change Seq to "1".
Switch ShowSearch to "
Change showSearchSeq to "1".
Select "CHECK_NULL" at Validate Code and click icon plus. The new record of Validate Code show.
Click OK.
27. From Tools > Field drag Textarea to Module Order Item. The textareaLabel shows.
Click icon pencil. The dialog of Text Area Configuration opens.
Change FIELD_ID to "SPEC".
Click icon Populate from FIELD_ID. The system will auto generate ShowFieldName to "Spec".
Change FieldGroup to "1" and change Seq to "2".
Select "CHECK_NULL" at Validate Code and click icon plus. The new record of Validate Code show.
Click OK.
28. From Tools > Field drag Text Box to Module Order Item. The textLabel shows. Click icon pencil. The dialog of Text box Configuration opens.
Select "Integer" at Number Formatter.
Change FIELD_ID to "UNIT".
Click icon Populate from FIELD_ID. The system will auto generate ShowFieldName to "Unit".
Change FieldGroup to "2" and change Seq to "1".
Switch ShowSearch to "Y".
Change showSearchSeq to "2".
Select "CHECK_NULL" at Validate Code and click icon plus. The new record of Validate Code show.
Click OK.
29. From Tools > Field drag Textarea to Module Order Item. The textareaLabel shows.
Click icon pencil. The dialog of Text Area Configuration opens.
Change FIELD_ID to "REMARK".
Click icon Populate from FIELD_ID. The system will auto generate ShowFieldName to "Remark".
Change FieldGroup to "2" and change Seq to "2".
Click OK.
30. From Tools > Button drag Module Button to space under the Module Order Request Item. The SUBMIT_VALUE show.
Click icon pencil. The dialog of Button Configuration opens.
Change buttonName to "ADD".
Change Page Action to "SUB_SEARCH".
At Button Action select first radio and change button action to "popupActionFlow('[MODULE_ID]')".
Click OK.
31. From Tools > Button drag Module Button to space under the Module Order Request Item. The SUBMIT_VALUE show.
Click icon pencil. The dialog of Button Configuration opens.
Change buttonName to "DELETE".
Change Page Action to "SUB_SEARCH".
At Button Action select first radio and change button action to "[MODULE_ID]Delete()".
Click OK.
32. From Tools > Button drag Module Button to space under the Module Order Request Item. The SUBMIT_VALUE show.
Click icon pencil. The dialog of Button Configuration opens.
Change buttonName to "SAVE".
Change Page Action to "INSERT".
At Button Action select first radio and change button action to "actionFormSubmit('insertMany','Y')".
Click OK.
33. From Tools > Button drag Module Button to space under the Module Order Request Item. The SUBMIT_VALUE show.
Click icon pencil. The dialog of Button Configuration opens.
Change buttonName to "SAVE".
Change Page Action to "UPDATE".
At Button Action select first radio and change button action to "actionFormSubmit('insertMany','Y')".
Click OK.
34. From Tools > Button drag Module Button to space under the Module Order Request Item. The SUBMIT_VALUE show.
Click icon pencil. The dialog of Button Configuration opens.
Change buttonName to "CANCEL". Change Page Action to "INSERT".
At Button Action select first radio and change button action to "$('#many_[MODULE_ID]_dialog').dialog('close');".
Click OK.
35. From Tools > Button drag Module Button to space under the Module Order Request Item. The SUBMIT_VALUE show.
Click icon pencil. The dialog of Button Configuration opens.
Change buttonName to "CANCEL".
Change Page Action to "UPDATE".
At Button Action select first radio and change button action to "$('#many_[MODULE_ID]_dialog').dialog('close');".
Click OK.
36. Configure Order Request module key.
From module Order Request click icon pencil. The dialog of Module Configuration opens.
Put "REQUEST_ID to Modul
Put "OD" to Prefix.
Put "8" to KeyLen.
Put "REQUEST_ID_SEQ" to Sequence.
Click icon plus. The new record of Module Key show.
Click OK.
37. Configure Order Request Item module key.
From module Order Request Item click icon pencil. The dialog of Module Configuration opens.
Put "ORDER_ITEM_ID" to Module Key.
Put "IT" to Prefix.
Put "18" to KeyLen.
Put "ORDER_ITEM_ID_SEQ" to Sequence.
Click icon plus. The new record of Module Key show.
Put "REQUEST_ID" to Module Key.
Put "REQUEST_ID" to Parent Key.
Click icon plus. The new record of Module Key show.
Click OK.
The completed entity looks as shown in below diagram
Learn about step to link parent entity (Order Request Entity for Back Office) with child entity (Order Request Item for Back Office)
1. From ONEWEB App Designer screen, click Utilities > Parent Child Entity and then click icon plus on the popup dialog. Parent Child Entity Configuration opens.
2. Select Parent Entity to "Doc Order Request - Back Office"
3. Select Child Entity to "Doc Order Request Item - Back Office"
4. Select Parent Tab to "Order Item"
5. Select Child Tab to "Supplier List"
6. Select Parent Module to "Order Request Item"
7. Put "REQUEST_ID" to Parent's Fields.
8. Put "REQUEST_ID" to Interface Parameters.
9. Put "REQUEST_ID" to Child's Fields.
10. Put "ADD_CHILD" to Display Value.
11. Click Save. The new record that PARENT ENTITY start with "Doc Order Request - Back Office show and the system will automatic add module button name "ADD_CHILD" to the parent entity (Doc Order Request - Back Office).
12. Go back to edit entity Doc Order Request Item - Back Office.
Edit module button "ADD_CHILD" by click icon pencil.
Change Page Action to -- Please select -- for hide button from this entity.
Click OK and save entity.
Learn about step to clone entity for role Authorize who will make decision in case of total amount more than parameter max cap.
1. From ONEWEB App Designer screen, click Entities > Clone Entity. The dialog of Clone Entity opens.
2. Select existing entity to "Doc Order Request - Back Office" at Select Existing Entity, put new entity name to "Doc Order Request - Authorize" at Name of Clone Entity and click Clone. Wait until message "Entity has been imported successfully" and button name "Open Cloned Entity" show.
3. Click Open Cloned Entity.
4. From module Order Request, edit Decision by click icon pencil, change Condition Value to "category_code = 'AUTHORIZE_DECISION'" and click OK.
5. From module button, delete button "ADD_CHILD" and button "SAVE".
6. Click Save this Entity.
The completed entity looks as shown below
Learn about step to clone entity for role Authorize who will find information to make final decision.
1. From ONEWEB App Designer screen, click Entities > Clone Entity. The dialog of Clone Entity opens.
2. Select existing entity to "Doc Order Request Item - Back Office" at Select Existing Entity, put new entity name to "Doc Order Request Item - Authorize" at Name of Clone Entity and click Clone. Wait until message "Entity has been imported successfully" and button name "Open Cloned Entity" show.
3. Click Open Cloned Entity.
4. From module Supplier, remove Remain Order Unit.
5. From module Supplier, edit Order Unit by click icon pencil.
Switch viewFlag to "Y".
Click OK.
6. From module Supplier, edit Back Office Remark by click icon pencil.
Switch viewFlag to "Y".
Click OK.
7. From module button, delete both of the "SAVE" buttons.
8.From entity button, delete both of the "SAVE" buttons.
9. Click Save this Entity.
The completed entity looks as shown below.
Learn about step to link parent entity (Order Request Entity for Authorize) with child entity (Order Request Item for Authorize)
1. From ONEWEB App Designer screen, click Utilities > Parent Child Entity and then click icon plus on the popup dialog. Parent Child Entity Configuration opens.
2. Select Parent Entity to "Doc Order Request - Authorize"
3. Select Child Entity to "Doc Order Request Item - Authorize"
4. Select Parent Tab to "Order Item"
5. Select Child Tab to "Supplier List"
6. Select Parent Module to "Order Request Item"
7. Put "REQUEST_ID" to Parent's Fields.
8. Put "REQUEST_ID" to Interface Parameters.
9. Put "REQUEST_ID" to Child's Fields.
10. Put "ADD_CHILD" to Display Value.
11. Click Save. The new record that PARENT ENTITY start with "Doc Order Request - Authorize show and the system will automatic add module button name "ADD_CHILD" to the parent entity (Doc Order Request - Authorize).
12. Go back to edit entity Doc Order Request Item - Authorize.
Edit module button "ADD_CHILD" by click icon pencil.
Change Page Action to -- Please select -- for hide button from this entity.
Click OK and save entity.
Learn about step to clone entity for role Admin who will find order information and make purchase order.
1. From ONEWEB App Designer screen, click Entities > Clone Entity. The dialog of Clone Entity opens.
2. Select existing entity to "Doc Order Request - Authorize" at Select Existing Entity, put new entity name to "Doc Order Request - Admin PO" at Name of Clone Entity and click Clone. Wait until message "Entity has been imported successfully" and button name "Open Cloned Entity" show.
3. Click Open Cloned Entity.
4. From module Order Request, delete field Decision and Decision Remark.
5. From entity button, delete both of the "SAVE" buttons.
6. Click Save this Entity.
The completed entity looks as shown below
Learn about step to get login user and add to search criteria. 1. From ONEWEB workspace, create java file name "com.manual.doc.order.java.OrderRequestRequesterSearchMode" in MasterWeb with coding below.
2. From ONEWEB workspace, export EafMasterEar.ear and deploy update to server. The new class name "com.manual.doc.order.java.OrderRequestRequesterSearchMode" will deploy to server.
3. Go to App Designer and open entity name "Doc Order Request - Requester" to edit.
4. From Tools > Action drag Entity Action to the box under entity name. The action name "SEARCH" shows then click icon pencil to edit it. The dialog of Action Field Configuration opens. Put "com.manual.doc.order.java.OrderRequestRequesterSearchMode" to Class Action. Click OK.
5. Click Save this Entity.
6. Test by log in to FrontWeb. Click menu SETTING > Refresh Cache to update new configuration at App Designer to server. Click menu DOC Order Request and click SEARCH. Result will display only record that create by Requester who login.
When creating an app, we need much more complex features than basic CRUD operations. We need additional data processing, data validation and data conversion capabilities as well. We will learn about how we can do these on App Designer using customization.
Learn about step to create menu for requester who need to make order request.
From ONEWEB App Designer screen, click Utilities > Menu Configuration. The Menu Configuration screen opens.
Move cursor to icon plus under Menu Configuration title and click. The dialog of Menu Properties opens.
Put "DOC Order Request" at Description.
Select Mapping to "Doc Order Request - Requester" and "SEARCH".
Click button Generate, system will auto generate Action URL.
Select type to "PAGE".
Click OK.
Click Save Menu.
Next login new menu name "DOC Order Request" will appear.
Learn about step to validate one to many record when submit. 1. From ONEWEB workspace, open java file name "com.manual.doc.order.java.OrderRequestRequesterInsertMode" and override method "validateResult()" with coding below.
2. Replace "MD11784591_session" with module id of module "Order Request Item" in entity "Doc Order Request - Requester" (concatenate module id with "_session") Click edit at module "Order Request Item" and find module id at property name "Module ID"
3. From ONEWEB workspace, export EafMasterEar.ear and deploy update to server. The class name "com.manual.doc.order.java.OrderRequestRequesterInsertMode" will update to server.
4. Test by log in to FrontWeb. Click menu SETTING > Refresh Cache to update new configuration at App Designer to server. Click menu DOC Order Request and click CREATE. Submit without adding oder request item.
Learn about step to calculate remain order unit at back office screen. 1. From ONEWEB workspace, create java file name "com.manual.doc.order.java.OrderRequestItemBackOfficeUpdateMode" in MasterWeb and override method "modifyInsertMany(String moduleID, HashMap hStoreHashMap, String processMode, int row)" with coding below.
2. Replace "MD9443222701_session" with module id of module "Order Item" in entity "Doc Order Request Item - Back Office" (concatenate module id with "_session") Click edit at module "Order Item" and find module id at property name "Module ID"
3. From ONEWEB workspace, export EafMasterEar.ear and deploy update to server. The class name "com.manual.doc.order.java.OrderRequestItemBackOfficeUpdateMode" will update to server.
4. Go to App Designer and open entity name "Doc Order Request Item - Back Office" to edit.
5. From Tools > Action drag Module Action to the box under module Supplier (Tab Supplier List). The action name "SEARCH" shows then click icon pencil to edit it. The dialog of Action Field Configuration opens. Change Process Name to "UPDATE" Put "com.manual.doc.order.java.OrderRequestItemBackOfficeUpdateMode" to Class Action. Click OK.
6. Click Save this Entity.
7. Test by log in to FrontWeb. Login with Back Office user. Go to To Do List and claim job. Click edit Order Item. Click edit Supplier. The system must calculate remain order unit.
Learn about step to get login user and put to field name "Requester" on screen. 1. From ONEWEB workspace, create java file name "com.manual.doc.order.java.OrderRequestRequesterInsertMode" in MasterWeb with coding below.
2. From ONEWEB workspace, export EafMasterEar.ear and deploy update to server. The new class name "com.manual.doc.order.java.OrderRequestRequesterInsertMode" will deploy to server.
3. Go to App Designer and open entity name "Doc Order Request - Requester" to edit.
4. From Tools > Action drag Entity Action to the box under entity name. The action name "SEARCH" shows then click icon pencil to edit it. The dialog of Action Field Configuration opens. Put "com.manual.doc.order.java.OrderRequestRequesterSearchMode" to Class Action. Click OK.
5. Click Save this Entity.
6. Test by log in to FrontWeb. Click menu SETTING > Refresh Cache to update new configuration at App Designer to server. Click menu DOC Order Request and click CREATE. Login user will autometic put to field Requester.
Learn about step to validate Order Unit and auto calculate Total Price after changing Order Unit. Requirement 1. Order Unit must <= In Stock and Order Unit must <= Remain Order Unit. 2. Auto calculate Total Price after changed Order Unit.
Procedure 1. From ONEWEB workspace, create javascript file name "/MasterWeb/WebContent/manual/js/doc/order/order_request_item_back_office_update_mode.js" in MasterWeb and override method "modifyInsertMany(String moduleID, HashMap hStoreHashMap, String processMode, int row)" with coding below.
2. From ONEWEB workspace, export EafMasterEar.ear and deploy update to server. The javascript file name "/MasterWeb/WebContent/manual/js/doc/order/order_request_item_back_office_update_mode.js" will update to server.
3. Go to App Designer and open entity name "Doc Order Request Item - Back Office" to edit.
4. From Tools > Action drag Entity Action to the box under entity name. The action name "SEARCH" shows then click icon pencil to edit it. The dialog of Action Field Configuration opens. Change Process Name to "UPDATE". Put "/MasterWeb/manual/js/doc/order/order_request_item_back_office_update_mode.js" to Script File. Click OK.
5. Click Save this Entity.
6. Test by log in to FrontWeb. Login with Back Office user. Go to To Do List and claim job. Click edit Order Item. Click edit Supplier. The system must calculate remain order unit.
Learn about step to summary data by using Ajax.
Requirement
System must calculate Total Price of all Supplier records to Summary Price of Oder Request Item.
Procedure
1. From ONEWEB workspace, create java file name "com.manual.doc.order.ajax.CalculateOrderRequestItemSummaryPrice" in MasterWeb and override method "processManual()" with coding below.
1.1. Go to App Designer and open entity "Doc Order Request Item - Back Office" then click edit at module "Supplier" and find module id at property name "Module ID" 1.2. Replace "MD8321225761_session" with module id from step 1.1 (concate module id with "_session")
2. From ONEWEB workspace, open java file name "/MasterWeb/WebContent/manual/js/doc/order/order_request_item_back_office_update_mode.js" and add new function with coding below.
2.1. Replace "MD8321225761" at function name with module id from step 1.1 2.2. Go to App Designer and open entity "Doc Order Request Item - Back Office" then click edit at module "Order Item" and find module id at property name "Module ID" 2.3. Replace "MD9443222701" with module id from step 2.2
3. From ONEWEB workspace, export EafMasterEar.ear and deploy update to server. The class name "com.manual.doc.order.ajax.CalculateOrderRequestItemSummaryPrice" and java script file name "/MasterWeb/WebContent/manual/js/doc/order/order_request_item_back_office_update_mode.js" will update to server.
4. Test by log in to FrontWeb. 4.1. Login with Back Office user. 4.2. Go to To Do List and claim job. 4.3. Click edit Order Item. 4.4. Click edit Supplier and save. 4.5. The system must calculate summary to Summary Price.
Learn about step to customize validate data with DAO.
Requirement
For all order items, summary of all "Order Unit" at module supplier list must equal to "Unit" of order item.
Procedure
1. From ONEWEB workspace, create java file name "com.manual.service.ManualJDBCServiceLocator" in MasterWeb with coding below.
2. From ONEWEB workspace, create java file name "com.manual.doc.order.dao.ManualDocObjectDAO" in MasterWeb with coding below
3. From ONEWEB workspace, create java file name "com.manual.doc.order.dao.ManualDocOrderDAO" at MasterWeb with coding below.
4. From ONEWEB workspace, create java file name "com.manual.doc.order.dao.ManualDocOrderDAOImpl" at MasterWeb with coding below.
5. From ONEWEB workspace, create java file name "com.manual.service.ManualDAOFactory" at MasterWeb with coding below.
6. From ONEWEB workspace, create java file name "com.manual.doc.order.java.OrderRequestBackOfficeUpdateMode" at MasterWeb with coding below.
7. From ONEWEB workspace, export EafMasterEar.ear and deploy update to server. The class name from step 1-6 will update to server.
8. Test by logging in to FrontWeb. 8.1. Login with Back Office user. 8.2. Go to To Do List and claim job. 8.3. Click save or submit. 8.4. If found at least one record of order item that Unit not equal to summary of order unit, the system must show error message "Please verify un-assign order unit."
Learn about how to use Process Designer to create the Order process or workflow
Learn about step to customize validate data with DAO.
Requirement
For all order items, summary of all "In Stock" at module supplier list must not less than "Unit" of order item.
Procedure
1. From ONEWEB workspace, open java file name "com.manual.doc.order.dao.ManualDocOrderDAO" at MasterWeb and add new method with coding below.
public int countInCompleteInStock(String requestID) throws Exception;
2. From ONEWEB workspace, open java file name "com.manual.doc.order.dao.ManualDocOrderDAOImpl" at MasterWeb and add new method with coding below.
3. From OneWeb workspace, create java file name "com.manual.doc.order.java.OrderRequestAdminUpdateMode" at MasterWeb with coding below.
4. From ONEWEB workspace, export EafMasterEar.ear and deploy update to server. The class name from step 1-3 will update to server.
5. Test by log in to FrontWeb. 5.1. Login with Admin user. 5.2. Go to To Do List and claim job. 5.3. Click save or submit. 5.4. If found at least one record of order item that Unit more than summary of In Stock, the system must show error message "Please verify supplier stock."
Learn about how to summary data from all one to many records after save child entity.
Requirement
System must calculate total amount of all Supplier records to Summary Price of Oder Request Item.
Procedure
1. From ONEWEB workspace, open java file name "com.manual.doc.order.java.OrderRequestItemBackOfficeUpdateMode" and override method "modifyResult()" with coding below.
1.1. Go to App Designer and open entity "Doc Order Request - Back Office" then click edit at module "Order Request Item" and find module id at property name "Module ID". 1.2. Replace "MD1290242832_session" with module id from step 1.1 (concatenate module id with "_session"). 1.3. Replace "MD1290242832" with module id from step 1.1. 1.4. Go to App Designer and open entity "Doc Order Request - Back Office" then click edit at module "Order Request" and find module id at property name "Module ID". 1.5. Replace "MD7333074691" with module id from step 1.4. 1.6. Go to App Designer and open entity "Doc Order Request Item- Back Office" then click edit at module "Order Item" and find module id at property name "Module ID". 1.7. Replace "MD9443222701" with module id from step 1.6
2. Go to App Designer and open entity "Doc Order Request - Back Office" then click edit at entity action "UPDATE". 2.1. On Action Field Configuration put "com.manual.doc.order.java.OrderRequestItemBackOfficeUpdateMode" to Class Action. 2.2. Click OK. 2.3. Click Save this Entity.
3. From ONEWEB workspace, export EafMasterEar.ear and deploy update to server. The class name "com.manual.doc.order.java.OrderRequestItemBackOfficeUpdateMode" will update to server.
4. Test by log in to FrontWeb. 4.1. Login with Back Office user. 4.2. Go to To Do List and claim job. 4.3. Click edit Order Item. 4.4. Click edit Supplier and save. 4.5. Click save at child entity. 4.6. System must calculate Summary Price to Total Amt.
Learn about step to create Process Designer project for Order Management Application. From ONEWEB Process Designer screen, click Create Project > Create Project Wizard. The Create Project Wizard screen opens.
First step. (Project Name) 1.1 Put "DOC Order Request" at Project Name. 1.2 Click Next
Second step. (Define Business Object) 2.1 Move cursor to "Process Parameter" and click. 4 icons show then click icon Add parameter. The popup dialog of Parameter Form opens. 2.2 Put "DOCOrderRequestBO" to Name Parameter. 2.3 Click Submit. 2.4 Move cursor to "DOCOrderRequestBO" and click. 4 icons show then click icon Add parameter. The popup dialog of Parameter Form opens. 2.5 Put "RequestId" to Name Parameter. 2.6 Click Submit. 2.7 Move cursor to "DOCOrderRequestBO" and click. 4 icons show then click icon Add parameter. The popup dialog of Parameter Form opens. 2.8 Put "Requester" to Name Parameter. 2.9 Click Submit. 2.10 Move cursor to "DOCOrderRequestBO" and click. 4 icons show then click icon Add parameter. The popup dialog of Parameter Form opens. 2.11 Put "TotalAmt" to Name Parameter. 2.12 Change Parameter type to "Decimal" 2.13 Click Submit. 2.14 Move cursor to "DOCOrderRequestBO" and click. 4 icons show then click icon Add parameter. The popup dialog of Parameter Form opens. 2.15 Put "Decision" to Name Parameter. 2.16 Click Submit. Move cursor to "DOCOrderRequestBO" and click. 4 icons show then click icon Add parameter. 2.17 The popup dialog of Parameter Form opens. 2.18 Put "Email" to Name Parameter. 2.19 Click Submit. 2.20 Move cursor to "DOCOrderRequestBO" and click. 4 icons show then click icon Clone Business Object. The same parameters will copy to the right side. 2.21 Click Next.
Third step. (Create Work Party) 3.1 Put "ADMIN WP" to Work Party Name. 3.2 Click Add button. 3.3 Put "BACK OFFICE WP" to Work Party Name of the new record. 3.4 Click Add button. 3.5 Put "AUTHORIZE WP" to Work Party Name of the new record. 3.6 Click Next.
Fourth step. (Create User) 4.1 Put user to Member Id. 4.2 Put user name to Member Name. 4.3 Select Work Party Name. 4.4 Click Add button. 4.5 We can lookup existing user by click button Lookup existing member. 4.6 Follow step 4.1 to 4.4 for all user (All work party must have at least 1 user). 4.7 Click Next.
Last step. (Create Process) 5.1 Put "DOC Order Request" to Process Name. 5.2 Click radio Private. 5.3 Put "Add supplier" to What? 5.4 Put "ADMIN WP" to Who? 5.5 Click Finish.
Project DOC Order Request with process name DOC Order Request created then click Save button.
From Event, drag Start to lane ADMIN WP (in front of activity "Add supplier")
Move cursor to activity "Start" until cursor pointer change to cursor hand (middle right) 8.1. Hold click and move cursor to activity "Add supplier". Link line will appear.
Double click at activity "Add supplier". The property panel will appear. 9.1 At tab "BusinessObject" 9.1.2 Parameter name will default as "DOCOrderRequestBO". 9.1.2 Selected both of Input and Output checkbox. 9.1.3 Click button "Open Mapping Parameter". The screen will redirect to Mapping Parameter screen. 9.1.4 Click line between Input box and Mapping box. The mapping panel will appear. 9.1.5 Move cursor to "DOCOrderRequestBO" at the left side and click. The icon Add to Mapping box will appear then click it. 9.1.6 Move cursor to "DOCOrderRequestBO" at the right side and click. The icon Add to Mapping box will appear then click it. The Confirm Mapping dialog will appear then click Yes. The link line will appear from left side to right side. 9.1.7 Click Save. 9.1.8 Click line between Mapping box and Output box. The mapping panel will appear. 9.1.9 Move cursor to "DOCOrderRequestBO" at the left side and click. The icon Add to Mapping box will appear then click it. 9.1.10 Move cursor to "DOCOrderRequestBO" at the right side and click. The icon Add to Mapping box will appear then click it. The Confirm Mapping dialog will appear then click Yes. The link line will appear from left side to right side. 9.1.11 Click Save. 9.1.12 Click Close. 9.2. Double click at activity "Add supplier" again. 9.3. At tab "Assignment Policy" 9.3.1 Click Setting and change drop down to "Round Robin". 9.3.2 Click Work party name and change Work party name to "ADMIN WP". 9.4. At tab "Load Entity" 9.4.1 Change Entity to "Doc Order Request - Admin". 9.4.2 Change Key to "REQUEST_ID". 9.4.3 Change Value to "${DOCOrderRequestBO.RequestId}" 9.4.4 Click Save Panel.
From Gateway, drag Exclusive to under the activity "Add supplier" 10.1 Double click at Exclusive. The property will appear then change Name to "Admin Decision". 10.2 Click Save Panel. Link line from activity "Add supplier" to gateway"Admin Decision". 10.3 Click button Save.
Prepare Jar file for send email. 11.1 Create java project name "SendEmail". 11.2 Create class "com.email.SendEmail". 11.3 Put below coding to class SendEmail.
11.4 Export project to SendEmail.jar
12. From Activity, drag Database to begin the gateway "Admin Decision". The new database activity name "Database" will appear then double click it. 12.1 At tab General, change Name to "Find Email". 12.2 At tab Business Object, follow by step 9.1 12.3 At tab Database Parameter. 12.3.1 Select JNDI at Connection Type. 12.3.2 Put "jdbc/application" to JNDI Name. 12.3.3 Select "Select" at Command Type. 12.3.4 Put "select email from wf_ms_employee where employee_id = ?" to Command. 12.3.5 Click button Open Mapping Parameter. The system will redirect to Mapping Parameter. 12.3.6 Click line between Input box and Mapping box. The mapping panel will appear. 12.3.7 Move cursor to "DatabaseDummyObject" and click. 2 icons will appear then click at icon Add parameter. The popup dialog of Parameter Form opens. 12.3.8 Put "employee_id" to Name Parameter. 12.3.9 Click Submit. The new parameter name "employee_id" will appear. 12.3.10 Move cursor to "Requester" at the left side and click. The icon Add to Mapping box will appear then click it. 12.3.11 Move cursor to "employee_id" at the right side and click. 3 icons will appear then click at icon Add to Mapping box. The Confirm Mapping dialog will appear then click Yes. The link line will appear. 12.3.12 Click Save. 12.3.13 Click line between Mapping box and Output box. The mapping panel will appear. 12.3.14 Move cursor to "DatabaseDummyObject" and click. 2 icons will appear then click at icon Add parameter. The popup dialog of Parameter Form opens. 12.3.15 Put "email" to Name Parameter. 12.3.16 Click Submit. The new parameter name "employee_id" will appear. 12.3.17 Move cursor to "email" at the left side and click. 3 icons will appear then click at icon Add to Mapping box. 12.3.18 Move cursor to "Email" at the right side and click. The icon Add to Mapping box will appear then click it. The Confirm Mapping dialog will appear then click Yes. The link line will appear. 12.3.19 Click Save. 12.3.20 Click Close. The screen will redirect back to the diagram 12.4 Link line from gateway "Admin Decision" to activity "Find Email" and duble click at that line. Gateway parameter will appear. 12.4.1 Put "Reject" to Label. 12.4.2 Click at button Condition. The dialog of Formular Editor will open. 12.4.3 Drag "DOCOrderRequestBO.Decision" to Formular Panel. 12.4.4 Drag "==" to behind "DOCOrderRequestBO.Decision". 12.4.5 Drag "N" to behind "==" and change value to '"02"'. 12.4.6 Click Save. The system will auto generate Condition value. 12.4.7 Click Save Panel.
13. From Activity, drag Java to upper the activity "Find Email". The new java activity name "Java" will appear then double click it. 13.1. At tab General, change Name to "Send Email". 13.2 At tab Business Object, follow by step 9.1. 13.3 At Java Parameter. 13.3.1 Click button Choose Jar then select jar file from stem 12. 13.3.2 Click button Get Class Name. The system will auto populate data from jar file. 13.3.3 Check that Class name is "com.email.SendEmail" and Method name is "public void sendEmail(java.lang.String,java.lang.String)" 13.3.4 Click button Open Mapping Parameter. The system will redirect to Mapping Parameter. 13.3.5 Click line between Input box and Mapping box. The mapping panel will appear. 13.3.6 Move cursor to "RequestId" at the left side and click. The icon Add to Mapping box will appear then click it. 13.3.7 Move cursor to "requestId" at the right side and click. The icon Add to Mapping box will appear then click it. The Confirm Mapping dialog will appear then click Yes. The link line will appear. 13.3.8 Move cursor to "Email" at the left side and click. The icon Add to Mapping box will appear then click it. 13.3.9 Move cursor to "emailTo" at the right side and click. The icon Add to Mapping box will appear then click it. The Confirm Mapping dialog will appear then click Yes. The link line will appear. 13.3.10 Click Save. 13.3.11 Click Close. The screen will redirect back to the diagram 13.4 Link line from activity "Find Email" to activity "Send Email"
14. From Event, drag End to behind activity "Send Email" 14.1 Link line from activity "Send Email" to event "End".
15. From Pool/Lane, drag Horizontal to the diagram. The new lane name "Lane" will appear. 15.1 Double click at new lane. The Lane property will appear then change Lane Name to "BACK OFFICE WP" 15.2 Click Save Panel.
16. From Activity, drag Human to new lane under Gateway "Admin Decision". The activity name "Human" will appear then double click it. The property panel will appear. 16.1 At tab "General" 16.1.1 Change Name to "Back Office Process" 16.2 At tab "Business Object" 16.2.1 Parameter name will default as "DOCOrderRequestBO". 16.2.2 Selected both of Input and Output checkbox. 16.2.3 Click button "Open Mapping Parameter". The screen will redirect to Mapping Parameter screen. 16.2.4 Click line between Input box and Mapping box. The mapping panel will appear. 16.2.5 Move cursor to "DOCOrderRequestBO" at the left side and click. The icon Add to Mapping box will appear then click it. 16.2.6 Move cursor to "DOCOrderRequestBO" at the right side and click. The icon Add to Mapping box will appear then click it. The Confirm Mapping dialog will appear then click Yes. The link line will appear from left side to right side. 16.2.7 Click Save. 16.2.8 Click line between Mapping box and Output box. The mapping panel will appear. 16.2.9 Move cursor to "DOCOrderRequestBO" at the left side and click. The icon Add to Mapping box will appear then click it. 16.2.10 Move cursor to "DOCOrderRequestBO" at the right side and click. The icon Add to Mapping box will appear then click it. The Confirm Mapping dialog will appear then click Yes. The link line will appear from left side to right side. 16.2.11 Click Save. 16.2.12 Click Close. 16.3. At tab "Assignment Policy" 16.3.1 Click Setting and change drop down to "Pull". 16.3.2 Click Work party name and change Work party name to "BACK OFFICE WP". 16.4 At tab "Load Entity" 16.4.1 Change Entity to "Doc Order Request - Back Office". 16.4.2 Change Key to "REQUEST_ID". 16.4.3 Change Value to "${DOCOrderRequestBO.RequestId}" 16.5 Click Save Panel. 16.6 Link line from Gateway "Admin Decision" to activity "Back Office Process" and double click at that line. Gateway parameter will appear. 16.6.1 Put "Approve" to Label. 16.6.2 Click at button Condition. The dialog of Formular Editor will open. 16.6.3 Drag "DOCOrderRequestBO.Decision" to Formular Panel. 16.6.4 Drag "==" to behind "DOCOrderRequestBO.Decision". 16.6.5 Drag "N" to behind "==" and change value to ""01"" 16.6.6 Click Save. The system will auto generate Condition value. 16.6.7 Click Save Panel.
17. From Gateway, drag Exclusive to under the activity "Back Office Process" 17.1 Double click at Exclusive. The property will appear then change Name to "Back Office Decision". 17.2 Click Save Panel. 17.3 Link line from activity "Back Office Process" to gateway "Back Office Decision" 17.4 Click button Save. 17.5 Link line from gateway "Back Office Decision" to activity "Find Email" and double click at that line. Gateway parameter will appear. 17.5.1 Put "Reject" to Label. 17.5.2 Click at button Condition. The dialog of Formular Editor will open. 17.5.3 Drag "DOCOrderRequestBO.Decision" to Formular Panel. 17.5.4 Drag "==" to behind "DOCOrderRequestBO.Decision". 17.5.5 Drag "N" to behing "==" and change value to ""02"" 17.5.6 Click Save. The system will auto generate Condition value. 17.5.7 Click Save Panel.
18. From Gateway, drag Exclusive to under the Gateway "Back Office Decision" 18.1 Double click at Exclusive. The property will appear then change Name to "Validate Limit". 18.2 Click Save Panel. 18.3 Link line from gateway "Back Office Decision" to gateway "Validate Limit" and double click at that line. Gateway parameter will appear. 18.3.1 Put "Approve" to Label. 18.3.2 Click at button Condition. The dialog of Formular Editor will open. 18.3.3 Drag "DOCOrderRequestBO.Decision" to Formular Panel. 18.3.4 Drag "==" to behind "DOCOrderRequestBO.Decision". 18.3.5 Drag "N" to behind "==" and change value to ""01"" 18.3.6 Click Save. The system will auto generate Condition value. 18.3.7 Click Save Panel. 18.4 Click button Save.
19. From Activity, drag Human to lane "ADMIN WP" behind activity "Find Email". The activity name "Human" will appear then double click it. The property panel will appear. 19.1 At tab "General" 19.1.1 Change Name to "Purchase Order" 19.2. At tab "Business Object" 19.2.1 Parameter name will default as "DOCOrderRequestBO". 19.2.2 Selected both of Input and Output checkbox. 19.2.3 Click button "Open Mapping Parameter". The screen will redirect to Mapping Parameter screen. 19.2.4 Click line between Input box and Mapping box. The mapping panel will appear. 19.2.5 Move cursor to "DOCOrderRequestBO" at the left side and click. The icon Add to Mapping box will appear then click it. 19.2.6 Move cursor to "DOCOrderRequestBO" at the right side and click. The icon Add to Mapping box will appear then click it. The Confirm Mapping dialog will appear then click Yes. The link line will appear from left side to right side. 19.2.7 Click Save. 19.2.8 Click line between Mapping box and Output box. The mapping panel will appear. 19.2.9 Move cursor to "DOCOrderRequestBO" at the left side and click. The icon Add to Mapping box will appear then click it. 19.2.10 Move cursor to "DOCOrderRequestBO" at the right side and click. The icon Add to Mapping box will appear then click it. The Confirm Mapping dialog will appear then click Yes. The link line will appear from left side to right side. 19.2.11 Click Save. 19.2.12 Click Close. 19.3 At tab "Assignment Policy" Click Setting and change drop down to "Pull". Click Work party name and change Work party name to "ADMIN WP". 19.4 At tab "Load Entity" 19.3.1 Change Entity to "Doc Order Request - Admin PO". 19.3.2 Change Key to "REQUEST_ID". 19.3.3 Change Value to "${DOCOrderRequestBO.RequestId}" 19.5 Click Save Panel. 19.6 Link line from Gateway "Validate Limit" to activity "Purchase Order" and duble click at that line. Gateway parameter will appear. 19.6.1 Put "Normal Approve" to Label. 19.6.2 Click at button Condition. The dialog of Formular Editor will open. 19.6.3 Drag "DOCOrderRequestBO.TotalAmt" to Formular Panel. 19.6.4 Drag "<=" to behind "DOCOrderRequestBO.TotalAmt". 19.6.5 Drag "N" to behind "<=" and change value to "40000" 19.6.6 Click Save. The system will auto generate Condition value. 19.6.7 Click Save Panel. 19.7 Link line from activity "Purchase Order" to activity "Find Email"
20. From Pool/Lane, drag Horizontal to the diagram. The new lane name "Lane" will appear. 20.1 Double click at new lane. The Lane property will appear then change Lane Name to "AUTHORIZE WP". 20.2 Click Save Panel.
21. From Activity, drag Human to new lane. The activity name "Human" will appear then double click it. The property panel will appear. 21.1 At tab "General" 21.1.1 Change Name to "Authorize Process" 21.2 At tab "BusinessObject" 21.2.1 Parameter name will default as "DOCOrderRequestBO". 21.2.2 Selected both of Input and Output checkbox. 21.2.3 Click button "Open Mapping Parameter". The screen will redirect to Mapping Parameter screen. 21.2.4 Click line between Input box and Mapping box. The mapping panel will appear. 21.2.5 Move cursor to "DOCOrderRequestBO" at the left side and click. The icon Add to Mapping box will appear then click it. 21.2.6 Move cursor to "DOCOrderRequestBO" at the right side and click. The icon Add to Mapping box will appear then click it. The Confirm Mapping dialog will appear then click Yes. The link line will appear from left side to right side. 21.2.7 Click Save. 21.2.8 Click line between Mapping box and Output box. The mapping panel will appear. 21.2.9 Move cursor to "DOCOrderRequestBO" at the left side and click. The icon Add to Mapping box will appear then click it. 21.2.10 Move cursor to "DOCOrderRequestBO" at the right side and click. The icon Add to Mapping box will appear then click it. The Confirm Mapping dialog will appear then click Yes. The link line will appear from left side to right side. 21.2.11 Click Save. 21.2.12 Click Close. 21.3 At tab "Assignment Policy" 21.3.1 Click Setting and change drop down to "Load Balance". 21.3.2 Click Workparty name and change Workparty name to "AUTHORIZE WP". 21.4 At tab "Load Entity" 21.4.1 Change Entity to "Doc Order Request - Authorize". 21.4.2 Change Key to "REQUEST_ID". 21.4.3 Change Value to "${DOCOrderRequestBO.RequestId}" 21.5 Click Save Panel. 21.6 Link line from Gateway "Validate Limit" to activity "Authorize Process" and duble click at that line. Gateway parameter will appear. 21.6.1 Put "Exception Approve" to Label. 21.6.2 Click at button Condition. The dialog of Formular Editor will open. 21.6.3 Drag "DOCOrderRequestBO.TotalAmt" to Formular Panel. 21.6.4 Drag ">" to behind "DOCOrderRequestBO.TotalAmt". 21.6.5 Drag "N" to behind ">" and change value to "40000". 21.6.6 Click Save. The system will auto generate Condition value. 21.6.7 Click Save Panel.
22. From Gateway, drag Exclusive to behind the activity "Authorize Process" 22.1 Double click at Exclusive. The property will appear then change Name to "Authorize Decision". 22.2 Click Save Panel. 22.3 Link line from activity "Authorize Process" to gateway"Authorize Decision" 22.4 Click button Save. 22.5 Link line from gateway"Authorize Decision" to activity "Find Email" and double click at that line. Gateway parameter will appear. 22.5.1 Put "Reject" to Label. 22.5.2 Click at button Condition. The dialog of Formular Editor will open. 22.5.3 Drag "DOCOrderRequestBO.Decision" to Formular Panel. 22.5.4 Drag "==" to behind "DOCOrderRequestBO.Decision". 22.5.5 Drag "N" to behing "==" and change value to ""02"". 22.5.6 Click Save. The system will auto generate Condition value. 22.5.7 Click Save Panel. 22.6 Link line from gateway"Authorize Decision" to activity "Purchase Order" and double click at that line. Gateway parameter will appear. 22.6.1 Put "Approve" to Label. 22.6.2 Click at button Condition. The dialog of Formular Editor will open. 22.6.3 Drag "DOCOrderRequestBO.Decision" to Formular Panel. 22.6.4 Drag "==" to behind "DOCOrderRequestBO.Decision". 22.6.5 Drag "N" to behing "==" and change value to ""01"". 22.6.6 Click Save. The system will auto generate Condition value. 22.6.7 Click Save Panel.
23. Click button Save.
24. Click Choose Deploy > Only Validate, The system will validate basic configuration. 24.1. The system will show dialog with Save Status "Validation Success". 24.2 If miss some step, the system will show dialog with Save Status "Validation Error" and show warning orange icon. 24.2.1 Move cursor to warning icon to see error detail and try to fix it.
25. If validation success, click Choose Deploy > Quick Deploy. The system will show dialog with Save Status "Deploy Success" then click close.
The completed process should look as shown below