Kiwiplan
Copyright Notice
SFL Services LLC has prepared this document for use only by their staff, agents, customers and prospective customers. Companies, names and data used as examples in this document are fictitious unless otherwise noted. No part of this document may be reproduced or transmitted in any form or by any means, electronic or mechanical, for any purpose, without the express written permission of SFL Services LLC, who reserve the right to change specifications and other information contained herein without prior notice. The reader should consult SFL Services LLC to determine whether any such changes have been made.
Licensing and Warranty
The terms and conditions governing the licensing of SFL Services LLC software consist solely of those set forth in the written contracts between SFL Services LLC and its customers. Except as expressly provided for in the warranty provisions of those written contracts, no representation or other affirmation of fact contained in this document, including but not limited to statements regarding capacity, suitability for use or performance of products described herein, shall be deemed to be a warranty by SFL Services LLC for any purpose, or give rise to any liability of SFL Services LLC whatsoever.
Liability
In no event shall SFL Services LLC be liable for any incidental, indirect, special or consequential damages whatsoever (including but not limited to lost profits) arising out of or related to this document or the information contained in it, even if SFL Services LLC had been advised, knew or should have known of the possibility of such damages, and even if they had acted negligently.
- Kiwiplan - VUE with systemd
- Kiwiplan - Business Rules Book
- Kiwiplan - KDW Data Warehouse
- Kiwiplan - Upgrade Shortcut Switches
- Kiwiplan - Bag of Tricks for ESP and MAP/MES
- Kiwiplan - Supplying Product Designs
- Kiwiplan - Multi-Plant Harmonization
- Kiwiplan - ULT Interface to Warehouse and Carriers
- Kiwiplan - ESP Stock Transfer
- Classic - Purge Parameter Defaults
Kiwiplan - VUE with systemd
Introduction
This document it to setup auto restart of the VUE services after a server restart.
Create The Following Files
kiwiplan@.service
sudo vi /etc/systemd/system/kiwiplan@.service
Place the following in the file
[Unit]
Description=Kiwiplan services for %I
After=network-online.target mariadb.target
[Service]
Type=simple
User=remuser
Group=kiwiplan
ExecStart=/KIWI/services/servers.sh start %i
ExecStop=/KIWI/services/servers.sh stop %i
RemainAfterExit=true
PrivateTmp=false
LimitNOFILE=32768
LimitNPROC=32768
Environment=TERM=vt100
[Install]
WantedBy=multi-user.target
Reload the changes
sudo systemctl daemon-reload
servers.sh
vi /KIWI/services/servers.sh
Place the following in the file
#!/bin/bash
if [ $# -gt 1 ]; then
export TERM=vt100
export LOG=/tmp/kiwiplan.$2.log
echo $(date +'%Y-%m-%d %H:%M:%S') - $1 >> $LOG
case "$1" in
start)
/KIWI/services/sites/$2/current/bin/startservers.sh >> $LOG 2>&1
;;
stop)
/KIWI/services/sites/$2/current/bin/stopservers.sh >> $LOG 2>&1
;;
*)
exit 1
;;
esac
exit 0
else
echo "No Site passed"
exit 1
fi
Make the file executable
chmod +x /opt/kiwi/services/servers.sh
Run Configurations
For the VUE site named 'vue' use the following:
To have it start on boot run :
systemctl enable kiwiplan@vue.service
To stop it from starting at boot time :
systemctl disable kiwiplan@vue.service
To start :
systemctl start kiwiplan@vue.service
To stop :
systemctl stop kiwiplan@vue.service
To view status :
systemctl -l status kiwiplan@vue.service
Kiwiplan - Business Rules Book
Unit Load
Reconstructing the SSCC barcode_key of the unit (barcode_key) is not imported into ESP with the unit. Will use this when creating auto interplant units in Plant ULT, so that the producing plants barcode can be scanned when unit arrives in .
"[$s1]:=""0019419839""
[$s2]:=format([uniqueid],""000000000"")
[$barcode]:=[$s1]&[$s2]
[$d12]:=val(substring([$s2],2,1))
[$d13]:=val(substring([$s2],3,1))*3
[$d14]:=val(substring([$s2],4,1))
[$d15]:=val(substring([$s2],5,1))*3
[$d16]:=val(substring([$s2],6,1))
[$d17]:=val(substring([$s2],7,1))*3
[$d18]:=val(substring([$s2],8,1))
[$d19]:=val(substring([$s2],9,1))*3
[$chkdigit]:=[$d12] + [$d13]+ [$d14]+ [$d15] + [$d16]+[$d17]+ [$d18] + [$d19] +78
[$d20]:=(roundup([$chkdigit]/10)*10)-[$chkdigit]
[Userfieldul2]:=[$barcode]&[$d20]"
Kiwiplan - KDW Data Warehouse
Introduction
The document assumes that you have the server build with a Kiwiplan environment.
These are things that need to be done on after the installation of KDW.
These instructions may not follow the same folder setup our was installed using the “KDW” site name.
Environment
Add these to the environment to make it easier to navigate to the folders
export KIWIBASE=/KIWI
export KIWI=${KIWI:-/KIWI/site_$PLANTID}
export KBIN=${KBIN:-${KIWIBASE}/services/etl/kdw/current/kiwiplan/bin}
export KLOG=${KLOG:-${KIWIBASE}/services/etl/kdw/current/kiwiplan/log}
export KCONF=${KCONF:-${KIWIBASE}/services/etl/kdw/current/kiwiplan/conf}
Logout and log back in to get the variables and be able to use them
Admin Console prep
You need to add the dashboard to the the pam authentication
cd $KCONF
sudo cp kdw-adminconsole_eample /etc/pam.d/kdw-adminconsole
Database Readiness
Run this to make sure there are no table lock.
USE master;
GO
ALTER DATABASE [kdw_master_datawarehouse]
SET SINGLE_USER
WITH ROLLBACK IMMEDIATE;
GO
ALTER DATABASE [kdw_master_datawarehouse] SET READ_COMMITTED_SNAPSHOT ON;
GO
ALTER DATABASE [kdw_master_datawarehouse]
SET MULTI_USER;
GOUSE master;
GO
ALTER DATABASE [kdw_working_datawarehouse]
SET SINGLE_USER
WITH ROLLBACK IMMEDIATE;
GO
ALTER DATABASE [kdw_working_datawarehouse] SET READ_COMMITTED_SNAPSHOT ON;
GO
ALTER DATABASE [kdw_working_datawarehouse]
SET MULTI_USER;
GO
MySQL Connector
https://dev.mysql.com/downloads/connector/j/
For 9.80.x revision you must use 5.41 as version 8.x.x do not work.
Extract the file and then copy the .jar to the DIST folder.
[/KIWI/services/etl/kdw/current/kiwiplan/dist]$
mysql-connector-java-5.1.44-bin.jar
Setting Console
cd /opt/kiwi/services/etl/kdw/current/kiwiplan/conf
cp kdw-adminconsole_example /etc/pam.d/kdw-adminconsole
chmod 777 /etc/pam.d/kdw-adminconsole
Extra Executors
To setup extra executors to reduce the time of execution for each system.
You will need to copy the executor properties files to another by adding a numeric value to the name
[/KIWI/services/etl/kdw/current/kiwiplan/conf]$
cp application_executor.properties application_executor1.properties
The new file needs to be edited and this value changed
## KDW executer name
kdw.executor-name=Main_Executor
To the following value
kdw.executor-name=Main_Executor1
Revision 9.8.x
Make sure you un the following.
[/KIWI/services/etl/kdw/current/kiwiplan/bin]$
dwdate_initialization.sh
Restart Script
You can create a restart.sh script with the following
[/KIWI/services/etl/kdw/current/kiwiplan/bin]$
vi restart.sh
Then add this in the file
:
./stopExecutors.sh
./stopSchedulers.sh
./startSchedulers.sh
sleep 15
./startExecutors.sh
Make the file executable for the system
[/KIWI/services/etl/kdw/current/kiwiplan/bin]$
chmod 777 restart.sh
Kiwiplan - Upgrade Shortcut Switches
These are placed on the shortcut of the upgrade.exe.
Upgrade Options Only (depreciated 7.80)
Evaluator:
Option: 1 Will show you the available revisions to upgrade from for the revision you are trying to upgrade to if it fails, it returns database versions though, not msi versions.
(Depricated) Espdatapurge:
This is now on a service setup.
Purge data in ESP before upgrading, it uses different datetime fields depending on the record, and depends on the statuses of some objects to determine if the transactional record is purged
NOTE: If a docket is older than your purge time, if it is in printed status, it will not purge
Upgrade Options Only
Applyscriptfolder:
This is to point the upgrade to look at another script folder but will bypass version checking so you can break things. C:\Kiwiplan\EspServ\Upgrade.exe applyscriptfolder
Importactivedirectory:
This is to import and sync the Active Directory after the upgrade completes. C:\Kiwiplan\EspServ\Upgrade.exe importactivedirectory
C:\Kiwiplan\EspServ\Upgrade.exe espdatapurge
C:\Kiwiplan\EspServ\Upgrade.exe evaluator:1
Kiwiplan - Bag of Tricks for ESP and MAP/MES
Agents
Agents
ESP Agent Retry Errors Setup
Agent can be set up to retry errors so that the system reprocesses failed requests.
InfClient/Section/Agent General
Name Scope Value
Restart Error Text whole Automation error
Maximum Automatic Retry Count For Failed Requests whole 3
InfClient/Section/Agent Errors To Retry
Name Scope Value
Agent exited without completing request whole Agent exited
Cannot find matching dockets whole Cannot find matching dockets
changed by another user whole changed by another user
Clipboard whole Clipboard
Deadlock whole deadlock
Execution canceled whole Execution canceled
Operation Cancelled whole Operation canceled
PalletMovement whole PalletMovement
Updated by another user whole Updated by another user
Application Shortcut Line Options
The 1 equals true and the 0 equals false. You can also use True or False those will also turn these options on or off.
All of these options have the semicolon to separate the option with the True or False
Ex: PrintToFile:1 or PrintToFile:True
KiwiXplor & Agent Options
DBServer:
This is the hostname of the SQL server.
DBName:
This is the DataBase name to use on the SQL server.
DBPassword:
This is to specify a SQL DataBase password to log into SQL server.
DBLogin:
This is to specify a NT/Network SQL DataBase Login to log into SQL server.
NTLogin:
Replaces the Domain user name to the one specified.
Plant:
Is the plant code (from MAP) in GEN/PL
SQLLog:
This enables logging of calls to the SQL DataBase
Width:
Is the width of the ESP window that opens by default
Height:
Is the length of the ESP window that opens by default
Object Log:
Logs object usage in ESP, an interval defined in seconds
HostDebugLevel:
Is the Tcp connection between ESP and the Unix system (aka KIDS) debugging level 0 - 5 (5 = most detailed)
KiwiXplor Options Only
HostName:
This is to change the Linux server
HostDataSet:
This is to access the MAP DataSet that is specified in the KIDSENV file. For more info on this parameter look at the “First Time Installation Guide”.
HostUser:
This is to specify the Unix server login name to log into the MAP DataSet.
HostPassword:
This is to specify the Unix server login password to log into the MAP DataSet.
DBTimeOut:
Is a setting for the amount of time in seconds before the database should give up waiting for a reply from the SQL DataBase.
Agent Options Only (depreciated after 7.80)
AgentNumber:
This is used when more than one Agent has been setup in ESP to handle different types of requests
PrintToFile:
This is used if printing documents to a file instead of physically printing (good for testing).
ShowWord:
This is used if Word is to display the populating of templates as Word documents are printing
Freeze a ESP dataset in time
Freezes your dataset in time. To use this you will have to create a file in the ESPServ folder and call it “profile.ini” and then add the following within the file
[SheetPlant]
StartDateTime=10/30/2014 16:25:25
TimeZone=Eastern Standard Time
LocaleID=1033
[CHH]
StartDateTime=02/10/03 14:45:00
TimeZone=New Zealand Standard Time
LocaleID=5129
Using this option on the properties command line you have to use it like this
profilesection:CHH
Reference https://kall.kiwiplan.co.nz/kall/kiwiplan/issueViewer.do?action=viewIssue&searchId=7&issueId=72725
Example of KiwiXplor Options
KiwiXplor Target Line
Example of a target:
“K:\Kiwiplan\Kiwiplan\KiwiXplor.exe” HOSTUSER:john HOSTPASSWORD:doe HOSTNAME:192.168.242.129 HOSTDATASET:Cinncinati DBSERVER:172.16.6.16 DBNAME:espbox
Note: Make sure that there is a space between each of the options e.g.: HOSTUSER:john(space)
Example of Agent Options
Agent Target Line
Example of a target:
K:\Kiwiplan\Kiwiplan\EspAgent.exe AgentNumber:3
Tricks & Shortcuts
Main Keys
F4 is a shortcut key used to display a combo field box (drop down box).
Simply click into the field and hit F4.
F5 is a shortcut key used to bring up another window from within the current one you are in.
Simply click into the field (even if it is grayed out) and hit F5
E.g.: If you are in the Product Design window you can click on the company field, press F5, and another window will open, displaying the company.
F8 is a shortcut key used to bring up special instructions in any Comment or Special Instruction field. These special instructions are stored in the Macro section of the relevant application.
Simply click into the field and hit F8
Alternative Manual Invoice/Credit Parameter
Several of the external Word docs in ESP are designed to allow for multiple templates of the same document. For example, it’s possible to have many different invoices. The standard invoice template is used unless a different template file is specified on the Documentation tab on the Company form for a particular company. This is the same for order confirmations, price lists, dockets etc.
The manual invoice and credit are not set up this way. You cannot attach a different manual invoice template or manual credit template to a customer. However, there are two parameters that allow for the use of alternative template files for manual invoices and credits:
EspClient/Invoicing/ Alternative Manual Invoice Template Formula
EspClient/Invoicing/ Alternative Manual Credit Template Formula
These parameters specify the template to be used for the manual invoice and manual credit using a business rule in the Value field.
Example:
If the parameter has the value:
iif([company.region]="Export", "ExportInvoice", iif([productcode]="Tool", "ServiceInvoice", "ManualInvoice"))
Then:
-
If the region for the company is set to Export, then the ExportInvoice template is used.
-
If the region is not set to Export and the Product code is Tool then the ServiceInvoice template is used.
-
In all other cases, the ManualInvoice template is used.
Kiwiplan - Supplying Product Designs
This section describes how to set up one product design to be supplied by another. This scenario is needed when goods are produced for stock, but must be erected/finished at a future unknown date. This means we need a means of tracking stock of the unfinished product and finished product.
ESP and MAP provide a solution for this using two stock PD’s. The first one (unfinished) is converted and booked into store. When the last conversion process is required, a topup of the second (finished) PD is placed. The feedback of this topup order will automatically decrease the stock of the first PD.
Parameters, Store and Machine Setup
Machine Setup
For this to work there are two machines that must be set up correctly. There must be a Supply From Stock machine. This machine should have the Supply operation 17, and be set to auto-feedback, triggered by feedback of the next step.
The second machine is the conversion machine that finishes the product. This machine should have standard feedback, the operations that are required to finish the product, and be attached to the store and location where the unfinished product will be stored.
Store Setup
The store location where the unfinished product is stored must have ‘Units from WIP label to be Available/Stock’ set to Y.
Parameters
Two parameters need to be set in MAP:
-
PCS FB 57 “Auto Board Xfers for Hort Jobs” = Y
-
GEN PL 33 “FGS Supply Machine for Hort.” = machine number for Supply From Stock machine
Product Design Setup
Unfinished Product Design
This PD must have a stock line for the store that was specified on the finishing machine described previously in this section.
The machine route should be set up as normal, without the finishing step.
Finished Product Design
The finished PD must also have a stock line.
The machine route should be the Supply from Stock machine, the finishing machine and the strapper, so the operations on the PD need to be Supply board, whatever finishing operations are required, and strapping.
The machine route should have the unfinished PD number specified in the ‘supplying design number’ field.
Business Rule for Special Instruction
There is currently nothing on the order for the finished PD to indicate that it is being supplied by another PD. However this can be easily remedied by writing a business rule to the Order business class that adds the supplying PD number to the special instructions.
Expression:
[Specialinstructions]:=[Specialinstructions] & iif([Ordertype]<>"calloff" AND isobjectvalid([Route.SupplyingProductDesign])=true AND findcount("to supply this order",[specialinstructions])=0," !!!!! Please use PD" & [Route.SupplyingProductDesign.Designnumber] & " to supply this order !!!!!","")
This rule appends a message to the existing special instructions, but only if the following conditions are true:
-
the order is not a calloff
-
the route attached to the order has a supplying PD number
-
the message isn’t already in the special instructions
The message that is added to the special instructions:
!!!!! Please use PD**** to supply this order !!!!!
where **** is the supplying PD number from the machine route.
Ordering, Feedback and Delivery
Here is the sequence of events for this scenario:
-
topup is placed for the unfinished PD to increase the stock. It is converted and booked into store
-
topup is placed for the finished PD
-
the finishing step is fed back
-
this automatically feeds back the Supply from Stock step, drops the unfinished stock levels and increases the finished stock levels
-
calloff order is placed for delivery of finished product
Kiwiplan - Multi-Plant Harmonization
What fields and areas that need to be standardize in ESP and MAP.
This section was put together from the aspect if we were going forward either with one MAP database or Multi-MAP databases scenario.
All plants in one ESP database
Here is a list of fields/lookups that need to be standardized in the ESP database
-
Destination Codes
-
Styles for Descriptions and print outs
-
Stacking Patterns shared with MAP parameters
All countries/states/provinces in a separate MAP Database
Here is a list of fields/lookups that need to be standardized all across the MAP databases
-
Colors
-
Pallet Types
-
Top Board Codes
-
Closure Codes
-
Strapping Codes
-
Stacking Patterns shared with ESP
-
Tab Types
-
Score Types
-
Ink Types
10) Tools Types
11) Tool Names when the tool is shared
12) Machine Operations
13) Unit Descriptions
14) Basic Board Codes
15) Downtime Codes
16) Waste Codes
17) Machine numbers
18) BRD-ST, Material Status
19) CORR-FL, Corrugator flutes
20) CSC-BS, Board structure
21) CSC-CC, Coating codes
22) CSC-OS, Order status codes and desc
23) CSC-PC, Paper class
24) GEN-FB, Default waste codes
25) GEN-LT, Label types
26) GEN-QC, Down time categories
27) GEN-UM, Units of measure
28) GEN-WC, Waste code classes
29) PCS-QE, PCS - machine groups
30) PCS-QO, PCS - order status
31) PCS-QR, PCS - run rate units
32) Label Formats
33) Board Code
Board Codes
The image below shows how we would setup board codes to be used in MAP. The ESP sales board code would only be seen in ESP for costing and sale purposes. The plant board code would only be seen on the production side and used to produce the item. Depending on the local plant’s available papers the combination would change at every plant. The producing plant’s combination would be setup in the CSC system to have an upgrade downgrade path to the top board code from sale board code.
NOTE: There is currently a limit to 16 upgrade and downgrade paths.
Kiwiplan - ULT Interface to Warehouse and Carriers
This is an interface that can be used to import loaded trucks at a remote location and also be able to ship them in ULT.
Reference
https://kall.kiwiplan.co.nz/kall/kiwiplan/issueViewer.do?id=5447259
Programs
imptruck
This program imports the jobs and units that would be on the remote load
shptruck
This program ships the truck in ULT.
NOTE: You can also unship and undesptch via the interface to undo loads.
Example of an interface running in Canada
Kiwiplan - ESP Stock Transfer
This is to be able to print out a stock transfer docket.
ULT Setup
Set the following MAP parameters to enable export of transfer data:
GEN/EE/Layout Version for ULTDLD (ULT Export) to 2
pcsmenu:AP MAINTAIN PARAMETERS 13/Sun 13:48
================================================================================
System Description V/M
GEN General for many systems
Prefix Description View_Mnt Default_key Many_records_allowed
EE Electronic Data Export M Y
Number Parameter Value
1 Data Type ULTDLD
2 Description Docket Export
3 Directory Name /app01/kiwi/site_0068/work/ultdld/
4 Last File Number Used 3
5 Script name for File Export EspRenameDkt
6 Fixed record length 0=variable 0
7 File Name (optional)
8 Layout Version 2
INV/DL/Allow File Export (Y/N) to Y
kwutils:C MAINTAIN PARAMETERS 13/Sun 13:50
================================================================================
System Description V/M
INV Inventory Management/Tracking
Prefix Description View_Mnt Default_key Many_records_allowed
DL Despatch Load Parameters M PARAMS N
Number Parameter Value
1 Key PARAMS
6 Allow File Export (Y/N) Y
INV/DL/Include in export transfer to Y
kwutils:C MAINTAIN PARAMETERS 13/Sun 13:51
================================================================================
System Description V/M
INV Inventory Management/Tracking
Prefix Description View_Mnt Default_key Many_records_allowed
DL Despatch Load Parameters M PARAMS N
Number Parameter Value
35 Include in export transfer Y
INV/DL/When set Load to "Shipped" Generate GLBOL export to Y
kwutils:C MAINTAIN PARAMETERS 13/Sun 13:51
================================================================================
System Description V/M
INV Inventory Management/Tracking
Prefix Description View_Mnt Default_key Many_records_allowed
DL Despatch Load Parameters M PARAMS N
Number Parameter Value
33 When set Load to "Shipped"
34 Generate DLBOL export Y
ESP Setup
Ensure your FGS/Stores parameters in ESP are set correctly, in particular FGS/Stores/Store x - FGS stk store xfer machine number for each store you are transferring to and from.
Verify you store locations and added highlighted (FGS Stk Store, In Machine & Out Machine)
invmenu:C Select Store 13/Sun 14:18
================================================================================
Total Stores = 14
Idx Store Description 1_L Plant Items Off Address Line 1
5 80 WINSTON-SALEM MAIN FG STO N 1 0 8080 N. Point Blvd
6 81 Westpoint Warehouse N 1 0 3946 Westpoint Blvd
7 124 Reynolds Packaging N 1 0 2249 Virginia Ave
8 125 Richmond Corrugated N 1 0 5301 Corrugated Rd
9 126 Carolina Container N 1 0 5701 Quality Way
10 127 South Atlantic N 1 0 3932 Westpoint Blvd
11 128 Phoenix Packaging N 1 0 125 E. 9th St.
12 129 Driscoll Group N 1 0 1084 W. 4th St.
13 130 RKT Latta N 1 0 4461 Hwy 301 S
14 143 Freeman Container N 1 0 121 Freeman Park Drive
You must add the FROM and TO store number of the stores that will be used in the transfers in the despatchmode lookup table.
Once the store numbers are in the despatchmode lookup table then you must go to the relative address. To do this SEARCHàAddressàStore Number and enter the store number for the FROM and also on the TO and set the drop down for the despatchmode.
FROM
TO
Classic - Purge Parameter Defaults
This is to give your plant(s) default set values for these parameters.
Legend:
- PARAMS - Default for all
- CSC - Corrugator Scheduling Center
- RSS - Roll Stock System
- ULT - Unit Load Tracking
- WIP - ULT Work In Progress
PARAMS is the default setting for all modals if it is the only one that exists
System Description View_or_Maintain Prefix Description View_or_Maintain Default_key Many_records_allowed Description Contents Purge orders daily (Y/N) Y Purge details daily (Y/N) Y Purge history daily (Y/N) Y Purge specifications daily Y/N Y |
CSC Parameters
System Description View_or_Maintain Prefix Description View_or_Maintain Default_key Many_records_allowed Description Contents Purge orders daily (Y/N) Y Purge details daily (Y/N) Y Purge history daily (Y/N) Y Purge specifications daily Y/N Y |
RSS Parameters
System Description View_or_Maintain Prefix Description View_or_Maintain Default_key Many_records_allowed Description Contents Purge orders daily (Y/N) Y Purge details daily (Y/N) Y Purge history daily (Y/N) Y Purge specifications daily Y/N Y |
ULT Parameters
System Description View_or_Maintain Prefix Description View_or_Maintain Default_key Many_records_allowed Description Contents Purge orders daily (Y/N) Y Purge details daily (Y/N) Y Purge history daily (Y/N) Y Purge specifications daily Y/N Y |
WIP ULT Parameters
System Description View_or_Maintain Prefix Description View_or_Maintain Default_key Many_records_allowed Description Contents Purge orders daily (Y/N) N Purge details daily (Y/N) N Purge history daily (Y/N) Y Purge specifications daily Y/N |