Hello @anto,
okay - this is good!
The reason that there are so many TriggerLog documents is that one is created per operation, regardless of what that operation is.
So whenever a new Trigger document is inserted, a new TriggerLog document is inserted too. Whenever a Trigger document is updated, a new TriggerLog document is inserted.
In the Java source code for the Server Extension you can see that the methods “onInsert” and “onUpdate” just call the method “writeLog”. The writeLog method calls Tamino to “process” an XML document that is constructed in the method.
(The operations performed by Tamino will be the same as those described earlier - if there is not an ino:id in the document, a new document is inserted; if there is an ino:id in the document then the corresponding document in Tamino is updated. You could modify the SXSJTrigger.java source so that an ino:id is inserted into the document constructed in the writeLog method, to see how that works.)
The init function is called before any other function, to perform some initialization steps.
In the Install.xml file that Stuart provided (in the SXP file), you will find the descriptor for the init function - which specifies the default values for the parameters.
I hope that helps,
Trevor.
#webMethods#API-Management#Tamino