class AAIDeleteServiceInstance extends AAIResource implements JavaDelegate {

    public void execute(DelegateExecution execution) throws Exception {
        try {
            String serviceInstanceId = (String) execution.getVariable("serviceInstanceId");
            AAIResourceUri serviceInstanceURI =
                    AAIUriFactory.createResourceUri(Types.SERVICE_INSTANCE.getFragment(serviceInstanceId));
            getAaiClient().delete(serviceInstanceURI);
            execution.setVariable("GENDS_SuccessIndicator", true);
        } catch (Exception ex) {
            logger.error(ERROR_MESSAGE, ex);
            exceptionUtil.buildAndThrowWorkflowException(execution, 7000, ERROR_MESSAGE + ex.getMessage());
        }

    }

}