CacheERWorkflowSystemFunctionDat

Cache ER Workflow System Function Data

Major Business Rule

Object Name: B9000110

Parent DLL: CWRKFLOW

Location: Client/Server

Language: C

1.Functional Description

1.1Purpose
This function will perform Get, Add, Update, Delete, Delete All, Get Next, Add/Update, and Terminate functions on the ER Workflow System Function 
Data Cache used by R9000090 to determine everywhere workflow system functions are called.


The calling functions are responsible for loading all appropriate key values to the data structure and identifying the number of keys to use in 

retrieval/update operations.


1.2 Setup Notes and Prerequisites

Cache Action Codes

• '1' Get - retrieve the cache element.
• '2' Add - add a cache element.
• '3' Update - update a cache element.
• '4' Delete - delete a cache element.
• '5' Delete All - delete all cache elements
• '6' Get Next - retrieve the next cache element
• '7' Add/Update - will add if element does not exist, will change if it does exist.
• '8' Terminate - terminate cache
• '9' Release Cursor - close the input cursor

Number of Keys 

• If the number of keys is passed as a parameter, the business function uses this value to setup key 
values for a Get, Update, Delete, and Add/Update.

• A zero may be passed to retrieve, update, or delete the first record.

When action code GET is used, the function saves the cache cursor pointer if the fetch is successful.  This allows the calling application to use GET 

NEXT to fetch elements from the cache sequentially.  If GET NEXT is called until the end of the keyed cache dataset is found, the function automatically closes 

the open cursor.  Otherwise, the calling application is responsible for closing the cursor using action code '9'.


1.3Special Logic

This function creates a unique cache for each process.  The function appends the input Job Number string to the function name 'B9000110-' to build the 
cache name used for the calling application.


^

Data Structure

D9000110 - Cache ER Workflow System Function Data

Parameter NameData ItemData TypeReq/OptI/O/Both
szJobNumberJOBcharREQINPUT

Job Number for this process.  It is used to form the cache name.
^

szObjectNameOBNMcharOPTBOTH

Key field for  cacheab 

^

szFormNameFMNMcharOPTBOTH

The unique name that identifies a form.

idControlIDCTRLIDIDOPTBOTH

This field give the control id for the Evnet Rules Specifications.

szEventDescriptionDSC1charOPTBOTH

Brief information about an item; a remark or an explanation.

szVersionVERScharOPTBOTH

A user-defined set of specifications that control how applications and reports run. You use versions to group and save a set of user-defined 
processing option values and data selection and sequencing options. Interactive versions are associated with applications (usually as a 
menu selection). Batch versions are associated with batch jobs or reports. To run a batch process, you must choose a version.

szCacheActionCodeCACTNcharREQINPUT

'1' = Get cache element
'2' = Add element  

'3' = Update element 

'4' = Delete cache elements 

'5' = Delete All cache elements 

'6' = Get Next cache element 

'7'  = Add/Update cache element 

'8' = End cache (terminate cache) 

'9' = Close Cursor and Free Data Ptr  ab 


^

cErrorCodeERRCcharOPTOUTPUT

'0' = Success 
'1' = Operation Failed 

'2' = End of Data (for Get  Next)ab 


^

iNumberOfKeysINT01integerOPTINPUT

Number of Keys to be used in the cache action.  Required for keyed fetches, updates and  deletes.ab 

^

cSuppressErrorMessageSUPPScharOPTINPUT

'0'= Allow runtime error message handling. 
'1' = Suppress runtime error message  handling.ab 


^

szErrorMessageIDDTAIcharOPTOUTPUT

"   " = Success 
"078L" = Cache Init Failed 

"078M" = Open Cursor Failed 

"078N" = Fetch from Cache Failed 

"078O" = Add to Cache Failed 

"078P" = Update to Cache Failed 

"078Q" = Delete from Cache Failed 

"078R" = Terminate of Cache Failed 

"032E" = Cache Action  Failedab 


^

idCacheCursorPtrGENLNGIDOPTBOTH

Cursor used for sequential fetch from cache.  Required for Get Next  operation.ab 

^

iSequenceNumberINT01integerOPTBOTH

Key field for  cacheab 

^

szControlNameDL01charOPTBOTH

A user defined name or remark.

szFormDescriptionDL02charOPTBOTH

Additional text that further describes or clarifies a field in the system.

szWorkflowSystemFunctionDescTXPPcharOPTBOTH

An all-purpose string that the system uses to temporarily display large amounts of text.

iUniqueNumberINT02integerOPTBOTH

Number of Days in the Past to Query for Quote Requests Received. 

szWorkflowSystemFunctionDSCRcharOPTBOTH

For OneWorld, the row description that identifies fields on forms and reports. For World, the title that identifies text and reports. Use it in a 
manner similar to the column description in the query facility. It should be less than 35 characters. Use abbreviations whenever possible. 
Common abbreviations are: U/M Units of measure   YTD Year-to-date MTD Month-to-date PYE Prior year end   QTY Quantity G/L General ledger  
A/P Accounts payable   DEPR Depreciation

Related Functions

None

Related Tables

None