Difference between revisions of "Workflow Activities Form custom Plugin"

From iDempiere en
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
−
[[File:Desktop.png|right|500x]]
+
[[File:Desktop.png|right|500px]]
 
*'''Maintainer:''' [[User:Nasleem|Nasleem Madrodji]]
 
*'''Maintainer:''' [[User:Nasleem|Nasleem Madrodji]]
  
Line 5: Line 5:
 
*'''License:''' [http://www.gnu.org/licenses/gpl-2.0.html GPLv2]
 
*'''License:''' [http://www.gnu.org/licenses/gpl-2.0.html GPLv2]
 
*'''Sources:''' [ https://github.com/nasleem-mdr/org.nsoft.workflow.activities Github]
 
*'''Sources:''' [ https://github.com/nasleem-mdr/org.nsoft.workflow.activities Github]
−
 
+
[[File:Screenshot.png|right|320px]]
 
__FORCETOC__
 
__FORCETOC__
 
== Description ==
 
== Description ==
Line 12: Line 12:
 
*'''One step approval action,''' Instead of using yes/no option and then clicking the OK button, it is better to directly select the Approve/Reject button..
 
*'''One step approval action,''' Instead of using yes/no option and then clicking the OK button, it is better to directly select the Approve/Reject button..
 
*'''Detail transaction in form,''' so approver don't need zoom out to windows to view detail.
 
*'''Detail transaction in form,''' so approver don't need zoom out to windows to view detail.
 +
*'''History transaction in item list,''' If an item on the list is clicked, a modal popup will appear to show 3 transaction histories of that item.
 
*'''Mobile friendly''' with collapsible List Approval.
 
*'''Mobile friendly''' with collapsible List Approval.
−
[[File:Screenshot.png|left|350px]]
 
  
 
__FORCETOC__
 
__FORCETOC__
Line 22: Line 22:
 
*Change Workflow Activities Form class annotation to org.nsoft.webui.apps.WFActivity
 
*Change Workflow Activities Form class annotation to org.nsoft.webui.apps.WFActivity
  
−
[[File:Screenshot 20260616-210131~2.jpg|left|350px]]
+
[[File:Screenshot 20260616-210131~2.jpg|right|320px]]
 +
 
  
 
== Technical documentation ==
 
== Technical documentation ==
 +
=== Overview ===
 +
'WWFActivity' is customize Workflow Activities from core, please change annotation in Form->[search] "Worflow Activites"->Class=org.nsoft.webui.apps.wf.WFActifity WFTransactionDetailRenderer is a renderer class that displays transaction document details (header + line items) directly inside the iDempiere workflow approval panel (WWFActivity form).
 +
 +
This class is designed using a SysConfig-driven + Generic PO approach, enabling it to display details from any document table without importing specific model classes — configuration in the Application Dictionary (SysConfig) is all that is needed.
  
−
WFTransactionDetailRenderer is rendered class to fetch detail transaction document and then use in WWFActivity.
+
=== Architecture ===
 +
WWFActivity.java
 +
    └── WFTransactionDetailRenderer.java
 +
            ├── MSysConfig          ← Read column configuration per table
 +
            ├── MTable / PO        ← Query document header (generic)
 +
            ├── Query              ← Query document lines
 +
            └── ZK Components      ← Render to UI (Groupbox, Listbox, Label)
 +
Data flow:
 +
MWFActivity (activity selected by user)
 +
    → get AD_Table_ID + Record_ID
 +
    → load header PO via MTable.getPO()
 +
    → read SysConfig for column configuration
 +
    → render header (4 labels)
 +
    → query & render lines (3-column listbox)
  
 +
=== SysConfig Configuration ===
 +
All configuration keys use the prefix: WF_DETAIL_<TableName>_<SUFFIX>
 +
Example for table C_Order: WF_DETAIL_C_Order_LINE_TABLE
  
 +
Required Keys
 +
The following keys must be configured for line items to be displayed:
  
 +
{| class="wikitable"
 +
|+ Caption text
 +
|-
 +
! Key !! Description !! Example Value
 +
|-
 +
| WF_DETAIL_TableName_LINE_TABLE || Name of the line/detail table || C_OrderLine
 +
|-
 +
| WF_DETAIL_TablenName_LINK_COL || Foreign key column in the line table || C_Order_ID
 +
|}
  
 +
Optional Keys (With Defaults)
 +
The following keys are not required — if left empty, the system uses default fallback values (see Default Fallback Values).
 +
see detail on github
 +
=== Configuration Examples ===
 +
C_Order (Minimal — required keys only)
 +
WF_DETAIL_C_Order_LINE_TABLE  = C_OrderLine
 +
WF_DETAIL_C_Order_LINK_COL    = C_Order_ID
  
 +
WF_DETAIL_C_Invoice_LINE_TABLE  = C_InvoiceLine
 +
WF_DETAIL_C_Invoice_LINK_COL    = C_Invoice_ID
 +
WF_DETAIL_C_Invoice_COL2        = QtyEntered,QtyInvoiced
 
[[Category:Available_Plugins]]
 
[[Category:Available_Plugins]]

Latest revision as of 06:33, 17 June 2026

Desktop.png
Screenshot.png

Description

Custom Form Workflow Activities Plugin, customize approval Workflow form with feature:

  • One step approval action, Instead of using yes/no option and then clicking the OK button, it is better to directly select the Approve/Reject button..
  • Detail transaction in form, so approver don't need zoom out to windows to view detail.
  • History transaction in item list, If an item on the list is clicked, a modal popup will appear to show 3 transaction histories of that item.
  • Mobile friendly with collapsible List Approval.


Installation

How to Install this pkugin

  • Clone and Build your own plugin/download jar file on release tag.
  • Install via OSGI Console
  • Change Workflow Activities Form class annotation to org.nsoft.webui.apps.WFActivity
Screenshot 20260616-210131~2.jpg


Technical documentation

Overview

'WWFActivity' is customize Workflow Activities from core, please change annotation in Form->[search] "Worflow Activites"->Class=org.nsoft.webui.apps.wf.WFActifity WFTransactionDetailRenderer is a renderer class that displays transaction document details (header + line items) directly inside the iDempiere workflow approval panel (WWFActivity form).

This class is designed using a SysConfig-driven + Generic PO approach, enabling it to display details from any document table without importing specific model classes — configuration in the Application Dictionary (SysConfig) is all that is needed.

Architecture

WWFActivity.java

   └── WFTransactionDetailRenderer.java
           ├── MSysConfig          ← Read column configuration per table
           ├── MTable / PO         ← Query document header (generic)
           ├── Query               ← Query document lines
           └── ZK Components       ← Render to UI (Groupbox, Listbox, Label)

Data flow: MWFActivity (activity selected by user)

   → get AD_Table_ID + Record_ID
   → load header PO via MTable.getPO()
   → read SysConfig for column configuration
   → render header (4 labels)
   → query & render lines (3-column listbox)

SysConfig Configuration

All configuration keys use the prefix: WF_DETAIL_<TableName>_<SUFFIX> Example for table C_Order: WF_DETAIL_C_Order_LINE_TABLE

Required Keys The following keys must be configured for line items to be displayed:

Caption text
Key Description Example Value
WF_DETAIL_TableName_LINE_TABLE Name of the line/detail table C_OrderLine
WF_DETAIL_TablenName_LINK_COL Foreign key column in the line table C_Order_ID

Optional Keys (With Defaults) The following keys are not required — if left empty, the system uses default fallback values (see Default Fallback Values). see detail on github

Configuration Examples

C_Order (Minimal — required keys only) WF_DETAIL_C_Order_LINE_TABLE = C_OrderLine WF_DETAIL_C_Order_LINK_COL = C_Order_ID

WF_DETAIL_C_Invoice_LINE_TABLE = C_InvoiceLine WF_DETAIL_C_Invoice_LINK_COL = C_Invoice_ID WF_DETAIL_C_Invoice_COL2 = QtyEntered,QtyInvoiced

Cookies help us deliver our services. By using our services, you agree to our use of cookies.