infor.com
concierge
infor u
developer portal
documentation central
customer center
Posts
Categories
Groups
ERPs
CSD
FSM/HRT
LN
M3
Syteline/ CSI
Hubs
Developer
Healthcare
Hospitality
Public Sector
Onboarding
Release Center
CloudSuites
Aerospace & Defense (LN)
Automotive (LN)
Chemicals (M3)
Corporate (FSM/HRT)
Distribution (Sx.e/CSD)
Distribution Enterprise (M3)
Engineering & Construction (LN)
Fashion (M3)
Food & Beverage (M3)
Healthcare (FSM/HRT)
Industrial (Syteline/CSI)
Industrial Enterprise (LN)
Manufacturing (M3)
Public Sector (FSM/HRT)
Solutions
Supply Chain Management (SCM)
Human Capital Management (HCM)
Events
Groups
User Groups
Your Groups
About
Email Community Support
Infor News
Migrated Forums
Home
Clovertech
Clovertech Archive
Read Only Archives
Cloverleaf
Cloverleaf
Global Variable help
Ray Mullen
Hi I have the following scenario:
Thread_A receives sets of messages in a specific order or set.
Thread_A has an inbound TCL proc, and based on the messages types received creates multiple messages and forwards them to thread_B.
I am using global variables and when i receive for example an EOLT message these variables are reset. One example of a global variable I use is a message line number which the receiving application needs. The problem I have is when the thread is stopped the messages counter will be lost and the receiving application wont be able to handle this.
The program also has a many to one relationship in where on certain message sets , buffers info in global variables and when it hits an EOLT message forwards on one message to the receiving application.
Does anyone have any suggestions how to handle this if the thread is stopped in the middle of message sets e.t.c. or the process panics e.t.c.
The answer is prob check for first message type in a set and if it exists set a global flag and thereafter if that flag is blank when another message type comes in, I know this is a problem and list the rest of the set to a file and take action.
Just looking for some ideas and hope this all makes sense.
Thanks in advance
Ray
Find more posts tagged with
Clovertech
Comments
System
Originally posted by David Harrison
Ray,
The only thing I can suggest is to manage the variables outside of the Cloverleaf environment. The simplest way is to use files but there may be performance considerations. Or you could use the GBDM database that comes with Cloverleaf.
Dave
Charlie Bursell
We do this sort of thing all of the time.
First, use the built in counter commands to maintain the counter.
Then for the one to many, just make sure you do not dispose of the IB message until all messages are built. Maintain the new messages in a global buffer and when all are built, forward them on and, at that time, dispose of the original.
This way, if the thread stops before you finish, upon startup, it will be delivered to the same proc again and start all over.
I hope this makes sense
Ray Mullen
Hi Dave and Charlie
Thanks for your replies.
I think I know what you mean Charlie on the one to many scenario, Build up a disp list of messages and when i reach an eolt release the lot and if the thread is stopped it will start over.
Charlie one of the main problems I have is the many to many messages coming in.
e.g a set of messages come in and based on whats in them, the proc creates many messages and forwards them on.
e.g a set of 5 messages could create 10 messages with line numbers 1 to 10 indicating each msg number for receiving application.
Then when it reaches an eolt message or the start of new set of messages I initialize the counter back to zero. I could build up a another disp list and when i hit an eolt release them.
But will i not still lose my counter?
What are the built in counter commands? Will this solve the problem.
Thanks in advance Charlie
Charlie Bursell
These are file based counters which persist even when the engine is not running.
CtrCurrentValue CtrInitCounter CtrNextValue CtrResetValue
Just do a help on them from a tcl/hcitcl prompt
Ray Mullen
Thanks Charlie ,
Really Appreciate it
Ray