Hello,
we don’t have a plugin example that does exactly what you want. However, if you have a look at the code of the ‘AdvancedPlugin’ example, you will find a method that is invoked for the commit of a property document.
For your use case, the formal definition of the action for a plugin would be the same. The code of your method could look like this.
public static void commitDocA(BusinessDocument docA, BusinessDocumentWorkspace ws) {
BusinessDocument docB = ws.create("name to register doc B", "doctype of your doc B");
Element idNodeForDocA = docB.selectElement("XPath for the element referring to docA");
idNodeForDocA.setText(docA.getId());
// commit the two documents within a transaction as described (see following link)
}
Add some operations before or after the commitment of Create / Delete actions in JSP
For programming with the XApplication Java API have a look at the API examples. You will find them at
%xapplication%\examples\API.…
Bye,
Christian.
#Tamino#API-Management#webMethods