ad basic tech workshop
TRANSCRIPT
-
8/13/2019 AD Basic Tech Workshop
1/52
ADempiere Technical Basicseco soft co., ltd.
Kitti U.
-
8/13/2019 AD Basic Tech Workshop
2/52
This is a brief guide to starting with ADempiere More detailed steps can be found at,
http://www.adempiere.com/index.php/ADempiere_Installing
http://www.adempiere.com/index.php/Installation
http://www.adempiere.com/index.php/InstallClient
Installation Adempiere 354a WinXP
http://www.adempiere.com/index.php/ADempiere_Installinghttp://www.adempiere.com/index.php/Installationhttp://www.adempiere.com/index.php/InstallClienthttp://www.adempiere.com/index.php/InstallClienthttp://www.adempiere.com/index.php/Installationhttp://www.adempiere.com/index.php/ADempiere_Installing
-
8/13/2019 AD Basic Tech Workshop
3/52
Install main components
There are only 3 main components in AD
1. Install Database – PostgreSQL 8.4 @C:\PostgreSQL
2. Install Java Run Time 6 @ C:\Java For Server use JDK
For Client use JRE
3. Extract Adempiere354a.zip, then copyAdempiere main folder @ C:\Adempiere
Server Application & Libraries (host WebGUI, AutoProcesses, etc.) will be running inside Jboss (alsoincluded here)
Client Application - Adempiere.exe and necessarylibraries will be downloaded to client
Jasper Report Runtime
-
8/13/2019 AD Basic Tech Workshop
4/52
Setup Environment Variable
Setup Environment Variables For system to know where they are so
that each component can talk to eachothers
ADEMPIERE_HOME: C:\Adempiere
JAVA_HOME:
C:\Java\jdk1.6.0_07 (for server)
C:\Java\jre1.6.0_07 (for client machine)
Path: add
%JAVA_HOME%\bin;%JAVA_HOME%\jre\bin\client; C:\PostgreSQL\8.4\bin (for server)
%JAVA_HOME%\bin;%JAVA_HOME%\bin\client
(for client machine)
-
8/13/2019 AD Basic Tech Workshop
5/52
Installation for 354a (Win XP)
Create a blank adempiere database in
Postgresql Open pgAdmin III, login with superuser
Create new login adempiere with passwordadempiere and give Superuser privilege
Disconnect and and reconnect again using thisnew login
Right click on node, Databases and click Newdatabase..
Create new adempiere database andassign owner to adempiere
Restore provided initial databaseAdempiere_pg C:\xx\xx>psql -U adempiere -d adempiere -f
C:\Adempiere\data\Adempiere_pg.dmp
-
8/13/2019 AD Basic Tech Workshop
6/52
Installation for 354a (Win XP)
Configure PostgreSQL to be accessible from clientmachines in the network
Open pg_hba.conf (under C:\PostgreSQL\8.4\data)
With current, the database connection is accepted from a localcomputer only.
To allow any computer within our local LAN, which is pre-installedwith the ADempiere client — and let us assume that our computerserver has a 10.10.101.107 IP address — then we should add thefollowing two lines of configuration
host adempiere adempiere 10.10.101.107/0 md5
host template1 postgres 10.10.101.107/0 md5
-
8/13/2019 AD Basic Tech Workshop
7/52
Install Patches (if any)
Install Patches (only if applicable) Patches will comes in 2 files,
patches_xxxx_yyyymmdd.jar
zkpatches_xxxx_yyyymmdd.jar
Rename to patches.jar and zkpatches.jarand simply copy them to C:\Adempiere\Lib
Install Migration Script (only ifapplicable) Migration script comes in xxx.sql files.
Run it against Adempiere database, using
command, psql -U adempiere -f xxx.sql -o xxx.txt
** Patches and Migration Script is not available for thisrelease, so just skip **
-
8/13/2019 AD Basic Tech Workshop
8/52
Build Application for the first time
Build Adempiere and setup connection configuration Execute Run_Setup.bat (under C:\Adempiere) to build
Adempiere for the first time, and also setup the configurationof the system.
Click Test, if passed
Click Save to build
-
8/13/2019 AD Basic Tech Workshop
9/52
Build Application for the first time
After successful build, the
installation is consideredCOMPLETED!!!
What has happened during buildprocess? The build process has expanded
the C:\Adempiere from 200MB to600+MB The connection data has been
saved intoAdempiereEnv.properties
This data is compiled toAdempiere.properties withpassword encripted
This Adempiere.properties willlater be downloaded by clientmachine and use as connection tothe server
-
8/13/2019 AD Basic Tech Workshop
10/52
Client Installation
Start Application Server & Web Start on the client Execute RUN_Server2.bat (under C:\Adempiere\utils\) Wait until it is started completely From any client machine, go to URL http:///admin
Click on button Web Start to download and install client application
-
8/13/2019 AD Basic Tech Workshop
11/52
Client Installation
1) adempiereDirect.jnlpdownloded from server
2) Executed by javaws.exe tocreate client application
3) Necessary components and
Adempiere.propertiesdownloaded and installedon client machine
4) Application executed onclient, note that the
connection is passed here5) Shortcut created, point to
the server to always snycwith latest version onserver
-
8/13/2019 AD Basic Tech Workshop
12/52
How to access ADempiere?
2 ways accessing the application1) Client Application
Internally, it use Java to execute main classorg.compiere.Adempiere
2) Web Application (application server must be running)
http:///webui
-
8/13/2019 AD Basic Tech Workshop
13/52
Reporting with AD – (4 parts)
ADempiere has many tools to do the report Part 1 – Basic ADempiere Reports
Part 2 – Customized Basic Reports (Report & ProcessWindow)
Part 3 – Financial Reports Part 4 – Customized Reports ( Jasper )
More information
Manual, Chapter 10 Reporting Management
http://www.adempiere.com/index.php/ADempiere/Compiere_JasperReports_Integration_HowTo
http://www.adempiere.com/index.php/ADempiere/Compiere_JasperReports_Integration_HowTohttp://www.adempiere.com/index.php/ADempiere/Compiere_JasperReports_Integration_HowTohttp://www.adempiere.com/index.php/ADempiere/Compiere_JasperReports_Integration_HowTohttp://www.adempiere.com/index.php/ADempiere/Compiere_JasperReports_Integration_HowTo
-
8/13/2019 AD Basic Tech Workshop
14/52
Part 1 – Basic Reports
Simple Reports
Formatted Reports
-
8/13/2019 AD Basic Tech Workshop
15/52
What are available in Tool Bar?
Basic Reports are those icon on the Tool Bar
1) Reports (available on every window, simple columnar reports)
2) Archived Documents/Reports (Open / Save displayed reports)
3) Print Preview (available on selected window, i.e., PO, Invoice,etc…)
4) Print (print what is on Print Preview)
Most of the window will attach to a Table record
As such, each report on each window will also attach to aTable record as well
AD has the default reports for all windows, yet we still be ableto re-configure / re-design within AD
Note:
For me, the name in rednot explain themeaning, it should be,
• Simple Report
• Formatted Report
-
8/13/2019 AD Basic Tech Workshop
16/52
In every window, click on the Report button, i.e., in payment, and it will display something like this,
Very simple, it shows the current payment record!
If want to see more records, use search button, it will listmore records according to criteria
Simple Reports and its simple features
Drill Down
click link to opensimilar report for this
Business Partner
Drill AcrossSelect related item, i.e., all
PO related to thispayment, then click on
the record to see those
Print FormatAD provides default format, we canedit or add more format, click onCustomize Report to do so
-
8/13/2019 AD Basic Tech Workshop
17/52
Create new Print Format for this record
In the previous slide, the default format is ―Payment‖,simply click on Print Format, and click ―New Report‖
System will copy current format and create new formatas ―Payment 2‖
Now, click on Customize Report button to go to edit thenew format
-
8/13/2019 AD Basic Tech Workshop
18/52
Print Format Window
Print Format window is the central place to maintainlayout of all basic reports, both simple report andformatted reports
Note:As expected, print format is linked toa table
For simple reports, Form checkboxwill be unchecked, this force report tobe simple / columnar report
Note:
Other tabs is usedto configure how thereport will layout
-
8/13/2019 AD Basic Tech Workshop
19/52
Formatted Report (Print Preview)
For report with header-detail style, i.e., PO, Shipment,Invoice, etc…
Also configure the layout usingPrint Format Window in
the previous slide (uncheckForm chkbox)
Available Format items, i.e.,field, images, line, rectangle,positions, colors, etc.
Also for header-detail form,link to other print format,i.e., Invoice Header + InvoiceLink Tax
-
8/13/2019 AD Basic Tech Workshop
20/52
How AD window find Print Format?
Different document type, use different approach.
Yet mainly from (1) Document Type (field - print format) or(2) Print Form (field - default print formats)
For example (more on page 343 – 345) Invoice: (Business Partner) then (1) then (2)
PO/SO: (1) then (2)
Shipment: (1) then (2)
*more on page 343-345
Note:
• Print Format allow us tocreate Form report with outleaving from AD
• Yet it is not the most flexibleways to design.
• Jasper report can fill the gap.
-
8/13/2019 AD Basic Tech Workshop
21/52
Part 2 – Customized Basic Reports
Most reports that we seeon menu
-
8/13/2019 AD Basic Tech Workshop
22/52
Why need Customized Basic Reports?
This is just another Basic Reports
Normally each Basic Report attach to a DB Table with aPrint Format to tell how to displayed
Normal Basic Reports is executed via Window (for currentrecord being displayed)
What if we want Basic Reports that do not have window to host?
The answer is, we need to create Customized Basic Reports!
AD already provide many reports as you can see from Menu
These report can refer to, Views (most cases)
Tables
Custom java class (very few cases, when views is not enough)
-
8/13/2019 AD Basic Tech Workshop
23/52
How these reports are registered?
1)Register DB’s Table / Views in Report Views window
2) As normal Basic Reports, create a Print Format forthose Report Views to tell how it will layout
•Both Tables and Views inDB is registered asReport View (RV)•More SQL can be added
-
8/13/2019 AD Basic Tech Workshop
24/52
How these reports are registered?
3) Register new Report in Report & Process window
4) Register this new Report in Menu window
Note: Report & Process window is used for Report, Workflow, Form, Report View and Jasper Report.
We only talk about Report View here.
On Search Screen (from menu
tree, click on report icon)
•Comment will show as instruction•Parameter will show as search
criteria
-
8/13/2019 AD Basic Tech Workshop
25/52
Part 3 – Financial Reports
-
8/13/2019 AD Basic Tech Workshop
26/52
What are financial reports in AD?
Balance Sheets, Profit and Loss Statements, Statements ofAccount, and other types of financial reports
Financial Report are very specific to COA and the client, ADprovide flexible tool to create it.
Reports that come with format, Summary (Line X Column)
AD use following windows to create reports,
Report Line Set Report Column Set
Reporting Hierarchy – grouping, i.e., BP, Vendor, Acct Codes, etc…
Financial Report
-
8/13/2019 AD Basic Tech Workshop
27/52
Creating Financial Report
1) Create Report Line Set and Report Column Set
Type:
Value of interested entity, i.e., Acct, BP, Sales Region, etc…
Calculation, i.e., Add, Substract, %, Range, etc…
Relative Period, i.e., Report compare to last ending period.
2) Create new Financial Report by using (Line X Column)
Note
•
Creating new report will autocreate the Print Format.•For all Financial Report, systemwill use table T_Report as genericreport holder.
Clicking on Create Report
button to show report.
•Will generate data based oncalculation rules provided and putdata into t_report then display.
-
8/13/2019 AD Basic Tech Workshop
28/52
More on Financial Report setup
Report Hierarchy
Not always that we want viewreport for all data
To produce this financialreport for a specific businesspartner and/or product only
1. Use Tree window to create newgrouping
2. Use Tree Maintenance window tomange the grouping
3. Register in Reporting Hierarchywindow
This new hierarchy will beavailable as part ofFinancial Report Searchcriteria!
-
8/13/2019 AD Basic Tech Workshop
29/52
Part 4 – Jasper Report Integration
This part will touch on how to setup and deploy JasperReport in AD
Will not go into deep detail on how to write Jasperreport
More information can be found at http://www.adempiere.com/index.php/ADempiere/Compiere_JasperReports_Integration_
HowTo
http://www.adempiere.com/index.php/HOWTO_Create_Jasper_C_Order_Register
http://www.adempiere.com/index.php/HOWTO_Use_Jasper_On_Financial_Reports
http://www.adempiere.com/images/3/3b/T_ReportTemplate.zip
http://www.adempiere.com/images/9/9c/Z_JR_with_subreports.zip
http://www.adempiere.com/index.php/ADempiere/Compiere_JasperReports_Integration_HowTohttp://www.adempiere.com/index.php/ADempiere/Compiere_JasperReports_Integration_HowTohttp://www.adempiere.com/index.php/HOWTO_Create_Jasper_C_Order_Registerhttp://www.adempiere.com/index.php/HOWTO_Use_Jasper_On_Financial_Reportshttp://www.adempiere.com/images/3/3b/T_ReportTemplate.ziphttp://www.adempiere.com/images/9/9c/Z_JR_with_subreports.ziphttp://www.adempiere.com/images/9/9c/Z_JR_with_subreports.ziphttp://www.adempiere.com/images/9/9c/Z_JR_with_subreports.ziphttp://www.adempiere.com/images/9/9c/Z_JR_with_subreports.ziphttp://www.adempiere.com/images/9/9c/Z_JR_with_subreports.ziphttp://www.adempiere.com/images/9/9c/Z_JR_with_subreports.ziphttp://www.adempiere.com/images/3/3b/T_ReportTemplate.ziphttp://www.adempiere.com/images/3/3b/T_ReportTemplate.ziphttp://www.adempiere.com/images/3/3b/T_ReportTemplate.ziphttp://www.adempiere.com/images/3/3b/T_ReportTemplate.ziphttp://www.adempiere.com/images/3/3b/T_ReportTemplate.ziphttp://www.adempiere.com/index.php/HOWTO_Use_Jasper_On_Financial_Reportshttp://www.adempiere.com/index.php/HOWTO_Create_Jasper_C_Order_Registerhttp://www.adempiere.com/index.php/ADempiere/Compiere_JasperReports_Integration_HowTohttp://www.adempiere.com/index.php/ADempiere/Compiere_JasperReports_Integration_HowTo
-
8/13/2019 AD Basic Tech Workshop
30/52
Jasper Report Setup
Setup Jasper Report is very simple
Install iReport 3.7.2 on development machine
The jasper runtime is already available AD server
Set database connection
-
8/13/2019 AD Basic Tech Workshop
31/52
Creating a report
1. Use iReport, create new report, i.e.,OrderList.jrxml
2. Create report: Query Select FIELD Select PARAM Layout Preview
Note:
•Input Parameter, use exact name as DB’s
column name. AD will use this to mapfrom AD’s search fields, to input parameterin Jasper Report•I.e., this case AD_CLIENT_ID
-
8/13/2019 AD Basic Tech Workshop
32/52
Register new report to AD
1. Copy report file (.jrxml) to C:\Adempiere\Reports
2. Login as System, register new report in Report & Process window
3. Register input parameter, i.e., AD_CLIENT_ID
4. Register new report in Menu
-
8/13/2019 AD Basic Tech Workshop
33/52
Running the report
Click on the newly created report
Select predefined search parameter(s)
View the report
-
8/13/2019 AD Basic Tech Workshop
34/52
Using Jasper for Financial Report
Remember the previous Financial Report (FN)? We can use Jasper as the Layout to make it looks nicer.
As FN report use table t_report as the data holder, the query from Jasper will query against this table
We have a sample template from Carlos Ruiz
-
8/13/2019 AD Basic Tech Workshop
35/52
Register Jasper Template for FN report
Steps to setup Jasper Template for Financial Report Copy T_ReportTemplate.jrxml to C:\Adempiere\Reports
Register this jasper template in Report & Process as normal
Open Financial Report window, select the Jasper Template for anFN report New Create Report (Jasper) button will be available
-
8/13/2019 AD Basic Tech Workshop
36/52
Debugging in AD
This section highlight what necessary steps for beginnersto start debugging AD.
More detailed information can be read at,
http://www.adempiere.com/index.php/Create_your_ADempiere_development_environment
http://www.adempiere.com/index.php/Create_your_ADempiere_development_environmenthttp://www.adempiere.com/index.php/Create_your_ADempiere_development_environmenthttp://www.adempiere.com/index.php/Create_your_ADempiere_development_environmenthttp://www.adempiere.com/index.php/Create_your_ADempiere_development_environment
-
8/13/2019 AD Basic Tech Workshop
37/52
Download source
Install Tortoise SVN, http://tortoisesvn.net/downloads
Check the source that you want to download,https://adempiere.svn.sourceforge.net/svnroot/adempiere/ You will find many sub folders, the important one now are,
Trunk contain the lively updated / may not compliable)
Tags compliable versions of AD, beginner might want to start from here
For example, if choose version 354a, copy this URLhttps://adempiere.svn.sourceforge.net/svnroot/adempiere/tags/adempiere354a/
Create new folder on your local drive, right click and use TortoiseSVN to import this source
http://tortoisesvn.net/downloadshttps://adempiere.svn.sourceforge.net/svnroot/adempiere/https://adempiere.svn.sourceforge.net/svnroot/adempiere/tags/adempiere354a/https://adempiere.svn.sourceforge.net/svnroot/adempiere/tags/adempiere354a/https://adempiere.svn.sourceforge.net/svnroot/adempiere/tags/adempiere354a/https://adempiere.svn.sourceforge.net/svnroot/adempiere/tags/adempiere354a/https://adempiere.svn.sourceforge.net/svnroot/adempiere/tags/adempiere354a/https://adempiere.svn.sourceforge.net/svnroot/adempiere/tags/adempiere354a/https://adempiere.svn.sourceforge.net/svnroot/adempiere/http://tortoisesvn.net/downloads
-
8/13/2019 AD Basic Tech Workshop
38/52
Import source as new project in Eclipse
Open Eclipse and create
a workspace, i.e.,MyWorkspace
Create new JavaProject
Choose to create newproject from existingsource
Leave other option asdefault and click Finish
Now, this workspaceshould have the newproject, test build theproject as you want
-
8/13/2019 AD Basic Tech Workshop
39/52
Setup Debug Configuration
Click on DebugConfigurations
Create new Configurationfor Java Application
Specify the entry point to theprogram, setting Main class:org.compiere.Adempiere
Note:
•To debug service on the server such asAccount Fact, normally we have to create
another Remote Java Application debugging
which involve many steps.
•To make it easy, simply add VM Arguments on
Arguments tab. And we can debug as normal.-Dorg.adempiere.server.embedded=True
-
8/13/2019 AD Basic Tech Workshop
40/52
Setup Break Point and start debugging
Setup break point in the main function of
org.compiere.Adempiere class
Run Debug and system will launch AD. Use AD as normal, andsystem will break at specified Breakpoint
Click on Eclipse’s menu / Run to see options to debug (i.e.,step into, step over and etc)
-
8/13/2019 AD Basic Tech Workshop
41/52
Workflow
This section summarize Workflow mechanism inADempiere.
More information,
http://www.adempiere.com/index.php/ADempiere/Compiere_JasperReports_Integration_HowTo
http://www.adempiere.com/index.php/ADempiere/Compiere_JasperReports_Integration_HowTohttp://www.adempiere.com/index.php/ADempiere/Compiere_JasperReports_Integration_HowTohttp://www.adempiere.com/index.php/ADempiere/Compiere_JasperReports_Integration_HowTohttp://www.adempiere.com/index.php/ADempiere/Compiere_JasperReports_Integration_HowTo
-
8/13/2019 AD Basic Tech Workshop
42/52
Workflow Window
Note of the Tab members, that is used to
configure a complex workflow,•Access, Node, Parameter,
Transition, Condition
And the available workflow type, which
are,•Document Process, Document
Value, General, Manufacturing and
Quality
-
8/13/2019 AD Basic Tech Workshop
43/52
General Workflow
Simplest form of workflow
Just the instruction on how todo things. Nothing more.
Windows:
Use window Workflow to addnodes and transition (definenext node)
Use window Menu to register
-
8/13/2019 AD Basic Tech Workshop
44/52
Document Process Workflow
Most import type of workflow,
Used to process documents, i.e., invoice, payment, receipt, etc
Options of Activity (define in nodes) could be1. Wait (sleep):Time before next activities
2. User Choice: Yes/No
3. User Action: Windows/Forms interactions
4. Auto Action: Apps Process, Apps Report, Document Action (Approve, Reject, Re-Activate, etc), Set Variable and send an Email.
Like reports, a Process will tie with a Table. You will see more!
(Start)
(DocPrepare)
(DocComplete)
(DocAuto)
-
8/13/2019 AD Basic Tech Workshop
45/52
Document Process Workflow
By configuring Node (activity), Transition andCondition we can create new / modify existingworkflow such as,
Start(Wait)
Node 1
Complete(Doc Action)
Node 4
Approve(User Choice)
Node 3
ConvertToPO(App Process)
Node 6
EmailToMgr(Email)
Node 5
Prepare(Doc Action)
Node 2
Set Condition
(and/or)
If xx > $$goto node 3
else goto node 4
-
8/13/2019 AD Basic Tech Workshop
46/52
Document Process Workflow
Workflow can be quite flexible like BPM, but without GUI
Can define Join & Split Element using AND / XOR
Can have multiple Conditions to determine the next node
Can execute something behind the scene as Auto Process
Can pass Parameter to be used in the next Node (activity)execution, i.e., to pass requisition data Auto-Create PO process
Can trigger Sub-Workflow
Can ask for approval as Approval Workflow
IF User Choice action and using IsApproved as column value
AD will send this task to responsible person, who is
The Supervisor of the current user
Have right to approve (own document & enough approval budget)
** Detail from page 314 in the book
-
8/13/2019 AD Basic Tech Workshop
47/52
Document Process (Approval) Workflow
When use Approval Workflow, the activity of theunderlining person is notified at Workflow Activities Tabnext to Menu Tab
To make approval,
1. Zoom to see the Document
2. Answer Yes / No
3. Click OK
4. To make approval,
Follow up / make cancellation of the process from, Workflow
Process window
-
8/13/2019 AD Basic Tech Workshop
48/52
How the Doc Process is registered?
Create new process in window Workflow As stated, the Doc Process workflow tied to a table, i.e., for
―Process_Payment‖ in Workflow Tab it set to C_Payment table
Register new process, i.e., ―Process_Payment‖ in windowReport & Process Search Key = C_Payment_Process,
Name = Process Payment
The process registered in DocAction column (a button) inwindow Table and Column and is fired when this button isclicked!
-
8/13/2019 AD Basic Tech Workshop
49/52
Document Value Workflow
Document Value is used to answer the question
“If some value updated with the processing document,do something ”
For example, Send the Manager a notification e-mail if there are any purchase order
cancellations for a certain business partner. When a new Business Partner is created, it is forwarded for review and credit
check.
Send confirm e-mail to customer, when the order has been processed.
Note:
Similarly to Document Process Workflow, this workflow tied to a Table, Document Process workflow is triggered by DocAction button
Document Value workflow is triggered by an updated value logic(system catch the event, no need to register with a button)
-
8/13/2019 AD Basic Tech Workshop
50/52
Setup Document Value Workflow
Workflow Tab: Set document (table) and trigger logic
Node Tab: Setup nodes in the similar way as DocumentProcess workflow, i.e.,
-
8/13/2019 AD Basic Tech Workshop
51/52
Setup Document Value Workflow
In previous example,
When Business Partner iscreated, it is forwarded forreview and credit check byopen up Business Partner for
review
Login as supervisor of theuser who create new BP
You will see new activity
arrived
-
8/13/2019 AD Basic Tech Workshop
52/52
Weakness of AD Workflow
No GUI drag / drop to create workflow process
User Assignment
There is no way to be more flexible to identify the approvinguser yet when create a workflow.
It is now determined automatically by the system logic.