[jboss-dev-forums] [jBPM Development] - Re: How to delete existing BPMN processes from the guvnor repository
Tihomir Surdilovic
do-not-reply at jboss.com
Sat Oct 1 11:42:12 EDT 2011
Tihomir Surdilovic [http://community.jboss.org/people/tsurdilovic] created the discussion
"Re: How to delete existing BPMN processes from the guvnor repository"
To view the discussion, visit: http://community.jboss.org/message/629693#629693
--------------------------------------------------------------
Hi you can see some specific examples here: https://github.com/tsurdilo/process-designer/blob/master/src/main/java/com/intalio/web/server/TaskFormsServlet.java https://github.com/tsurdilo/process-designer/blob/master/src/main/java/com/intalio/web/server/TaskFormsServlet.java and here: https://github.com/droolsjbpm/jbpm/blob/master/jbpm-gwt/jbpm-gwt-shared/src/main/java/org/jbpm/integration/console/shared/GuvnorConnectionUtils.java https://github.com/droolsjbpm/jbpm/blob/master/jbpm-gwt/jbpm-gwt-shared/src/main/java/org/jbpm/integration/console/shared/GuvnorConnectionUtils.java
For deleting assets here is an example:
String deleteURL = ExternalInfo.getExternalProtocol(profile)
+ "://"
+ ExternalInfo.getExternalHost(profile)
+ "/"
+ profile.getExternalLoadURLSubdomain().substring(0,
profile.getExternalLoadURLSubdomain().indexOf("/"))
+ "/rest/packages/" + packageName + "/assets/" + assetName
+ assetExt;
URL deleteAssetURL = new URL(deleteURL);
HttpURLConnection deleteConnection = (HttpURLConnection) deleteAssetURL
.openConnection();
applyAuth(profile, deleteConnection);
deleteConnection.setRequestMethod("DELETE");
deleteConnection.connect();
_logger.info("delete connection response code: " + deleteConnection.getResponseCode());
If have set up authentication in Guvnor, the applyAuth method sets the Basic Authorization header with the encided username and password.
Hope this helps.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/629693#629693]
Start a new discussion in jBPM Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2035]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-dev-forums/attachments/20111001/23180edb/attachment.html
More information about the jboss-dev-forums
mailing list