Action on part itemtype

Hi,

 i need to set up a functionality upon on clicking Action in Part item, it should create three parts for me with three different X class values and three documents with three different X class values has to be create . 

Example: 

Action on Part item 

PART  A has to be created with X class 'ABC'

Document A has to be created with X class '123'

Document A has to be linked to PART A(Files to the document item will be added by user later)

PART B has to be created with X class 'DEF'

Document B has to be created with X class '456'

Document B has to be linked to PART B(Files to the document item will be added by user later)

PART C has to be created with X class 'XYZ

Document C has to be created with X class '789'

Document C has to be linked to PART C(Files to the document item will be added by user later)

When ever i trigger this action, above process has to happen.

Any Suggestions how to implement this ?