Difference between revisions of "Workflow Activities Form custom Plugin"

From iDempiere en
Line 23: Line 23:
  
 
[[File:Screenshot 20260616-210131~2.jpg|left|350px]]
 
[[File:Screenshot 20260616-210131~2.jpg|left|350px]]
 +
  
 
== 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).
  
−
WFTransactionDetailRenderer is rendered class to fetch detail transaction document and then use in WWFActivity.
+
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:
 +
{| class="wikitable"
 +
|+ Caption text
 +
|-
 +
! Key !! Description !! Example Value
 +
|-
 +
| WF_DETAIL_<Table>_LINE_TABLE || Name of the line/detail table || C_OrderLine
 +
|-
 +
| WF_DETAIL_<Table>_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
  
 
[[Category:Available_Plugins]]
 
[[Category:Available_Plugins]]

Revision as of 18:41, 16 June 2026

Desktop.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.
  • Mobile friendly with collapsible List Approval.
Screenshot.png


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__LINE_TABLE
Name of the line/detail table C_OrderLine
WF_DETAIL__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

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