0% found this document useful (0 votes)
30 views85 pages

Pim 1001

Uploaded by

mohamed yehia
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views85 pages

Pim 1001

Uploaded by

mohamed yehia
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 85

Uniformance 150

Background Processing
Descriptions
User Guide
Copyright, Notices, and Trademarks

Copyright, Notices, and Trademarks


© Honeywell Inc. 1998 – 1999. All Rights Reserved.
Release 150 – July 30, 1999
While this information is presented in good faith and believed to be accurate, Honeywell disclaims the implied warranties
of merchantability and fitness for a particular purpose and makes no express warranties except as may be stated in its
written agreement with and for its customers.
In no event is Honeywell liable to anyone for any indirect, special or consequential damages. The information and
specifications in this document are subject to change without notice.

Honeywell, TotalPlant, Uniformance, and Business.FLEX are U.S. registered trademarks of Honeywell Inc.
Other brand or product names are trademarks of their respective owners.

Release Information
Uniformance 150
Revision 1
Revision Date: July 30, 1999
Document Number: PIM-100.1

Honeywell Inc.
Industrial Automation and Control
Automation College
2820 West Kelton Lane
Phoenix, AZ, 85023-3028

ii • Uniformance Background Processing Descriptions User Guide


Contents

Contents
Copyright, Notices, and Trademarks ii

Release Information ii

Introducing Background Processing 7

Quality Management – LIMS QM 9


VMS Sample Scheduling 9

Windows Sample Scheduling 10

Lab Data Integrator (LDI) 10

Production Management – Accounting/Costing 11


Production Accounting Nightly Auto Processing 11
Get Equipment for Balance Group 11
Process Instructions 11
Process Dependents 12
Process Product Movements 12
Process Flow Switch 13
Generate Cutoff Inventories 13
Generate Static Routes 14
Generate Material Transfer 14
Cutoff Inventory Product Update 14
Transfer Resolution 15
Update Resolved Quantities 17
Send Resolved Quantities to PHD 17
Perform Allocations 18

Uniformance Background Processing Descriptions User Guide • iii


Contents

Re-Update Resolved Quantities after Allocation 18


Re-Send Resolved Quantities to PHD after Allocation 18

Production Management 19
Batch Tracking 19
Lineups 19
Production Events 20
Batch Creation 20
Batch Remaining 22
Update Batch Processing Equipment Times 22

Lot Tracing 24

Tank Composition 24

Plant Information Management 25


PHD to Relational 25

Relational to PHD 25

Database Synchronization 25

Robust PHD Data Distribution 25


Configuration 25
Messaging 25
Sequence of Events 26

Operations Management – Alarm and Event


Monitoring 27
Alarm Monitoring 27

Event Monitoring 28

Production Planning 29
Production Run Planning 29

iv • Uniformance Background Processing Descriptions User Guide


Contents

Recipe Management 31
Recipe Synchronization 31

Configuration 32
Messaging 33

Details 34
Recipe Header Section 34
Recipe Detail Section 35

Formulation Detail Section 36


Formulation Section (Components) 37
Formulation Section (Produced) 37

Sequence of Events 38

Operations Monitoring – Shift Summary Background


Process 43
Shift Summary Auto Processing 43

Configuring Tag Values to Retrieve from PHD 43

Overview of the Shift Summary Background Process 44

Operating Instruction Scheduling 44

Application Management 45
Windows Report Scheduling 45

Application Server 47
Required Background Processes 47

Parameters for the Background Processes 47


Alarm Monitoring 50
Auto Instruction Create 50
Blend Management Interface 52
Blend Mgmt PHD Characteristics 53
BM Interface File Loader 54

Uniformance Background Processing Descriptions User Guide • v


Contents

BT Batch Tracking 55
Event Journal 55
Event Monitoring 56
Extract Scheduling 56
Instruction Scheduling 57
Interface Data File Loader 58
LDI Lab Data Integrator 59
LimitSet Refresh 60
MSGLOGSERVER 60
Operations Monitoring 60
PA Auto Reprocess 61
PA Nightly Processing 62
PHD_TO_REL 63
Product Movement Interface 63
Product Movement Scheduling 64
Production Schedule 65
Purge Background Process Status 65
Purge Interface Data 66
Purge LIMS Redo Log 66
Purge Message Log Data 67
Recipe Download 68
Recipe Synchronization 70
REL_TO_PHD 71
Robust PHD Data Distribution 72
Sample Scheduling 73
Tag Synchronization 74
Tank Composition 75

Event-Driven Applications 76
Event-Driven Scheduler 76
Event Subscription Details 77
IP_EVNT_PENDING table 77
Package and Stored Procedure 78

Index 79
vi • Uniformance Background Processing Descriptions User Guide
Introducing Background Processing

Introducing Background Processing

This document describes the background processing functions used in the


Uniformance Plant Information System applications.
These background processes run periodically and process information contained in
both the RDBMS and the real-time database. Processing is driven by application
configuration data evaluated to log events that happened or are scheduled to happen.
These events include operating equipment lineup times, logging operating
instructions to start, logging of samples taken, monitoring for alarm conditions and
routing alarm messages, creating batch tracking details, and automating the collection
and resolution of production accounting information.
This document is organized by application area. Within each area, the processing
functions are followed by a description of the processing steps and logic. The
processing steps are described in terms of step-by-step procedures within the
background process. The descriptions are not intended to provide a functional or
logical explanation for the purpose or reason of the steps. Instead, you should use this
documentation in conjunction with various Users Guide documents that further
describe the application functionality, configuration, and use.
For further details about the background process command files and command file
parameters, refer to the VMS System Environment document.

Uniformance Background Processing Descriptions User Guide • 7


Quality Management – LIMS QM

Quality Management – LIMS QM

VMS Sample Scheduling


The VMS Sample Scheduling function automatically creates samples defined and
activated using the Sample Scheduling form or the Schedule Activation form. VMS
sample scheduling executes on a VAX or Alpha VMS system.

To schedule samples for VMS, the system completes the following:


1. Selects all sample schedule entries that have type P (Parent) and the Active Flag
set (Not Null).
2. Retrieves all entries whose group name equals to active parent name selected in
step # 1. Calculates the next time the sample should be logged. If it is within the
current scheduling window (configuration parameter is typically set to about 30
minutes), then using the sample template name, the system inserts the sample log
entry into the IP_SMPL table and the default set of tests into the IP_TST_RSLT
table. The system uses the calculated sample schedule time for the sample time
and date. It sets the last logged date in the sample schedule for (each group entry)
to the calculated sample schedule time and date.
3. Retrieves all schedule activation entries where the current time and date is
between the schedule activation start time and date and schedule activation end
time and date, and where the schedule group is not null. The system repeats step
2 and inserts the sample log and test result record details where the calculated
sample date and time are less that the schedule activation time and date.
4. Updates the last logged date in the sample schedule entry.

Uniformance Background Processing Descriptions User Guide • 9


Quality Management – LIMS QM

Windows Sample Scheduling


The Windows Sample Scheduling function automatically creates samples defined and
activated using the Sample Schedule Configuration form and the Windows Sample
Scheduler form. Windows sample scheduling executes on a Windows or
WindowsNT PC.

To schedule samples for Windows, the system completes the following:


1. The report scheduling algorithm operates, periodically, specified in the Sample
Scheduler form Execution Frequency field.
2. The scheduling process continues if the scheduling is active and executing on the
PC. Otherwise, the scheduling process and periodic execution stops.
3. If the Notify When Schedule Executes field of the Sample Scheduler form is
checked, a notification message is displayed. Depending on your response,
scheduling continues, is postponed by a selected amount, or stops.
4. If scheduling is not stopped or postponed, the system queries for all active
scheduled samples listed in the Sample Schedule Configuration form.
5. The system determines if each sample is to be logged by examining the start and
end dates, the active flag, recurring flag, and recurring interval. The system
retrieves the sample template or sample group, for each sample scheduled to be
logged prior to the lead time and/or current time.
6. If there is a sample group, the system retrieves all sample templates in the group.
7. Using the sample template name, the system inserts the sample log entry into the
IP_SMPL table and the default set of tests into the IP_TST_RSLT table.
8. The system updates the last scheduled sample date for the sample schedule
configuration entry.
9. Processing resumes at step 5 until all scheduled samples are processed for all
sample groups and sample templates.
10. The system updates the last logged date in the Sample Scheduler form.

11. The system ends operation for the period indicated in the Sample Scheduler form
and resumes at step 1.

Lab Data Integrator (LDI)


For information regarding the Lab Data Integrator, refer to the Uniformance Lab
Data Integrator User Guide

10 • Uniformance Background Processing Descriptions User Guide


Production Management – Production Accounting/Costing

Production Management –
Production Accounting/Costing

Production Accounting Nightly Auto Processing


Production Accounting background processing is a multi-step function. The
following describes the process features:

Get Equipment for Balance Group

• Finds all equipment/modes for the balance group where, in the equipment
configuration, the parent equipment is the balance group and the hierarchy type is
BALGROUP.

Process Instructions

• Retrieves all active instructions for the accounting period where the instruction
mode is part of the balance group.
• Retrieves all active product routing records which are of the same mode as the
instruction modes and where there is no switch tag associated with the routing.
• Inserts into the Balance Intermediate table (IP_BAL_PNT) the instruction time
frame, which must be within the time frame of the accounting day, instruction
information, and product routing information.

Uniformance Background Processing Descriptions User Guide • 11


Production Management – Production Accounting/Costing

Process Dependents

• Retrieves the list of equipment (generally services) configured as dependent on the


modes in the Balance Intermediate table inserted through the Instruction step.
• The dependent equipment/modes are configured in the Equipment Group
Configuration Form where parent equipment is one of the modes in the balance
group and the hierarchy type is DEPEND.
• Retrieves the DEPENDOFFSET attribute for the dependent mode. Add the defined
value (in hours or fractions of hours) to the start time of the operating instructing
actual start time. Or if the attribute does not exist, add zero to it. This is the start
time for the dependent instruction that may be in the future. The start time is stored
in a table referenced to retrieve any dependent modes of operation with a start time
within the balance period.
• Inserts a record into the Balance Intermediate table for each active routing and for
each dependent equipment or mode using the start and end dates of the dependent
records.

Process Product Movements

• Retrieves all product movements for the accounting period and for the equipment
in the balance group where the equipment attribute is either MOVEDEST or
MOVESRC.
• Retrieves all bulk/bag loadings for the accounting period where the destination
equipment has the attributes BULK_BAG_DEST and either MOVEDEST or
MOVESRC'
• Retrieves active product routings of operation type MOVE for above movements.
• Converts the value of the movement to the balance units.
• Inserts the data into the Balance Intermediate table where no existing entry has the
same link name, source/destination, and mode encompassing either the start or end
dates as the record to be inserted.

12 • Uniformance Background Processing Descriptions User Guide


Production Management – Production Accounting/Costing

Process Flow Switch

• Retrieves all active product routing records with a not NULL Flow Switch Tag and
with an equipment/mode as part of the Balance Group, if the equipment of the
mode is not of equipment attribute INST, or when the equipment attribute is of
type INST, and there are entries in the Balance Intermediate table for the
equipment. This ensures that routings for inactive modes of operation for the
equipment are not retrieved.
• Calls PHD to get all switch activity for each switch tag over the accounting period.
• Inserts the data into the Balance Intermediate table where no existing entry has the
same link name, source/destination, and mode encompassing either the start date or
end date as the record to be inserted.

Generate Cutoff Inventories

• Finds all equipment in Balance Group, with the attribute CUTINV.


• Retrieves cutoff inventory tags from the tag field of the equipment attribute record
where the attribute is CUTINVTAG. Then retrieve the inventory value of the
equipment at the end of the accounting period.
• Inserts the inventory for the equipment into the Cutoff Inventory table.

Uniformance Background Processing Descriptions User Guide • 13


Production Management – Production Accounting/Costing

Generate Static Routes

• Finds all active Product Routing records where the Static Route Indicator is
enabled (X) for the equipment in the Balance Group.
• Inserts into the Balance Intermediate table the static route records with the start
and end dates as the dates of the accounting period where an entry by the same link
name, source/destination, and mode does not already exist.

Generate Material Transfer

• Uses the results of the previous 6 steps combined with active Product Routing
records to generate both halves of the material transfer records.
• Retrieves each record from the Balance Intermediate table. The Product Routing
table is searched by mode and node to find the other end of the Intermediate
record. Then, the Intermediate table is searched using both halves of the routing
record looking for an overlap in time. If there is an overlap, the overlap time is the
time frame used to generate the material transfer.
• If the Intermediate record is a product movement and the Net Qty is 0, or the
record is not a product movement, uses the tag from the product routing and the
start and end of the overlap time to call PHD to retrieve the value of the material
transfer.
• Finds all material transfers with a NULL product name and replaces it with the
product name of the most recent material transfer for the equipment where the
product is not NULL. If the product cannot be determined, it defaults to
UNKNOWN.

Cutoff Inventory Product Update

• If the equipment has the attribute PRODUCT_TAG, retrieves the value in the tag
for the cutoff time and use that value as the product name.
• If the product name is still NULL, retrieves the last material transfer into that
equipment. Retrieves the product routing configuration entry (destination half) that
creates the transfer. If the USE ALTERNATE ROUTE flag is set, gets the next
previous transfer into that location.
• Updates the product of the Cutoff Inventory records using the product from the
material transfer record for the equipment. However, if during the time of the last
transfer a regrade occurred, uses the regrade product name.

14 • Uniformance Background Processing Descriptions User Guide


Production Management – Production Accounting/Costing

Transfer Resolution

• Retrieves all material transfer records and replaces the resolved quantity with the
specified quantity if it exists, or with the measured quantity.
• For each material transfer record with a tag, calls PHD to get the tolerance value.
• Calculates adjusted tolerance:
− The adjusted tolerance = 0 if there is no tag associated with the Material
Transfer record.
− If confidence of value = 0 the adjusted tolerance = 999999999
− Otherwise, the adjusted tolerance = (PHD tag tolerance)/confidence.
• Creates Transfer Groups records from the set material transfer records.
− A new transfer group is created with a total number of members = 1 for each
material transfer record with a non-inventory equipment. The transfer group
quantity = material transfer measured quantity.
− A new transfer group (TG) record is created for each material transfer (MT)
with an inventory equipment where no prior TG record exists for the equipment
and where the TG time frame overlaps with the MT time frame. If a record is
created, the total quantity of the TG is the measured quantity of the MT. The
time frame of the TG is the time frame of the MT. If a TG exists for the
equipment with an overlapping time frame, increment the total number of
members in the TG by 1. The new time frame of the TG is the total time frame
spanned by both the TG and the MT.
• For each TG record:
− Retrieves the CUTINVTAG for the inventory equipment.
− Retrieves the inventory change over the time frame of the TG.
− Stores the inventory change with the TG record.
• Resolves TG's where only 1 member remains and MT records with a specified
quantity. Specified quantities are manually entered and therefore, assumed to be
the most reliable quantity.
− Finds MT record (REC1) for TG with 1 remaining member.
− Finds MT record (REC2) which is the other half of REC1.
− If neither MT record has a not NULL specified quantity, goes to step 1 for the
next TG with 1 remaining member.
− If REC1 specified qty is NULL and REC2 specified qty is not NULL set both
REC1 and REC2 resolved qty's = REC2 measured qty. else
− If REC2 specified qty is NULL and REC1 specified qty is not NULL set both
REC1 and REC2 resolved qty's = REC1 measured qty. else

Uniformance Background Processing Descriptions User Guide • 15


Production Management – Production Accounting/Costing

− If REC1 adjusted tolerance is < REC2 adjusted tolerance then if REC1 is an


inventory equip then set multiplier = -1
− If REC2 source/dest = 'S' otherwise multiplier = 1 REC1 resolved qty = TG1 qty
* multiplier - SUM(resolved source qty's for TG1) + SUM(resolved destination
qty's for TG1)else REC1 resolved qty = REC1 measured qty REC2. resolved
qty = REC1 resolved qty else
− If REC2 adjusted tolerance is < REC1 adjusted tolerance then
− If REC2 is an inventory equip with only 1 remaining member in the TG then set
multiplier = -1 if REC2 source/dest = 'S' otherwise multiplier = 1 REC2
resolved qty = TG2 qty * multiplier - SUM(resolved source qty's for TG2) +
SUM(resolved destination qty's for TG2) else REC2 resolved qty = REC2
measured qty REC1. resolved qty = REC2 resolved qty else
− If REC1 adjusted tolerance is = REC2 adjusted tolerance then
− If REC2 is an inventory equip with only 1 remaining member in the TG then set
multiplier = -1
− If REC2 source/dest = 'S' otherwise multiplier = 1 REC2 resolved qty = TG2 qty
* multiplier - SUM(resolved source qty's for TG2) + SUM(resolved
destination qty's for TG2) REC1. resolved qty = REC2 resolved qty else
− If REC1 is an inventory equip then set multiplier = -1
− If REC2 source/dest = 'S' otherwise multiplier = 1 REC1 resolved qty = TG1 qty
* multiplier - SUM(resolved source qty's for TG1) + SUM(resolved destination
qty's for TG1) REC2. resolved qty = REC1 resolved qty else REC1 resolved qty
= REC1 measured qty REC2 resolved qty = REC1 resolved qty decrement TG1
and TG2 remaining members by 1 set resolved flags for both REC1 and REC2
• Resolves product regrades:
− Finds both halves of the MT records where the source equipment =
destination equipment.
− Gets the inventory of the equipment at the end time of the transfer.
− Sets the resolved qty of both REC1 and REC2 to the inventory qty.
− Decrements TG1 and TG2 remaining members by 1
• Resolves Transfer Groups with 1 unknown. This step is identical to step 6, except
that it is not mandatory if either half transfer has a specified quantity. It loops
through all the transfer groups many times until the number of unresolved values
does not change.
− Finds MT record (REC1) for TG with 1 remaining member.
− Finds MT record (REC2) which is the other half of REC1.
− If REC1 specified qty is NULL and REC2 specified quantity is not, NULL then
− Set both REC1 and REC2 resolved qty's = REC2 measured qty. else

16 • Uniformance Background Processing Descriptions User Guide


Production Management – Production Accounting/Costing

− If REC2 specified qty is NULL and REC1 specified qty is not NULL then set
both REC1 and REC2 resolved qty's = REC1 measured qty. else
− If REC1 adjusted tolerance is < REC2 adjusted tolerance then
− If REC1 is an inventory equip then set multiplier = -1 if REC2 source/dest = 'S'
otherwise multiplier = 1 REC1 resolved qty = TG1 qty * multiplier -
SUM(resolved source qty's for TG1) + SUM(resolved destination qty's for
TG1) else REC1 resolved qty = REC1 measured qty REC2. resolved qty =
REC1 resolved qty else
− If REC2 adjusted tolerance is < REC1 adjusted tolerance then
− If REC2 is an inventory equip with only 1 remaining member in the TG then set
multiplier = -1 if REC2 source/dest = 'S' otherwise multiplier = 1 REC2
resolved qty = TG2 qty * multiplier - SUM(resolved source qty's for TG2) +
SUM(resolved destination qty's for TG2) else REC2 resolved qty = REC2
measured qty REC1. resolved qty = REC2 resolved qty else
− If REC1 adjusted tolerance is = REC2 adjusted tolerance then
− If REC2 is an inventory equip with only 1 remaining member in the TG then set
multiplier = -1 if REC2 source/dest = 'S' otherwise multiplier = 1 REC2
resolved qty = TG2 qty * multiplier - SUM(resolved source qty's for TG2) +
SUM(resolved destination qty's for TG2) REC1. resolved qty = REC2 resolved
qty else
− If REC1 is an inventory equip then set multiplier = -1
− If REC2 source/dest = 'S' otherwise multiplier = 1 REC1 resolved qty = TG1 qty
* multiplier - SUM(resolved source qty's for TG1) + SUM(resolved destination
qty's for TG1) REC2. resolved qty = REC1 resolved qty else REC1 resolved qty
= REC1 measured qty REC2 resolved qty = REC1 resolved qty decrement TG1
and TG2 remaining members by 1
• sets resolved flags for both REC1 and REC2

Update Resolved Quantities

• Updates the Oracle database records with the resolved quantities.

Send Resolved Quantities to PHD

• Updates the PHD database records with the resolved quantities.


• Downloads resolved quantities associated with product routes with the accounting
report type of RECONPUT to the associated tagname.

Uniformance Background Processing Descriptions User Guide • 17


Production Management – Production Accounting/Costing

Perform Allocations

• Performs allocations for those material transfer records of a product with an


attribute of ALLOCFACTORTAG that are members of a group with a group type
of ALLOCATE and there exists a record in the product routing factor table with
the accounting report type of ALLOCATION and the source equipment has an
attribute of NETPRODUCTION.

Re-Update Resolved Quantities after Allocation

• Updates the Oracle database records with the resolved quantities.

Re-Send Resolved Quantities to PHD after Allocation

• Updates the PHD database records with the resolved quantities.

18 • Uniformance Background Processing Descriptions User Guide


Production Management

Production Management

Batch Tracking
The Batch Tracking background process performs various functions including the
following:

Lineups

Lineup Event entries are created for equipment with the attributes INVEV(inventory
event) or PRDCTNEV (production event). Batch inventory equipment such as silos
and tanks must have the INVEV attribute. Major production equipment must have the
attribute PRDCTNEV.
For this processing step to function properly, there must be valid product routing
information from the batch equipment back to the production equipment requiring
batch tracking. You may need to define routings through intermediate equipment.
Intermediate equipment is of no concern to the batch tracking process and does not
require the production or inventory event equipment attributes.
The following is the lineup event process for batch tracking background processes:
1. Find all active source product routing entries where the equipment has attributes
of INVEV or PRDCTNEV.
2. Fetch the next record.
3. If the routing from the step that called this one has no flow switch, find the
destination portion of the routing where the destination equipment has the
attribute EQUIP. If no entries exist, return to step 2.
4. If the destination record has no switch tag and the equipment is production
equipment, insert a lineup event entry.
5. If the equipment is not production equipment, continue through the routings
where the destination equipment is the source equipment and repeat step 2-8.

Uniformance Background Processing Descriptions User Guide • 19


Production Management

6. If the destination entry has a switch tag, call PHD and request the data for the
desired time frame.
7. If the equipment is production equipment and the switch is off, the system
updates the end date of a previous lineup event entry for the source and
destination equipment to the time the switch turned off. If the equipment is
production equipment and the switch is on, the system creates a new lineup
event entry using the switch on time as the start time and leaving the end date
NULL or blank until the switch closes later.
8. If the equipment is not production equipment and the switch is off, go back to
step 5 using the time frame the switch was open for.

Production Events

Production Events background processing is the second function included in the


Lineup Event process. The results of this function are populated into the Production
Event table that has no application screen associated with it. The contents of this
table are used internally within other Batch Tracking background processes to
determine the active instruction and the grade produced at the time that a material
flow is tracked back into the equipment.
• Find all instructions where the equipment has an attribute of PRDCTNEV and the
instruction actual start date is between the time this background process last ran
and the current time.
• For each returned entry, check for an existing entry in the Production Event table
for the piece of equipment where the end date is NULL or blank. If there is an
entry, update the end date with the actual start date of the returned instruction.
• For each returned entry, insert a new entry into the Production Event table.

Batch Creation

Batch creation processing monitors switches and flow tags as defined in the Batch
Create Configuration form. When the switch tag is on (1) and the flow tag indicates
that product quantity greater than the threshold quantity has flowed into the batch
vessel, the process creates a new batch entry according to the batch template defined.
You can then view the batch entry using the Batch Entry form.
When the switch tag is off (0) for greater than the close minutes indicated in the
batch create entry, the system identifies the batch as closed (the end date of the batch
is set to the time when the switch tag closed).

20 • Uniformance Background Processing Descriptions User Guide


Production Management

Switch Tag

Flow Tag

Silo, Tank or
other Vessel

The following is a description of the Batch Creation process:


1. Get all batch creation data defined through the Batch Create Configuration form
in ascending order of create sequence. The switch tag and flow tag are defined
in the Batch Create Configuration form.
2. Fetch the entry.
3. From PHD, retrieve all the switches that occur from the last time this process
executed until the current time and for the switch tag contained in the batch
create entry.
4. Get the next switch value. If there are no more values, the processing is
complete.
5. If the switch is on, verify that there are no open batches in the batches with No
End Date table. If an open batch exists in the source equipment, go to step 4. If
there is no batch go back in time and confirm that this is the true starting point
when the switch turned on, as PHD returns a switch value for the starting date
requested. After determining the start date, verify that the threshold quantity of
product has flows using the measurement tag from the Batch Create
configuration entry. If the threshold has been met, insert a new Batch record and
a new No End Date Batch entry, otherwise return to step 4.
6. If the switch is turned off, go back in time to confirm that this is the true starting
point when the switch turned off, as PHD returns a switch value for the starting
date requested. After determining the actual start date, verify that the minimum
time closed from the Batch Create Configuration entry is met. If so, close the
batch and delete the No End Date Batch entry, otherwise return to step 4.

Uniformance Background Processing Descriptions User Guide • 21


Production Management

Batch Remaining

The purpose of the processing related to the remaining batch quantities is to calculate
the remaining quantity in each batch for equipment with the equipment attribute
BATCH_CALC_REM defined.
The following is a description of the Batch Remaining process:
1. Find all equipment with the equipment attribute of BATCH_CALC_REM.
2. Fetch the next equipment entry.
3. Get the inventory position of the equipment using the tagname found with the
equipment attribute INVTAG.
4. Get the list of batches for equipment where remaining quantity is greater than
(>) 0 in reverse chronological order.
5. While scanning the list, sum the remaining quantities until the sum is greater
than the total inventory. Adjust the remaining quantity of the batch the scan
stops at by the difference in the inventory quantity and the summed quantities
and then set the remaining quantity to 0 for all older batches with a remaining
quantity greater than (>) 0.
6. Go to step 2.

Update Batch Processing Equipment Times

This background process determines the start and end dates when the processing
equipment was active for the batch. It also determines which product is produced by
the last product processing equipment in the line, using a process tag containing the
product produced by the equipment, or by looking at the active instruction during the
time frame.
The following is a description of the Update Batch Processing Equipment Times
process:
1. Find all batches that started or completed since the last time the program ran.
This information provides the start dates for the batch equipment records.
2. Fetch the record. If there are no more entries, then proceed to step 10.
3. Get the tags for the equipment where the attributes are OUTLETTAG and
INVTAG. The outlet flow tag provides the measurement for the quantity
flowing out of the equipment over a time frame and the inventory tag is the tag
that measures the volume of product within the equipment.
4. Using the current time and inventory tag, get the current volume of product
within the equipment.
5. Using the current date, the measurement tag, the flow tag and the current
volume, call PHD to determine how long it took to load the current volume into

22 • Uniformance Background Processing Descriptions User Guide


Production Management

the equipment. You may need to add to the change of volume using the
measurement tag, the volume that flowed out of the equipment, using the flow
tag, to determine the net volume that has flowed in during the time frame.
6. Find the connecting source equipment to the above equipment by searching the
Lineup Event table for the destination equipment over the time frame. If there is
no connection, go to step 2.
7. If the source equipment found in step 6 is a batch processing equipment for the
batch processed, update the start date using the date found in step 5.
8. If the source equipment is product processing equipment (attribute
PRODUCT_PRCSSNG) and the product of the batch is NULL, find the product
using one of the following methods:
• Get the tag defined through the Equipment Attribute Configuration form with
the attribute PRODUCT_TAG and get the product from the tag using the
date and time found in step 5.
• If the equipment does not have a PRODUCT_TAG attribute, get the active
instruction during the date found in step 5.
9. Using the source equipment as a destination equipment proceed to step 3.
10. Now that the start dates of the batch processing equipment are determined,
calculate the end dates.
11. Find all batch records where end date is between the time the program that was
last run and the current time.
12. Fetch the entry. If there are no more entries then exit the system.
13. Get each processing equipment record for the batch. Get the production run
name from the instruction active during the time frame of the processing
equipment record. Because there may be rounding errors in calculating the start
time of the processing equipment, is necessary to add an increment in time to
the start date in the case the start date falls into the previous production run.
This value is in hours and defined in the Value field of the equipment attribute
table, where the attribute is PRDCTNEV and optional.
14. From the production run get the volume percentage for the processing
equipment.
15. Multiply the volume percentage by the net batch quantity, and by using the
outlet flow tag where the equipment attribute OUTLETTAG, call PHD to find
out how long it took for the above volume to flow out of the equipment. The end
date is calculated by adding the time taken to flow out of equipment to the start
of the process.
16. Go to step 13.

Uniformance Background Processing Descriptions User Guide • 23


Production Management

Lot Tracing
The following is a flow diagram of the Lot Tracing background process. This process
runs once daily as part of the nightly processing.
Note: All flows and quantities are based on the material transfer records and cutoff
inventories. This application can then include manually entered product movements
that are not available automatically.

Gets the
process’s “Last Run Date”.

Adjusts the remaining quantity Gets each active Lot Tracing record and adjusts the total
for the active Lot Tracing entries. remaining quantity according to the Cutoff Inventory.

Locates all material transfer entries associated to the lot


Creates Lot usage entries. tracking equipment that has a start date greater than the
process’s “Last Run Date”. Then creates log usage entries
for lot records with a remaining quantity. Lot Usage records
will be applied to the oldest lots first.

Get the End Date. Gets the date of the last accounting period that a material
transfer for the lot has been processed.

Updates the
“Process’s Last Run Date”.

Tank Composition
For more information, refer to the Uniformance Tank Composition Tracking User
Guide.

24 • Uniformance Background Processing Descriptions User Guide


Plant Information Management

Plant Information Management

PHD to Relational
For more information, refer to the Uniformance Process History Database User
Guide.

Relational to PHD
For more information, refer to the Uniformance Process History Database User
Guide.

Database Synchronization
For more information, refer to the Uniformance Process History Database User
Guide.

Robust PHD Data Distribution


This background process (distribtophd.exe) sends tag information generated by
various applications in Uniformance, to PHD.
At regular intervals, entries written into the IP_DATA_DISTRIB_PENDING table
are picked up and sent to PHD. If errors occur while sending to PHD the appropriate
IP_DATA_DISTRIB_PENDING record is marked as being in error along with the
error message. An error message is also written to the message log (IP_MSG_LOG).
On subsequent process runs, robust PHD data distribution automatically tries to
resend records marked in error.

Configuration

This process must be configured in the Background Process Configuration form. For
complete details, see Application Server in this document.

Messaging

Messages are written to the Uniformance Message Log at various stages of


processing. The kinds of messages that are written depend on the message level
configured in the Background Process configuration form for robust PHD data
distribution.

Uniformance Background Processing Descriptions User Guide • 25


Plant Information Management

Sequence of Events

1. distribtophd is launched. This only happens once. After that the program is
continuous.
2. The program aborts if insufficient parameters are passed or if errors occur while
trying to process parameters.
3. A database connection is attempted - if it fails to connect, an error message is
written to standard output
4. The program sets up for a read of all non-sent records from
IP_DATA_DISTRIB_PENDING.
5. The program reads the next record from IP_DATA_DISTRIB_PENDING. If no
more data is present, resume at step 12.
6. If in a send to PHD error state, check if TAGNAME or DATETIME is same as
last read TAGNAME or TAGNAME. If this is the case, log message, mark
record as being in error and indicate the skip reason. Resume at step 10.
7. Get the datatype for TAGNAME from PHD. Log the error message if an error is
encountered. Mark the record as being in error with the appropriate PHD error
message. Resume at step 10.
8. Send to PHD in two steps: phd_putdata() followed by phd_moddata(). Log the
error message if either fails. Mark the record as being in error with thee
appropriate PHD error message. Resume at step 10.
9. Mark the record as successfully sent.
10. Update the current record with success or failure status/message.
11. Return to step 5.
12. Delete all successfully sent records from IP_DATA_DISTRIB_PENDING.
13. Disconnect from the Oracle database.
14. Wait for X seconds where X represents the frequency in seconds.
Repeat from step 3.
If any fatal Oracle errors are encountered, the program displays the Oracle error
message (to standard output) and aborts.

26 • Uniformance Background Processing Descriptions User Guide


Operations Management – Alarm and Event Monitoring

Operations Management – Alarm


and Event Monitoring

The Alarm and Event Monitoring background process monitors for changes in tags.
When a change of state or value is detected, the process executes the tasks configured
for the alarm or event. There are two separate background processes, one for each
function.

Alarm Monitoring
For Alarm Monitoring, only on/off state value changes are monitored. Typically a
virtual tag is created that contains the logical evaluation of other process tags and the
virtual; tag returns either an on or an off result.
1. Get the last run date and time for the Alarm Monitoring process from the
Process Last Run table.
2. Select all active alarm log configuration entries.
3. Query PHD for an ON condition since the last run date for the alarm tagname.
4. If an ON state is detected during the period, the actions performed are based on
the alarm configuration options that can:
• automatically set PHD (and DCS tags if properly configured) tags
• send messages to printers or files
• set additional configuration options to define how long the alarm must occur
for before it is deemed to be detected
• set how often the alarm is rebroadcast
• set the alarm ended message

Uniformance Background Processing Descriptions User Guide • 27


Operations Management – Alarm and Event Monitoring

Event Monitoring
Event Monitoring can detect either on/off state value changes or changes in tag
values. Be careful when monitoring for changes in tag value. The tag is not expected
to contain a new value with every reading. This results in an event log entry for every
change in value, which may be every scan. Typically in this situation, virtual tags are
created to return distinct values for ranges of values for the scan tag. The virtual tag
value likely change less frequently and if configured properly identify the significant
changes the user is monitoring for.
Event monitoring does not alarm or notify users of detected events.
1. Get the process last run date and time for the Event Monitoring process from the
Process Last Run table.
2. Select all active event log configuration entries with event Type S (switch).
Select the last entry in the event log table and use the event end date (or start
date if end date is null) to determine the query start time. (If there are no entries
in the Event Log table, use the process last run date.) Query PHD using the
event tagname for an ON condition since the start date and time as determined
above. If an ON condition is detected, insert an entry into the event log with the
event name and the start time for the ON condition. If that event also turned
OFF to zero during the period, update the entry end time to be the time the event
went to OFF.
3. Select all active event log configuration entries with event type V (value) and
the get last stored value for the event tag from the Event Log table. If there is no
entry in that table, this is a new entry that uses the value NULL. Query PHD
(read raw to get only the changes and the actual times and dates of the changes)
for the values for the event tag since the process last run date. If there is no entry
in the Event Log table, insert one with the first value returned and the start date
and time for that first value. Compare the next value returned, if different update
the current (no end time and date) entry with the next value time and date and
insert a new entry with the new value and that time and date as the start time and
date. Repeat until all entries returned from the PHD query have been processed.

28 • Uniformance Background Processing Descriptions User Guide


Production Planning

Production Planning

Production Run Planning


The Production Run Planning background processing executes periodically to update
the production run schedule item status and to generate or issue operating
instructions.
1. Select the production run schedule items that currently have the status A
(active). If the current time is greater than the (estimated) schedule end date, set
the status to C (completed).
2. Select the production run schedule items that have status I (issued). If the
current time is greater than the scheduled start date and time, set the status to A
(active).
3. Select the production run status items that have a start date and time greater than
the current date and time. If the start date and time is less than the current date
and time plus 36 hours:
• For each production run schedule item detail step, insert an entry into the
schedule activation table for the instruction template and the (sample)
group template with the scheduled (production run) start date.
• Update the production run schedule item to I (issued).
4. Select the production run status items with a start date and time greater than the
current date and time. If the status A (agreed to) and the start date and time is
greater than the current date and time plus 36 hours, and less than the current
time and date plus 7 days, set the status to F (fixed).

Uniformance Background Processing Descriptions User Guide • 29


Recipe Management

Recipe Management

Recipe Synchronization
It is possible to copy recipes from a local (sending) Uniformance Recipe
Management system to a remote (receiving) Uniformance Recipe Management
system.
The following is a list of functionality that the Recipe Synchronization performs:
• Recipes are selected on the sending system to be copied to the receiving system
For details, see Recipe Synchronization in the Form within this document.
• Recipes are synchronized via a background process configured to run at regular
intervals. For more information on arranging parameters for this process, see
Recipe Synchronization.
• Recipes that already exist in the receiving system are replaced.
• Recipes that do not exist in the receiving system are created.
• Recipes that exist in the receiving system which do not exist in the sending system
are unaffected.
• For each synchronized recipe, all Fixed Plant Databook support data is created for
that recipe. This includes: equipment, equipment group and equipment attribute
information, product, product specification and product attribute information,
property information, lookup type, and lookup value information.
• After the successful synchronization of a recipe, the changes are committed in the
receiving database and processing continues with the next recipe identified for
synchronization.
• After an unsuccessful recipe synchronization, the changes are rolled back in the
receiving database and processing continues with the next recipe identified for
synchronization. That is, partially synchronized recipes are not created.
Notes:
• The receiving system must be the same version as the sending system for recipe
synchronization to begin.
• In order for a recipe to be successfully synchronized, the tags within the recipe
must be defined in the destination system. If this is not the case, the recipe is not
synchronized.

Uniformance Background Processing Descriptions User Guide • 31


Recipe Management

Configuration
The Recipe Synchronization function is designed to be run as a regularly scheduled
background process.
The following is the Background Processes form showing an example of the
configuration needed for the Recipe Synchronization process:

32 • Uniformance Background Processing Descriptions User Guide


Recipe Management

Messaging

Messages are written to the Uniformance Message Log in the sending database at
various stages of the synchronization process. At minimum, the following messages
are written to the background process status log and can be viewed on the
Background Process Configuration form:
• Recipe synchronization start.
• Recipe synchronization end.
There are a variety of debug level messages that can be written to the Uniformance
Message Log. These messages are only written if the Recipe Synchronization
background process is configured with a message level of 6 (debug).
• Failure to connect the receiving database.
• Successful synchronization of a recipe.
• Failure to synchronize a recipe (plus reason for failure).

Uniformance Background Processing Descriptions User Guide • 33


Recipe Management

Details
The following sections explain the data elements copied from the sending system to
the receiving system.

Recipe Header Section

Data Element Description

Recipe Name If there is a recipe in the receiving system with the same name,
replace the record from the sending system.
Description Copied straight across. No verification is performed.
Equipment Based on equipment configuration with an attribute of EQUIP and
YIELD or RECIPE. The required equipment record and attributes is
created based on the sending system configuration.
Mode Based on the equipment configuration with an attribute of YIELD or
RECIPE and the equipment group configuration with a hierarchy type
of MODE. The required equipment, equipment attributes, and
equipment group records are created based on the sending system
configuration.
Product Based the product configuration with active products. If a
specification is defined for this product, it should also have an
attribute of SMPL. The required product and product attribute records
are created based on the sending system configuration.
Specification Name Based on product specification configuration. The product
specification header record is created based on the sending system
configuration.
Entered by Copied straight across. No verification is performed.
Active Copied straight across. No verification is performed.
Revision Date Copied straight across. No verification is performed.
Notes Copied straight across. No verification is performed.

34 • Uniformance Background Processing Descriptions User Guide


Recipe Management

Recipe Detail Section

Data Element Description


Seq Copied straight across. No verification is performed.
Tag Based on tag configuration for active tags. If the active tag does not
exist in the receiving system, report in sending system Uniformance
Message Log, rollback, and continue processing with next recipe.
Property Based on property configuration for active properties. The property
record is created based on the sending system configuration.
Formulation Based on products configuration for active products. The product record
is created based on the sending system configuration.
Description Copied straight across. No verification is performed.
Sample Point Based on equipment configuration with an attribute of SMPLPNT, and
equipment group configuration with a hierarchy type of SMPLPNT. The
equipment, equipment attributes, and equipment group records are
created based on the sending system configuration.
Units Copied straight across. No verification is performed.
Target Copied straight across. No verification is performed.
Target Min Copied straight across. No verification is performed.
Target Max Copied straight across. No verification is performed.
Control Tag Based on tag configuration for active tags. If the active tag does not
exist in the receiving system, report in sending system Uniformance
Message Log, rollback, and continue processing with next recipe.
Target Min Tag Based on tag configuration for active tags. If the active tag does not
exist in the receiving system, report in sending system Uniformance
Message Log, rollback, and continue processing with next recipe.
Target Max Tag Based on tag configuration for active tags. If the active tag does not
exist in the receiving system report in sending system Uniformance
Message Log, rollback, and continue processing with next recipe.
Blend Copied straight across. No verification is performed.
Blend Min Copied straight across. No verification is performed.
Blend Max Copied straight across. No verification is performed.
Blend Tag Based on tag configuration for active tags. If the active tag does not
exist in the receiving system, report in sending system Uniformance
Message Log, rollback, and continue processing with next recipe.
Blend Min Tag Based on tag configuration for active tags. If the active tag does not
exist in the receiving system report in sending system Uniformance
Message Log, rollback, and continue processing with next recipe.
Blend Max Tag Based on tag configuration for active tags. If the active tag does not
exist in the receiving system report in sending system Uniformance
Message Log, rollback, and continue processing with next recipe.

Uniformance Background Processing Descriptions User Guide • 35


Recipe Management

Formulation Detail Section

36 • Uniformance Background Processing Descriptions User Guide


Recipe Management

Formulation Section (Components)

The following fields appear on the Formulation Detail section of the Recipe
Management form:
Field Description

Material Based on product configuration with products that are active. A product
record is created based on the sending system configuration.
Units Based on lookup value configuration with:
• a lookup type of FORMULA_UNIT

• a lookup value configuration with a lookup type of UNITS

• lookup group configuration with a lookup group of UNITS

• a lookup type of FORMULA_UNIT

The lookup type and lookup value records are created based on the
sending system configuration.
Target Copied straight across. No verification is performed.
Target Min Copied straight across. No verification is performed.
Target Max Copied straight across. No verification is performed.
Type Based on lookup value configuration with a lookup type of COSTTYPE.
The COSTTYPE lookup type record and the lookup value record are
created based on the sending system configuration.
Factor Copied straight across. No verification is performed

Formulation Section (Produced)

The following fields appear on the Formulation Detail section of the Recipe
Management form:
Field Description

Material Based on product configuration with products that are active. A product
record is created based on the sending system configuration.
Units Based on lookup value configuration with:
• a lookup type of FORMULA_UNIT

• a lookup value configuration with a lookup type of UNITS

• a lookup group configuration with a lookup group of UNITS

• a lookup type of FORMULA_UNIT

The lookup type and lookup value records are created based on the sending
system configuration.
Target Min Copied straight across. No verification is performed.
Target Max Copied straight across. No verification is performed.

Uniformance Background Processing Descriptions User Guide • 37


Recipe Management

Field Description

Type Based on lookup value configuration with a lookup type of COSTTYPE. The
COSTTYPE lookup type record and the lookup value record is created based
on the sending system configuration.
Factor Copied straight across. No verification is performed.

Sequence of Events
The background process is started with (at least) 3 parameters: source (sending)
database connection string, destination (receiving) database connection string, and
process name.
For example, -src user/password @ LOCALDB -dest user / password @
REMOTEDB. -pn "RECIPE SYNC".
A fourth parameter, /debug, is optional.
If present, debugging information is provided to standard output (in addition to any
message logging taking place). The database connection strings must contain at least
a slash ( / ), an at sign (@), and a database alias, for example, /@ dbalias.
The username and password are optional. If not supplied, the WindowsNT username
running the process connects to Oracle (prefixed with whatever
OS_AUTHENT_PREFIX is configured at the database - the default is OPS$). The -
pn (process name) parameter must match up with a process name in the TPI's
Background Process Configuration form. Passing the process name facilitates the
configuration of more than one recipe sync process.
1. The background process connects to both source and destination databases. If
the source database connection fails, an error message is written to standard
output and the program exits with a –1 return code. If the destination database
connection fails, write error message to source database message log and status
log indicating the failure. Exit program with a –1 return code.
2. A status message is written to source database indicating that the process
started.
3. Get version from both source and destination database. Ensure the versions are
the same. If not, write an error message to message log and a status message
(both to source database) indicating the error and exit program with a –1 return
code.
4. Move the cursor to read all recipes awaiting synchronization (source database).
5. The next recipe is read from all recipes awaiting synchronization.
6. If there are no more recipes to read, the system continues processing at step 15.

38 • Uniformance Background Processing Descriptions User Guide


Recipe Management

7. Verify with the destination system that the recipe can be synchronized. The
following condition must be present:
All tags within the recipe exist in the destination system. If any of the conditions
are not met the current recipe is not synchronized. A message is written to the
error log and a status message is written indicating the failure to synchronize the
recipe. A ROLLBACK occurs and the system continues processing at step 6.
8. Check if the recipe exists in destination system.

9. If not, create the following records in destination database.

Note: For records that already exist, duplicate key errors occur. These errors are
ignored and error messages are not generated. Processing is allowed to continue
unhampered.
Using the Recipe Header Information
• Create equipment record for given equipment.
• Create equipment attributes record(s) for given equipment.
• Create equipment record for given mode.
• Create equipment attribute record(s) for given mode.
• Create equipment group record(s) for given mode.
• Create product record for given product.
• Create product attributes for given product.
• Create recipe record - copy of the source.

Using Recipe Detail Information


• Create property record(s) for given property.
• Create product record(s) for given formulation.
• Create equipment records(s) for given sample point.
• Create equipment attribute records(s) for given sample point.
• Create equipment group record(s) for given sample point.
• Create recipe detail record(s) – copy of source record(s).

Uniformance Background Processing Descriptions User Guide • 39


Recipe Management

Using Recipe Component Information


• Create product record(s) for given product.
• Create lookup type record(s) for given unit.
• Create lookup record(s) for given unit.
• Create lookup type record(s) for given type.
• Create lookup record(s) for given type.
• Create recipe comp record(s) – copy of source record(s).

Using Recipe Produced Information


• Create product record(s) for given product.
• Create lookup type record(s) for given unit.
• Create lookup record(s) for given unit.
• Create lookup type record(s) for given type.
• Create lookup record(s) for given type.
• Create recipe produced record(s) – copy of source record(s).
10. If recipe does exist, perform the same steps as defined in step 10 with the
following exceptions: For those recipes, details, components, and products that
do exist in the destination database, perform the following:
• Update recipe record - copy of the source.
• Delete all recipe detail record(s), create recipe detail record(s) – copy of
source record(s).
• Delete all recipe component record(s), create recipe components record(s) –
copy of source record(s).
• Delete all recipe produced record(s), create recipe produced record(s) – copy
of source record(s).
Note: The creates for non-recipe records check whether the record already
exists in the remote database. If the record exists, the create is not performed
and errors are not generated. Update the sending system Recipe Pending
Synchronization reference as synchronized. This indicates that the recipe is
sync'd and can be deleted. At this point the recipe no longer appears in the
recipe synchronization recipes pending synchronization list.

40 • Uniformance Background Processing Descriptions User Guide


Recipe Management

11. If recipe synchronized successfully, that is, all steps performed without error, the
transaction is committed and processing continues at step 6. A transaction is
defined as the unit of work comprising the recipe, recipe detail, recipe
components, recipe produced, equipment, equipment attributes, equipment
groups, products, product attributes, lookup type and lookup records inserted or
updated during the synchronization of a recipe. Only after a recipe is completely
synchronized with the destination database can a COMMIT be issued.
12. If a serious error occurs during the synchronization of a recipe, the transaction
must be rolled back, further processing ceases, error messages are written to
message log, and status log and the program exits with a -1 (failure) return code.
If the error is due to a recipe check failure, that is, the recipe cannot be
synchronized due to failure to meet sync criteria, further processing is allowed to
continue with the next recipe awaiting synchronization.
13. After all recipes are synchronized, delete recipes awaiting synchronization that
successfully synchronize. This does not mean remove the recipes, rather, remove
the recipe from the recipes pending synchronization list on the Recipe
Synchronization form. Commit the deletes when complete.
14. A status message is written to source database indicating that the process has
ended.
15. Disconnect from both databases and exit with 0 (success) return code.

Uniformance Background Processing Descriptions User Guide • 41


Operations Monitoring – Shift Summary Background Process

Operations Monitoring – Shift


Summary Background Process

Shift Summary Auto Processing


At the end of a shift, a background process populates shift summary information
based on configuration in the Shift Area Report Labels and Shift Report
Configuration forms. Operators can review shift summary information after the
background process runs through the Shift Summary Review form. You can update
values through this form and then produce shift end Excel reports.

Configuring Tag Values to Retrieve from PHD


The Shift Area Report Labels form configures the reduction type and tag values to
retrieve from PHD with the background process each shift.
The reduction type field in this form specifies the type of reduction used. Valid
entries are Average, Min, Max, Snapshot and Total. Total is the last value for the tag
for a shift. The Reporting Tag field specifies the tag retrieved by the background
process.
The Shift Report Configuration form identifies labels (defined in Shift Area Report
Labels) to be included in reports. Based on information provided in this form, the
background process inserts PHD values into the database. You can then use the Excel
Reporting tools for reporting.

Uniformance Background Processing Descriptions User Guide • 43


Operations Monitoring – Shift Summary Background Process

Overview of the Shift Summary Background Process


The following are the steps performed in the Shift Summary Background process:
1. Get the length of the shift from the lookup table where the lookup name =
SHIFTLENGTH.
2. Get the latest shift start date and time for which this was run. If it has not been
run, run it for the last full shift.
3. Get the last full shift start date and time.
4. Get the shift end date and time.
5. Get all records to be processed as configured in the Shift Area Report labels
Configuration form.
6. Get all the tag information from PHD using the shift start date and time and shift
end date and time to filter the tag information received.
7. Calculate the reductions for all of the tags as configured in the Shift Area Report
Labels form.
8. Insert processed information into the Shift Report Result table.

Operating Instruction Scheduling


The Operating Instruction Scheduling background processing executes periodically
to log operating instructions entered and activated in the Schedule Activation table.
1. Select entries with a NOT NULL instruction template and a NULL instruction
scheduled flag with a start time less than the current time plus 36 hours.
2. Insert the operating instruction and operating instruction detail into
IP_INSTRCTN and IP_INSTRCTN_DETAIL tables. Set the authorized flag to
on and set the autorized by field to SCHEDULER.
Note: This allows the inserted instruction to be viewed by both the Instruction
Authorization form and the Operating Instruction (operators) form. The
scheduled start date and time are set to the schedule activation start time.
3. The schedule activation entry has the instruction scheduled flag enabled (X)
following the successful completion of the operating instruction setup.

44 • Uniformance Background Processing Descriptions User Guide


Application Management

Application Management

Windows Report Scheduling


The Windows Report Scheduler executes any report within the application at a
specific time. The Report Schedule Configuration form configures the report
parameters such as execution frequency, the desired local/network printer, and
e-mails the report to specific users.
The Report Scheduler form allows any workstation to act as the report scheduler
providing the scheduler is not currently active on another workstation. The scheduler
reads the schedule configuration information to determine when to execute a report,
and actions after a report is complete.
The report scheduler processing steps include:
1. The report scheduling algorithm operation begins at a periodic frequency
specified by the Execution Frequency field in the Report Scheduler form.
2. If the scheduling is active and executing on the running PC, the scheduling
process continues. Otherwise, the scheduling process and periodic execution is
stopped.
3. If the Notify When Schedule Executes field on the Report Scheduler form is
checked, a notification message is displayed. Depending on your response,
scheduling continues, is postponed by a selected amount, or stops.
4. If scheduling is not stopped or postponed, the system queries for all active
scheduled reports.
5. The system determines if each report is executed by examining the start and end
dates, the active flag, recurring flag, and recurring interval. The system retrieves
the report query parameters, for each scheduled report executed on or prior to
the current time.
6. The specified report is called to execute the report. The report is passed to the
printer name, e-mail address, and report query parameters.
7. The system executes the report using the query parameters supplied. The output
is sent to the printer or the e-mail address(es) with the specified e-mail note.
8. The system updates the last scheduled report date for the report schedule
configuration entry.
9. Repeat from step 5 until all scheduled reports are processed.
10. The system updates the last logged date in the Report Scheduler form.

11. The system ends operation for the period indicated in the Report Scheduler form
and then resumes at step 1.

Uniformance Background Processing Descriptions User Guide • 45


Application Server

Application Server

Required Background Processes


The MSGLOGSERVER background process must be enabled to ensure that all
application background processes are started. For details on enabling
MSGLOGSERVER, see Parameters for Background Processes in this document.
Other processes rely on the presence of MSGLOGSERVER to perform properly.
When the NT scheduler service shuts down, the scheduler searches for a process with
this specific name of MSGLOGSERVER, and reserves this process to shut down last.
This ensures that other processes can exit smoothly while being served by
MSGLOGSERVER. For this facility to work correctly, do not change the name the
MSGLOGSERVER process.

Parameters for the Background Processes


The application server, also known as the background process scheduler, reads the
information entered using the Background Processes form to produce an execution
string and dispatch the appropriate processes with their respective arguments.
Two types of parameters may be defined for each background process depending on
the type of process and how it is developed: command line parameters used by
executables, cmd or bat files. These parameters may be positional or could be
command line switches typically used by executables. When these parameters are
defined, it is mandatory to also enter a value for the Seq (sequence) field. This
notifies the scheduler that the parameter is a command line argument and a part of the
execution string.
A sequence also defines the relative position of the parameter in the command line,
not a physical one. This means that a value of 2 does not imply that the parameter is
the second on the command line. It would only be true if another parameter has a
sequence value of less than 2. Therefore, order the parameters based on sequence
ordering from the lowest value to the highest.
The second type of parameters are those accessed on demand by background
processes. There are several executable background processes that read the value of
the parameter versus receiving it as a command line argument. This is the only
mechanism to supply user-defined parameters for PL/SQL programs.
The most important parameter is the CONNECT_STRING parameter, since the
majority of the background processes expect the connection string so they can
connect to Oracle. The value of this string is the actual string for the connection, if
left empty, the scheduler fills this argument position with its default connection
string. The sequence number is mandatory and specifies the relative position of the
connection string on the command line.

Uniformance Background Processing Descriptions User Guide • 47


Application Server

Some applications can be configured using switches instead of or in addition to


normal positional arguments. The parameter CMDLINE_SWITCHES specifies the
command line switches. The scheduler does not insert double-quotes around the
value of CMDLINE_SWITCHES to ensure the individuality of the switches.
Application Process Name Program Exec Description
Type Type

General MSGLOGSERVER DB Proc C Message/Error log server.


Mandatory Executes continuously and
is mandatory.
General PURGE BACKGRND DB Proc T Purge the status messages
Mandatory PROCESS STATUS generated by the
background processes.
General PURGE INTERFACE DB Proc T Purges Interface Data. This
Mandatory DATA data can be viewed through
the Interface Status and
Review form of Applications
Management.
General PURGE LIME REDO DB Proc P Purge LIMS redo log.
Mandatory LOG
General PURGE MESSAGE DB Proc T Purge the Message Log
Mandatory LOG DATA data. This data is viewed
with the Message Log form
in Applications
Management.
General REL_TO_PHD OS C Relational to PHD.
Mandatory Program
General PRBUST PHD DATA OS C Robust PHD Data
Mandatory DISTRIBUTION Program Distribution (send to PHD).
Alarm & ALARM MONITORING OS P Alarm monitoring process.
Event Program
Monitoring
Alarm & EVENT MONITORING OS P Event Monitoring Process.
Event Program
Monitoring
Batch BT BATCH TRACKING OS P Batch Tracking background
Tracking Program process. Performs
automated detection and
creation of batches.
Blend BLEND MANAGEMENT DB Proc P Blend Management
Management Interface.
Blend BLEND MGMT PHD OS P Blend Management PHD
Management CHARACTERISTICS Program Characteristics generator.
Blend BM INTERFACE FILE OS P Blend Management
Management LOADER Program Interface file loader.
General INTERFACE DATA OS P Generic data file loader
FILE LOADER Program configuration. It can be
customized for each
individual interface
requirement or all
interfaces.

48 • Uniformance Background Processing Descriptions User Guide


Application Server

Application Process Name Program Exec Description


Type Type

LDI LDI LAB DATA OS P Lab data integrator


INTEGRATOR Program interface (LDI).
LIMS SAMPLE SCHEDULING OS P Sample Scheduling.
Program
Operating PRODUCT DB Proc P Product movement
Events MOVEMENT IFC interface.
Operating PRODUCT OS P Product Movement
Events MOVEMENT Program scheduling.
SCHEDULING
Operating AUTO INSTRUCTION OS P Detection and creation of
Instructions CREATION Program operating instructions
based on PHD switch tag
values.
Operating INSTRUCTION OS P Instruction Scheduling.
Instructions SCHEDULING Program
Operations LIMITSET REFRESH DB Proc P Insert limit set information
Management into IP_RELTOPHD upon
effective date time.
Operations RECIPE DOWNLOAD OS C Recipe Download.
Management Program
Operations OPERATIONS OS P Operations Monitoring
Monitoring MONITORING Program process.
PHD EVENT JOURNAL OS P Event Journal.
Program
PHD PHD_TO_REL OS P PHD to Relational.
Program
PHD TAG OS T Tag Synchronization.
SYNCHRONIZATION Program
PHD & LIMS EXTRACT OS P PHD, LIMS and PHD/LIMS
SCHEDULING Program Extract Scheduler.
Production PA AUTO OS P Production Accounting
Accounting REPROCESS Program automated reprocessing of
an accounting day.
Production PRODUCTION OS P Production Run schedule
Run SCHEDULE Program generation.
Planning
Tank TANK COMPOSITION OS P Tank Composition
Composition Program Tracking.

Uniformance Background Processing Descriptions User Guide • 49


Application Server

Alarm Monitoring

Execution Statement:
Operating System Name: NT
Start Statement: op_alarm
Parameter Default Seq Parameter Value Description
Value Required Required
CONNECT_STRING 1 Yes No Database connection
string. If left NULL, the
Scheduler defaults it to
the account and database
that it connects with.

Auto Instruction Create

Execution Statement:
Operating System Name: NT
Start Statement: auto_create_instrctn
Parameter Default Seq Parameter Value Description
Value Required Required
CONNECT_STRING 1 Yes No Database connection
string. If left NULL, the
Scheduler defaults to
the account and
database that it
connects with.

50 • Uniformance Background Processing Descriptions User Guide


Application Server

Parameter Default Seq Parameter Value Description


Value Required Required
CREATE_IF_INVLD NO No No Controls whether
the Instruction is
created if validation
has failed, i.e. Limit
Set checking has
failed.

Valid values:

• NO – do not
create the
Instruction if
validation fails.
(default)

• YES – create
the Instruction
even if validation
fails.

DWNLD_IF_INVLD NO No No Controls whether


the Instruction
tag data is
downloaded to
PHD if validation
has failed, i.e.
Limit Set
checking has
failed.
Valid values:

• NO – do not
download to
PHD if validation
fails. (default)

• YES – download
to PHD even if
validation fails.

Uniformance Background Processing Descriptions User Guide • 51


Application Server

Blend Management Interface

Execution Statement:
Operating System Name: *
Start Statement: BlendMgmt.ProcessBlendData
Parameter Default Seq Parameter Value Description
Value Required Required
MSGLOG_DI No No Defines the directory name
R where the file containing
message log data is located.

MSGLOG_FIL No No File name containing message


E log data.

MSGLOG_FIL No No Valid Values:


EMODE
• A – Append messages to
the existing file.

• W – Replace the existing


log file.

All three parameters must be


defined to have message
logging enabled. The file and
directory specification must be
accessible by Oracle as the
database writes to the data file.

52 • Uniformance Background Processing Descriptions User Guide


Application Server

Blend Mgmt PHD Characteristics

Execution Statement:
Operating System Name: NT
Start Statement: BlendPHDCharacteristics
Parameter Default Seq Parameter Value Description
Value Required Required
CONNECT_STRING 1 Yes No Database connections string. If left
NULL, the Scheduler defaults to the
account and database that it
connects with.

PARAM2 Process name. In this case the


value must be BLEND MGMT PHD
CHARACTERISTICS.

OFFSET_DAYS Yes Yes This parameter added to the current


date is the starting time to select
updated blends that are subscribed
to and modified. The value must be
negative to go back in time, i.e., 1 is
one day ago.

Uniformance Background Processing Descriptions User Guide • 53


Application Server

BM Interface File Loader

Execution Statement:
Operating System Name: NT
Start Statement: IFC_FileLoader
Parameter Default Seq Parameter Value Description
Value Required Required
CONNECT_STRING 1 Yes No Database connection
string. If left NULL, the
Scheduler defaults to the
account and database
that connects with it.

PARAM2 2 Yes Yes Process Name. In this


case the value must be
BM INTERFACE FILE
LOADER.

DATA_DIR Yes Yes Identifies the directory


containing data files to
be processed.

DATA_FILESPEC Yes Yes Identifies the file name


spec that contains the
interface data. It can
support wildcards, such
as *.txt.

FAIL_DIR Yes Yes Name of directory where


data files are placed if
they fail to load into the
database.

PROCESSED_DIR Yes Yes Name of directory where


data files are placed
once loaded into the
database.

KEEP_DAYS 0 No No Keeps data files for the


specified number of
days. Files are deleted
immediately after the
data they contain is
stored.

54 • Uniformance Background Processing Descriptions User Guide


Application Server

BT Batch Tracking

Execution Statement:
Operating System Name: NT
Start Statement: Batch_Tracking
Parameter Default Seq Parameter Value Description
Value Required Required

CONNECT_STRING 1 Yes No Database connections


string. If left NULL, the
Scheduler defaults to the
account and database that
it connects with.

Event Journal

Execution Statement:
Operating System Name: NT
Start Statement: evt_jrnl
Parameter Default Seq Parameter Value Description
Value Required Required
CONNECT_STRING 1 Yes No Database connections
string. If left NULL, the
Scheduler defaults to the
account and database that
it connects with.

Uniformance Background Processing Descriptions User Guide • 55


Application Server

Event Monitoring

Execution Statement:
Operating System Name: NT
Start Statement: op_event
Parameter Default Seq Parameter Value Description
Value Required Required
CONNECT_STRING 1 Yes Yes Database connections
string. If left NULL, the
Scheduler defaults to
the account and
database that it
connects with.

Extract Scheduling

Execution Statement:
Operating System Name: NT
Start Statement: ext_sched
Parameter Default Seq Parameter Value Description
Value Required Required
CONNECT_STRING 1 Yes No Database connections
string. If left NULL, the
Scheduler defaults to
the account and
database that it
connects with.

56 • Uniformance Background Processing Descriptions User Guide


Application Server

Instruction Scheduling

Execution Statement:
Operating System Name: NT
Start Statement: SCHED
Parameter Default Seq Parameter Value Description
Value Required Required
EXEC_FREQ_HRS 1 Yes Yes Execution frequency of
the process in hours. It
must match the
configured execution
frequency that the
scheduler uses.

CREATE_AHEAD_HRS 2 Yes Yes The minimum number of


hours into the future that
records must be created
when the process
executes. The actual
number of hours of data
it creates into the future
is EXEC_FREQ_HRS +
CREATE_AHEAD_HRS.

SCHEDULE_TYPE 1 3 Yes Yes The value “I” identifies to


the program that
instructions are created

CONNECT_STRING 1 Yes No Database connection


string. If left NULL, the
Scheduler defaults to the
account and database
that it connects with.

Uniformance Background Processing Descriptions User Guide • 57


Application Server

Interface Data File Loader

Execution Statement:
Operating System Name: NT
Start Statement: IFC_FileLoader
Parameter Default Seq Parameter Value Description
Value Required Required
CONNECT_STRING 1 Yes No Database connections
string. If left NULL, the
Scheduler defaults to
the account and
database that it
connects with.

PARAM2 Yes Yes Process Name. In this


case the value must
be INTERFACE DATA
FILE LOADER.

DATA_DIR Yes Yes Identifies the directory


containing data files to
be processed.

DATA_FILESPEC Yes Yes Identifies the file name


spec that contains the
interface data. It can
support wildcards,
such as *.txt.

FAIL_DIR Yes Yes Name of directory


where data files are
placed if they fail to
load into the
database.

PROCESSED_DIR Yes Yes Name of directory


where data files are
placed once they are
loaded into the
database.

KEEP_DAYS 0 No No Keeps data files for


the specified number
of days. The files
delete immediately
after the data they
contain is stored.

58 • Uniformance Background Processing Descriptions User Guide


Application Server

LDI Lab Data Integrator

Execution Statement:
Operating System Name: NT
Start Statement: limstoqm
Parameter Default Seq Parameter Value Description
Value Required Required
CONNECT_STRIN 1 Yes No Database connections string. If
G left NULL the Scheduler defaults
to the account and database that
it connects with.

PARAM2 2 Yes Yes Process Name. In this case the


value must be LDI LAB DATA
INTEGRATOR.

CMDLINE_SWITC 3 No Yes -dn – Diagnostics level n 0-6


HES
• 0 – Error only

• 1 – Admin

• 2 – Warning

• 3 – Summary

• 4 – Information

• 5 – Detail

• 6 – Debug

-n – Enables Non-Numeric data


handling

-b – Enables user defined


business rules

-f – Enables record filtering


-t – Enables global property
translation

-s – Enables enternal sample


name synchronization

-p – Disables automated creation


of missing properties

-u – Disables use of ‘UNKNOWN’


template

-r – Use only the Unique


Reference for determining
Sample Templates. The default is
to use the concatenation of
Product and Unique Reference
for determining the Sample
Template.

-llogfile – Logfile name logfile

-hor -? - Help

Uniformance Background Processing Descriptions User Guide • 59


Application Server

LimitSet Refresh

Execution Statement:
Operating System Name *
Start Statement: OpMgmt.LimitSetLimitsToRelToPHD
No Parameters

MSGLOGSERVER

Execution Statement:
Operating System Name:*
Start Statement: MSGLOGSERVER
No Parameters

Operations Monitoring

Execution Statement:
Operating System Name:NT
Start Statement: op_mon
Parameter Default Seq Parameter Value Description
Value Required Required
CONNECT_STRING 1 Yes No Database connections
string. If left NULL the
Scheduler defaults to
the account and
database that it
connects with.

60 • Uniformance Background Processing Descriptions User Guide


Application Server

PA Auto Reprocess

Execution Statement:
Operating System Name: NT
Start Statement: auto_reprocess
Parameter Default Seq Parameter Value Description
Value Required Required
CONNECT_STRING 1 Yes No Database connections
string. If left NULL the
Scheduler defaults to the
account and database
that it connects with.

CMDLINE_SWITCHES No No • -d0 – Level 0


dianostics (errors only)

• -d1 – Level 1
diagnostics

• -d2 – Level 2
diagnostics (all
diagnostics)

• -llogfile – Logfile name


logfile

• -hor -? - Help

Uniformance Background Processing Descriptions User Guide • 61


Application Server

PA Nightly Processing

Execution Statement:
Operating System Name: NT
Start Statement: ip_nightly.cmd
Parameter Default Seq Parameter Value Description
Value Required Required
CMDLINE_SWITCHES 1 Yes Yes The parameter value must
have the following five
arguments typed on one
single line, separated by
spaces, and not enclosed
within quotes:

AUTO_PROCESS

LOT_TRACKING

NO

NO
user / password@
database

Use NO for the first


argument to not run
Setup_prc and Auto_prc.
Use NO for the second
argument to not run
Lot_tracking.

The third argument is


always NO.

The fourth argument is


always NO.

The fifth argument is the


connect string.

62 • Uniformance Background Processing Descriptions User Guide


Application Server

PHD_TO_REL

Execution Statement:
Operating System Name: NT
Start Statement: phd2rel
Parameter Default Seq Parameter Value Description
Value Required Required
INI_FILE 1 Yes Yes Name of ini file containing
configuration information
for the process.

Product Movement Interface

Execution Statement:
Operating System Name: *
Start Statement: ProdMoveIfc.ProcessInterfaceData
Parameter Default Seq Parameter Value Description
Value Required Required
MSGLOG_DIR No No Defines the directory
name where the file
containing message log
data is located.

MSGLOG_FILE No No File name containing


message log data.

MSGLOG_FILEMODE No No Valid values:

a – Append messages to
the existing file.

w – Replace the existing


log file.

All three of these


parameters must be
defined to have message
logging enabled. The file
and directory specification
must be accessible by
Oracle as the database
writes to the data file.

Uniformance Background Processing Descriptions User Guide • 63


Application Server

Product Movement Scheduling

Execution Statement:
Operating System Name: NT
Start Statement: sched
Parameter Default Seq Parameter Value Description
Value Required Required
EXEC_FREQ_HRS 1 Yes Yes Execution frequency of
the process in hours. It
must match the
configured execution
frequency the scheduler
uses.

CREATE_AHEAD_HRS 2 Yes Yes The minimum number of


hours into the future that
records must be created
when the process
executes. The actual
number of hours of data
it creates into the future
is EXEC_FREQ_HRS +
CREATE_AHEAD_HRS.

SCHEDULE_TYPE P 3 Yes Yes The value P identifies to


the program that product
movements are created.

CONNECT_STRING 1 Yes Yes Database connection


string. If left NULL the
Scheduler defaults to the
account and database
that it connects with.

64 • Uniformance Background Processing Descriptions User Guide


Application Server

Production Schedule

Execution Statement:
Operating System Name: NT
Start Statement: process_prod_sched
Parameter Default Seq Parameter Value Description
Value Required Required
CONNECT_STRING 1 Yes No Database connection
string. If left NULL the
Scheduler defaults to the
account and database
that it connects with.

Purge Background Process Status

Execution Statement:
Operating System Name: *
Start Statement: DataCleanUp.PurgeBackgroundProcessStatus
Parameter Default Seq Parameter Value Description
Value Required Required
KEEP_DAYS Yes Yes The number of days of
background process status
messages to keep in the
database. All records older
than the current time minus
the KEEP_DAYS are
deleted.

Uniformance Background Processing Descriptions User Guide • 65


Application Server

Purge Interface Data

Execution Statement:
Operating System Name: *
Start Statement: DataCleanUp.PurgeInterfaceData
Parameter Default Seq Parameter Value Description
Value Required Required
KEEP_DAYS Yes Yes The number of days
of interface data to
keep in the
database. All records
older than the
current time minus
the KEEP_DAYS are
deleted.

Purge LIMS Redo Log

Execution Statement:
Operating System Name: *
Start Statement: DataCleanUp.PurgeLIMSRedoLog
Parameter Default Seq Parameter Value Description
Value Required Required
KEEP_DAYS Yes Yes The number of days of LIMS
redo log data to keep in the
database. All records older
than the current time minus
the KEEP_DAYS are
deleted.

66 • Uniformance Background Processing Descriptions User Guide


Application Server

Purge Message Log Data

Execution Statement:
Operating System Name: *
Start Statement: DataCleanUp.PurgeMessageLogData
Parameter Default Seq Parameter Value Description
Value Required Required
KEEP_DAYS Yes Yes The number of days of
message log data to
keep in the database. All
records older than the
current time minus the
KEEP_DAYS are
deleted.

Uniformance Background Processing Descriptions User Guide • 67


Application Server

Recipe Download

Execution Statement:
Operating System Name: NT
Start Statement: Recipe_Download
Parameter Default Seq Parameter Value Description
Value Required Required
CONNECT_S 1 Yes No Database connections string.
TRING If left NULL the Scheduler
defaults to the account and
database that it connects
with.

PHD_HOST 2 Yes No PHD Host for Recipe


Download to connect to. If left
NULL the Scheduler defaults
to the host that it connects
with.

SCAN_FREQ 3 Yes No Time interval in seconds at


which Recipe Download
scans the request flag tag for
any download request. If left
NULL, a default scan interval
of 10 seconds is used.

PARAM1 4 Yes Yes Name of the tag that contains


the request flag. This tag
must be an integer tag.

PARAM2 5 Yes Yes Name of the tag that contains


the recipe name. This tag
must be a character tag.

PARAM3 6 Yes Yes Name of the tag that contains


the status error code. When
Recipe Download encounters
an error trying to download a
value into a tag, it reports the
error code into this tag. This
tag must be an integer tag.

PARAM4 7 Yes Yes Name of the tag that contains


the error message. When
Recipe Download encounters
an error trying to download a
value into a tag, it reports the
error message into this tag.
This tag must be a character
tag.

68 • Uniformance Background Processing Descriptions User Guide


Application Server

Parameter Default Seq Parameter Value Description


Value Required Required
PARAM5 8 Yes Yes Name of the tag that contains
the name of the error tag.
When Recipe Download
encounters an error trying to
download a value into a tag, it
reports the name of that tag
into this tag. This tag must be
a character tag.

PARAM6 9 Yes Yes Name of the process that this


session of Recipe Download
is configured to run under.
Errors and messages are
written to the message log
using this process name as
the entry name.

PARAM7 10 Yes No Name of equipment to limit


the recipe downloading from.

The following command line switches for Recipe Download can be used in lieu of the
parameters described above:

Parameter Default Seq Parameter Value Description


Value Required Required
CMDLINE_SWITCHES 11 No No -cs Connect_String

-ph PHD_Host

-ss 10 (Scan freq in


seconds)

-rqt Request_Flag_Tag

-rnt Recipe_Name_Tag

-est Error_Status_Tag

-emt Error_Message_Tag

-ett Error_TagName_Tag

-pn Process_Name

-eq Equipment_Name

Uniformance Background Processing Descriptions User Guide • 69


Application Server

Recipe Synchronization

Execution Statement:
Operating System Name: NT
Start Statement: recipe_sync
Parameter Default Seq Parameter Value Description
Value Required Required
CMDLINE_SWITCHES 1 Yes Yes Mandatory switches
–src user /pswd @
source_database

-dest user /pswd


@dest_database

-pn "<process name>"

<process name> must


match an entry in the TPI
Background Process form

Optional switch

-debug

Causes debug statements


to be printed to standard
output.

70 • Uniformance Background Processing Descriptions User Guide


Application Server

REL_TO_PHD

Execution Statement:
Operating System Name: NT
Start Statement: pipetophd
Parameter Default Seq Parameter Value Description
Value Required Required
CONNECT_STRING 1 Yes No Database connections
string. If left NULL the
Scheduler defaults to the
account and database that it
connects with.

PARAM2 2 Yes No The database pipename that


the program accepts data
from.

PARAM3 3 Yes No If value is DEBUG, the


process records debug
messages to the logfile for
the process.

Uniformance Background Processing Descriptions User Guide • 71


Application Server

Robust PHD Data Distribution

Execution Statement:
Operating System Name: NT (even if configuring for VMS!)
Start Statement: distribtophd
Parameter Default Seq Parameter Value Description
Value Required Required
CMDLINE_SWITCHES 1 Yes Yes Mandatory switches -cs user /
pswd @ database (database
connect string) / and
@database are required

-pn "<process name>"


(process name)

<process name> must match


an entry in the TPI
Background Process Form

Optional switches -sleep


<seconds> (sleep interval in
seconds) defaults to 300 if not
supplied

-ph <PHD host string> (PHD


host connect string) defaults
to environment variable
setting if not supplied.

PHD_NAPI (for VMS)

PHD_HOST (for others)

/DEBUG (debug flag) causes


'debug' statements to be
written to standard output.

72 • Uniformance Background Processing Descriptions User Guide


Application Server

Sample Scheduling

Execution Statement:
Operating System Name: NT
Start Statement: sched
Parameter Default Seq Parameter Value Description
Value Required Required
EXEC_FREQ_HRS 1 Yes Yes Execution frequency
of the process in
hours. It must match
the configured
execution frequency
that the scheduler
uses.

CREATE_AHEAD_HRS 2 Yes Yes The minimum number


of future hours that
records must be
created when the
process executes.
The actual number of
hours of data created
in the future is
EXEC_FREQ_HRS +
CREATE_AHEAD_H
RS.

SCHEDULE_TYPE S 3 Yes Yes The value S identifies


to the program that
samples are created.

CONNECT_STRING 1 Yes No Database connection


string. If left NULL,the
Scheduler defaults to
the account and
database that it
connects with.

Uniformance Background Processing Descriptions User Guide • 73


Application Server

Tag Synchronization

Execution Statement:
Operating System Name: NT
Start Statement: tagsynx
Parameter Default Seq Parameter Value Description
Value Required Required
CONNECT_STRING 1 Yes No Database connections
string. If left NULL, the
Scheduler defaults to
the account and
database that it
connects with.

DEBUG 0 2 Yes Yes A number specifying


level of messages to be
printed.

• 0 – Errors

• 1 – Summary

• 2 – Information
(default)

• 3 – Detailed logging

• 4 – Debug level
(content varies)

PARAM3 0 3 Yes Yes Optional flag indicating


to run in preview mode
if non-zero (default ). In
this mode, no
modifications are made
to the database. A file
tab-delimited
tagsync_preview. Data
is created which shows
old and new values for
all tags which would be
updated. This file can
be reviewed in Excel
before scheduling
tygsync on a daily
basis.

PARAM4 NOW 4 Yes Yes Time string (dd-mon-yy


hh:mi:ss) used for data
query.

74 • Uniformance Background Processing Descriptions User Guide


Application Server

Tank Composition

Execution Statement:
Operating System Name: NT
Start Statement: tank_comp
Parameter Default Seq Parameter Value Description
Value Required Required
CONNECT_STRING 1 Yes No Database connections
string. If left NULL, the
Scheduler defaults to the
account and database
that it connects with.

Uniformance Background Processing Descriptions User Guide • 75


Application Server

Event-Driven Applications

Event-Driven Scheduler

The application scheduler must subscribe to events to run applications when events
occur. Pending events are created by TotalPlant Information based on the event
subscription data when events are logged by the event monitoring application. The
application server checks for any pending events in the queue every minute. If it finds
an event and if that event is configured to run a process, the application server sets
the parameters of that process to the information found in the event before launching
the process. The process must be configured as an event-driven process, by setting its
execution type to E in the Background Processes form. The parameters that are set
include:
Parameter Value

PARAM1 Event name

PARAM2 Event value

PARAM3 Event start date and time

PARAM4 Event end date and time

Once the parameters are set, the application server schedules the process to run
immediately. If the application server is busy handling other processes, it schedules
this event-driven process to run at the earliest time possible, after it finishes the
managing of the other currently active processes.
The four parameters above are set without any sequence number, and therefore are
not passed to the process as command line arguments. The event-driven background
application extracts them from the database, and translates them to any meaningful
variables internally.
The pending event in the queue is then removed, whether it is configured to run a
process or not.

76 • Uniformance Background Processing Descriptions User Guide


Application Server

Event Subscription Details

A background process subscribing to an event can be notified when the event starts
or ends, or both. The notification mechanism is via a pending event, that is, a record
for the subscribing background process is inserted into the IP_EVNT_PENDING
table whenever the Event Log data for the event it is subscribing to changes. This
entry contains the following information:

IP_EVNT_PENDING Table

Entry Description

ID_NO System-assigned unique identifier of the record.


PROCESS_NAME The subscribing background process name.
EVNT_NAME The event subscribed to. The event for which data in the event log
changed.
VALUE The value of the tag associated with the event.
START_DT_TM The start date and time of the event.
END_DT_TM If this is the start of the event, this column is null.
If this is the end of the event, this column contains the end date and
time of the event.
INSERT_DT_TM The date and time this record was inserted.

The subscribing background process periodically scans the pending event table for its
notifications, and purges the event pending record once it performs its task and no
longer requires the record.
For Example:
1. Event Subscription:
The Application Scheduler subscribes to the start of the event ANEVENT.
Background Process Event Name Event Status

Application Scheduler ANEVENT Start

Uniformance Background Processing Descriptions User Guide • 77


Application Server

2. Pending Event:

When ANEVENT occurs the pending event record is created.


Entry Description

ID_NO 1
PROCESS_NAME APPLICATION SCHEDULER
EVNT_NAME ANEVENT
VALUE 1
START_DT_TM 1999/03/31 10:00
END_DT_TM null
INSERT_DT_TM 1999//03/31 10:00

3. Processing on Event:

Application Scheduler examines the Pending Event table for records having
PROCESS_NAME of APPLICATION SCHEDULER. When this record is
found, the Application Scheduler runs the background process specified on the
event log configuration record for ANEVENT, and then deletes this pending
event record.

Package and Stored Procedure


If a new package or stored procedure is created to be run by event-driven processes,
ensure the following (assuming that OPS$TOTALPLANT is the Oracle user):
OPS$TOTALPLANT has EXECUTE permissions on the new package or procedure:
GRANT EXECUTE ON <PACKAGE> TO IPC.USERS;
GRANT EXECUTE ON <PROCEDURE> TO IPC.USERS;
or run build_grant_exec.sql again.

Create public synonym for the new package or procedure:


CREATE PUBLIC SYNONYM <PACKAGE> FOR
TOTALPLANT.<PACKAGE>;
CREATE PUBLIC SYNONYM <PROCEDURE> FOR
TOTALPLANT.<PROCEDURE>;
or run bldsyn.sql again.

For example, if a new package called TEST_PKG inserts into a table called
TEST_TABLE, you need to complete the following in SQL*PLUS:
GRANT EXECUTE ON TEST_PKG TO PUBLIC.
CREATE PUBLIC SYNONYM TEST_PKG FOR TOTALPLANT.TEST_PKG

78 • Uniformance Background Processing Descriptions User Guide


Application Server

Use TPI Admin to configure security on the TEST_TABLE for a role used by
OPS$TOTALPLANT.

Uniformance Background Processing Descriptions User Guide • 79


Index

batch creation
Batch Tracking background processes 20
Index batch remaining
Batch Tracking background processes 22
Batch Tracking
background processes 19
Batch Creation 20
A Batch Remaining 22
Alarm Monitoring Lineups 19
background processes 27 Production Events 20
background processes parameters 50 Update Batch Procesing Equipment Times 22
Application Management – Windows Report Blend Management Interface
Scheduling background processes parameters 52
background processes 45 Blend Management PHD Characteristics
Application Server background processes parameters 53
background processes 47–78 BM Interface File Loader
Event Driven applications 76–78 background processes parameters 54
Package and Store procedure 78 BT Batch Tracking
parameters 47–75 background processes parameters 55
required background processes 47
Auto Instruction Create C
background processes parameters 50
configuration
auto processing
Recipe Management background processes 32
Operations Monitoring - Shift Summary
robust PHD data distribution 25
background processes 43
configuring tag values to retrieve from PHD
B Operations Monitoring - Shift Summary
background processes 43
Background Processing Cutoff Inventory Product Update
Application Management – Windows Report Production Management - Production
Scheduling 45 Accounting/Costing 14
Application Server 47–78
introducing 7 D
Operations Management – Alarm and Event
database synchronization
Monitoring 27–28
background processes 25
Operations Monitoring – Shift Summary 43–44
details, adding
Plant Information Management 25–26
Recipe Management background processes 34
Production Management 19–24
Production Run Planning 29
E
Quality Management - LIMS QM 9–10
Quality Management – Production Management Event Driven applications
– Production Accounting/Costing 11–18 Event Driven Scheduler 76
Recipe Management 31–41 Event Subscription Details 77

Uniformance Background Processing Descriptions User Guide • 81


Index

Event Driven applications (cont.) L


for Application Server background processes 76–
78 Lab Data Integrator
Event Driven Scheduler background processing in LIMS QM 10
background process for Application Server 76 LDI Lab Data Integrator
Event Journal background processes parameters 59
background processes parameters 55 LimitSet Refresh
Event Monitoring background processes parameters 60
background processes 28 LIMS QM
background processes parameters 56 background processes 9–10
Event Subscription Details Lab Data Integrator 10
background process for Application Server 77 VMS Sample Scheduling 9
Extract Scheduling Windows Sample Scheduling 10
background processes parameters 56 lineups
Batch Tracking background processes 19
F Lot Tracing
background processes 24
formulation details
Recipe Management background processes 36 M

G messaging
recipe synchronization 33
Generate Cutoff Inventories
robust PHD data distribution 25
Production Management - Production
MSGLOGSERVER
Accounting/Costing 13
background processes parameters 60
Generate Material Transfer
Production Management - Production
Accounting/Costing 14
O
Generate Static Routes operating instruction scheduling
Production Management - Production Operations Monitoring - Shift Summary
Accounting/Costing 14 background processes 44
Get Equipment for Balance Group Operations Management – Alarm and Event
Production Management - Production Monitoring
Accounting/Costing 11 background processes 27–28
Operations Monitoring
I background processes parameters 60
Instruction Scheduling Operations Monitoring - Shift Summary
background processes parameters 57 auto processing 43
Interface Data File Loader configuring tag values to retrieve from PHD 43
background processes parameters 58 operating instruction scheduling 44
Intermediate 19 overview 44
introducing Background Processing 7 Operations Monitoring – Shift Summary
background processes 43–44

82 • Uniformance Background Processing Descriptions User Guide


Index

overview parameters (cont.)


Operations Monitoring - Shift Summary REL_TO_PHD 71
background processes 44 Robust PHD Data Distribution 72
Sample Scheduling 73
P Tag Synchronization 74
PA Auto Reprocess Tank Composition 75
background processes parameters 61 Perform Allocations
PA Nightly Processing Production Management - Production
background processes parameters 62 Accounting/Costing 18
Package and Store procesure PHD to Relational
for Application Server background processes 78 background processes 25
parameters PHD_TO_REL
Alarm Monitoring 50 background processes parameters 63
Auto Instruction Create 50 Plant Information Management
Blend Management Interface 52 background processes 25–26
Blend Management PHD Characteristics 53 Database Synchronization 25
BM Interface File Loader 54 PHD to Relational 25
BT Batch Tracking 55 Relational to PHD 25
Event Journal 55 Robust PHD Data Distribution 25
Event Monitoring 56 Process Dependents
Extract Scheduling 56 Production Management - Production
Accounting/Costing 12
for Application Server background processes 47–
75 Process Flow Switch
Instruction Scheduling 57 Production Management - Production
Accounting/Costing 13
Interface Data File Loader 58
Process Instructions
LDI Lab Data Integrator 59
Production Management - Production
LimitSet Refresh 60
Accounting/Costing 11
MSGLOGSERVER 60
Process Product Movements
Operations Monitoring 60
Production Management - Production
PA Auto Reprocess 61 Accounting/Costing 12
PA Nightly Processing 62 Product Movement Interface
PHD_TO_REL 63 background processes parameters 63
Product Movement Interface 63 Product Movement Scheduling
Product Movement Scheduling 64 background processes parameters 64
Production Schedule 65 Production 23
Purge Background Process Status 65 Production Accounting
Purge Interface Data 66 background processes 11
Purge LIMS Redo Log 66 Cutoff Inventory Product Update 14
Purge Message Log Data 67 Generate Cutoff Inventories 13
Recipe Download 68 Generate Material Transfer 14
Recipe Synchronization 70 Generate Static Routes 14

Uniformance Background Processing Descriptions User Guide • 83


Index

Production Accounting (cont.) Production Management – Production


Get Equipment for Balance Group 11 Accounting/Costing
Perform Allocations 18 background processes 11–18
Process Dependents 12 Cutoff Inventory Product Update 14
Process Flow Switch 13 Generate Cutoff Inventories 13
Process Instructions 11 Generate Material Transfer 14
Process Product Movements 12 Generate Static Routes 14
Re-Send Resolved Quantities to PHD after Get Equipment for Balance Group 11
Allocation 18 Perform Allocations 18
Re-Update Resolved Quantities after Allocation Process Depenents 12
18 Process Flow Switch 13
Send Resolved Quantities to PHD 17 Process Instructions 11
Transfer Resolution 15 Process Product Movements 12
Update Resolved Quantities 17 Re-Send Resolved Quantities to PHD after
Production Costing Allocation 18
background processes 11 Re-Update Resolved Quantities after Allocation
Cutoff Inventory Product Update 14 18
Generate Cutoff Inventories 13 Send Resolved Quantities to PHD 17
Generate Material Transfer 14 Transfer Resolution 15
Generate Static Routes 14 Update Resolved Quantities 17
Get Equipment for Balance Group 11 Production Run Planning
Perform Allocations 18 background processes 29
Process Dependents 12 Production Schedule
Process Flow Switch 13 background processes parameters 65
Process Instructions 11 Purge Background Process Status
Process Product Movements 12 background processes parameters 65
Re-Send Resolved Quantities to PHD after Purge Interface Data
Allocation 18 background processes parameters 66
Re-Update Resolved Quantities after Allocation Purge LIMS Redo Log
18 background processes parameters 66
Send Resolved Quantities to PHD 17 Purge Message Log Data
Transfer Resolution 15 background processes parameters 67
Update Resolved Quantities 17
Production Events Q
Batch Tracking background processes 20
Quality Management - LIMS QM
Production Management
background processes 9–10
Batch Tracking 19
Lab Data Integrator 10
Lot Tracing 24
VMS Sample Scheduling 9
Tank Composition 24
Windows Sample Scheduling 10
Production Management
background processes 19–24

84 • Uniformance Background Processing Descriptions User Guide


Index

R sequence of events
Recipe Management background processes 38
Recipe Download
robust PHD data distribution 26
background processes parameters 68
Recipe Management
T
background processes 31–41
Configuration 32 Tag Synchronization
details 34 background processes parameters 74
Formulation Details 36 Tank Composition
Recipe Synchronization 31 background processes 24
sequence of events 38 background processes parameters 75
recipe synchronization Transfer Resolution
messaging 33 Production Management - Production
Accounting/Costing 15
Recipe Management background processes 31
Recipe Synchronization
U
background processes parameters 70
REL_TO_PHD update batch processing equipment times
background processes parameters 71 Batch Tracking background processes 22
Relational to PHD Update Resolved Quantities
background processes 25 Production Management - Production
Accounting/Costing 17
Re-Send Resolved Quantities to PHD after
Allocation
Production Management - Production V
Accounting/Costing 18 VMS Sample Scheduling
Re-Update Resolved Quantities after Allocation creating samples in LIMS QM 9
Production Management - Production
Accounting/Costing 18 W
robust PHD data distribution
background processes 25 Windows Report Scheduling
configuration 25 Application Management background processes
45
messaging 25
Windows Sample Scheduling
sequence of events 26
creating samples in LIMS QM 10
Robust PHD Data Distribution
background processes parameters 72

S
Sample 39
Sample Scheduling
background processes parameters 73
Send Resolved Quantities to PHD
Production Management - Production
Accounting/Costing 17

Uniformance Background Processing Descriptions User Guide • 85

You might also like