Also read this one.
https://docs.oracle.com/cd/E12839_01/core.1111/e10105/clone.htm#ASADM318So if you can understand the cloning process from the document above, then you can scriptize it accordingly.
If you ar asking this for EBS 12.2, then note that; In EBS 12.2 rapid cloning, the FMW (including weblogic) is included to the automated cloning process.