Reason codes are optionally defined as site configuration elements. If the site configuration does not contain reason codes, then a Pause or Cancel time registration will not prompt the user for a reason code.
If however Reason codes for a site has been configured, then for every Pause or Cancel time registration, the employee will be prompted to select a reason code. The reason code selected is saved in the database as part of the time registration, in order to account for down time periods in e.g. BI or OEE calculations.
This is an example of the Reason codes the employee must select between, using the configuration shown below
Defining reason codes
In version 7.4.2 reason codes are defined programmatically. Editing of reason codes from a graphical user interface is currently not supported.
The following groovy script shows how to create reason codes. The script only need to be executed once. Please see inline comments for an explanation
def ccs = pluginAPI.getBaseModelAPI().getCodeCollectionsService();
// The concept of 'Code collections' are used for storing both
// 'Job types' : "TT_JOB_TYPE"
// 'Quantity bad codes' : "TT_QTY_BAD_CODE"
// 'Reason codes' for Pause/Cancel : "TT_REG_CODE"
// Registartion codes for Pause and Cancel registrations
def rc1 = ccs.build().codeData().id("RAWM").name("Raw material").color("#B32428").tag("TT_REG_CODE").addOrUpdate();
def rc2 = ccs.build().codeData().id("HEAT").name("Heater issue").color("#59351F").tag("TT_REG_CODE").add();
def rc3 = ccs.build().codeData().id("CONV").name("Conveyor issue").color("#212121").tag("TT_REG_CODE").add();
def rc4 = ccs.build().codeData().id("PRIN").name("Printer issue").color("#EC7C26").tag("TT_REG_CODE").add();
def rccc = ccs.build()
.codeCollection()
.name("Time registration codes")
.codes(rc1, rc2, rc3, rc4)
.tag("TT_REG_CODE")
.add();
ccs.build().codeCollectionMapping().key("TT_REG_CODE", "", "").codeCollection(rccc).add();
Read more about code data, collections and mappings here.
Post your comment on this topic.