Hi Gianni
We don't have plugins as you mention them.
But I try to get our application modular
So all operation should have the same number of parameters.
params string v_VAL_IN :IN ;UIL: input data
string v_VAL_OUT :OUT ;UIL: output data
string v_PARA :INOUT ;UIL: control data
string $GDA$ :INOUT ;UIL: global data area
endparams
UIL = UnifAceItemList
The $GDA$ parameter is not yet used in our application, it's for the purpose of transfering environment information through the instances if there are (official) no global objects availble like in services. All operations are recursiv called with this $GDA$ without modifing (directly) the content of $GDA$
Example: "Create a person" (without any error handling&co)
v_VAL_IN = ""
putitem/id v_VAL_IN,"PER_NAM1","Meier"
putitem/id v_VAL_IN,"PER_NAM2","Peter"
v_PARA = ""
putitem/id v_PARA,"COMMIT",1 ; The instance should do a commit on it's own
activate v_inst."PER_CRT"(v_VAL_IN,v_VAL_OUT,v_PARA,$GDA$)
v_PER_NR= $item("PER_NR",v_VAL_OUT)
There a few predefined operation (via include)
One of them is "GENERAL" to do some background things in an instance.
e.g. get the list of avaible*) operations in a component like a reflection interface
*) Only those wich are defined by default ot declared in a defines trigger
And there is always a component local variable (beside $GDA$) called $INSTANCEPROERTIES$
This holds properties of an instance wich could used at runtime.
A few of this properties are generated a compile tim (like the list of operations), some could be set and read at runtime via special globale procedures. To do this "remote" from another instance, there are two simple operations "SET_INSTANCEPROPERTIES" and "GET_INSTANCEPROPERIES"
This are some operation we will define by default 🙂
CB ; CallBack-Interface
EDIT ; Default interactive EDIT
GDA_GET ; Get and SET $GDA$ from outside
GDA_SET ;-"-
GENERAL ; Some general things, addressed by a parameter TOPIC
INSTANCEPROPERTIES_GET ; GET and SET $INSTANCEPROPERIES$
INSTANCEPROPERTIES_SET ; -"-
OP_CPT_INFO ; Get Information about the instance
OP_GET_CLL_HANDLE ; Get the collection handle of a entity
OP_GET_OCC_HANDLE ; Get a occournce handle of a entity
...
xxx
BTW: About INIT and CLEANUP
Our framework contains an "instance and transaction monitor"
So (I hope) all newinstance and deleteinstance are running over this "monitor".
Every time a instance is about to kill, GENERAL will called with the topic "CLEANUP_AHEAD".
So a instance have the opportunity to save all values in database an do other cleanup things.
To do is in this way is important as UnifAce sometimes kills dependig instances at the" wrong" moment. With "CLEANUP_AHEAD" all instance are still alive and can be called.
Think about protocol instance. Maybe UnifAce will destroy the protocol (instance) before doing the last chance write and then ...? 🙂
There are much more things behind the curtain.
Hope I could gave you a hint what one can do to make a component plugable 🙂
Ingo