Usual practice with WSO2 artifacts deployment is to, enable DepSync  (Deployement Synchronization). And upload the artifacts via the management console of master node. Which will then upload the artifacts to the configured SVN repository and notify the worker nodes regarding this new artifact via a cluster message. Worker nodes then download the new artifacts from the SVN repository and apply those.
In this approach you have to log in to the management console and do the artifacts deployment manually.
With the increasing use of continuous integration tools, people are looking in to the possibility of automating this task. There is a simple solution in which you need to configure a remote file copy to the relevant directory inside the [WSO2_SERVER_HOME]/repository/deployment/server directory. But this is a very low level solution.
Following is how to use Admin Services to do the same in much easier and much manageable manner.
NOTE: Usually all WSO2 servers accept deployable as .car file but WSO2 BPS prefer .zip for deploying BPELs.
- Call 'deleteApplication' in ApplicationAdmin service and delete the
application existing application
- Wait for 1 min.
- Call 'uploadApp' in CarbonAppUploader service
- Wait for 1 min.
- Call 'getAppData' in ApplicationAdmin, if it returns application data
continue. Else break
- Call the 'listDeployedPackagesPaginated' in
BPELPackageManagementService with page=0 and
- Save the information
- Use the 'uploadService' in BPELUploader, to upload the new BPEL zip
- Again call the 'listDeployedPackagesPaginated' in
BPELPackageManagementService with 15 seconds intervals for 3mins.
- If it finds the name getting changed (due to version upgrade. Eg:
HelloWorld2‐4), then continue. (Deployment is success)
- If the name doesn't change for 3mins, break. Deployment has some
issues. Hence need human intervention