Undeploy multiple SOA composites with WLST or ANT

Undeploy multiple composites at one time. Of course you have the “Undeploy All From This Partition” menu option in Enterprise Manager but since we have a lot of deployments every day the guys wanted to have a script solution.

However with WLST or ANT the SOA Suite comes with two options to undeploy composites

Undeployment with WLST

1) Change to the WLST directory under MIDDLEWARE_HOME/Oracle_SOA1/common/bin.

cd /oracle/fmwhome/Oracle_SOA1/common/bin/

2) Open WLST


3)  Connect to the SOA server

wls:/offline> connect(‘weblogic’,’welcome1′,’t3://soabpm-vm:7001′)
Connecting to t3://soabpm-vm:7001 with userid weblogic …
Successfully connected to Admin Server ‘AdminServer’ that belongs to domain ‘dev_bpm’.


4) Run the delete command for the appropriate partition

wls:/dev_bpm/serverConfig> sca_deletePartition(‘test’)

partitionName = test

Partition was successfully deleted.


Please take into account that the command deletes all composites as well as the partition itself. If you need the partition for future deployments just recreate it with the sca_createPartition WLST-command.

Undeployment with ANT

Another option is to use ANT for the undeployment of multiple composites. The key here is to reference the file ant-sca-mgmt.xml within your custom ANT-target. The file comes with SOA Suite as well as JDeveloper. See my quick example below:

<target name=”sca_deletePartition“>

<echo>Undeploy Composites</echo>

<ant antfile=”/oracle/fmwhome/Oracle_SOA1/bin/ant-sca-mgmt.xml

inheritall=”false” target=”deletePartition”>

<property name=”host” value=”soabpm-vm”/>

<property name=”port” value=”7001″/>

<property name=”user” value=”weblogic”/>

<property name=”password” value=”welcome1″/>

<property name=”partition” value=”testPartition”/>


Again this command deletes all composites of the given partition as well as the partition itself.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s