Package org.jbpm.formbuilder.shared.form

Examples of org.jbpm.formbuilder.shared.form.FormServiceException


            method.setRequestEntity(new StringRequestEntity(encoder.encode(form), null, null));
            method.setRequestHeader("Checkin-Comment", form.getDocumentation());
            helper.setAuth(client, method);
            client.executeMethod(method);
            if (!"OK".equalsIgnoreCase(method.getResponseBodyAsString())) {
                throw new FormServiceException("Remote guvnor error: " + method.getResponseBodyAsString());
            }
            return form.getName();
        } catch (IOException e) {
            throw new FormServiceException(e);
        } catch (FormEncodingException e) {
            throw new FormServiceException(e);
        } catch (Exception e) {
            if (e instanceof FormServiceException) {
                throw (FormServiceException) e;
            }
            throw new FormServiceException("Unexpected error", e);
        } finally {
            if (method != null) {
                method.releaseConnection();
            }
        }
View Full Code Here


            method.setRequestHeader("Checkin-Comment", "Committing " + formItemName);
            helper.setAuth(client, method);
            client.executeMethod(method);
            return formItemName;
        } catch (IOException e) {
            throw new FormServiceException(e);
        } catch (FormEncodingException e) {
            throw new FormServiceException(e);
        } catch (Exception e) {
            throw new FormServiceException("Unexpected error", e);
        } finally {
            if (method != null) {
                method.releaseConnection();
            }
        }
View Full Code Here

                helper.setAuth(client, method);
                client.executeMethod(method);
                String json = method.getResponseBodyAsString();
                return decoder.decode(json);
            } catch (IOException e) {
                throw new FormServiceException(e);
            } catch (FormEncodingException e) {
                throw new FormServiceException(e);
            } catch (Exception e) {
                throw new FormServiceException("Unexpected error", e);
            } finally {
                if (method != null) {
                    method.releaseConnection();
                }
            }
View Full Code Here

                    } finally {
                        processCall.releaseConnection();
                    }
                }
            } catch (JAXBException e) {
                throw new FormServiceException("Couldn't read form " + packageName + " : " + uuid, e);
            } catch (IOException e) {
                throw new FormServiceException("Couldn't read form " + packageName + " : " + uuid, e);
            } catch (FormEncodingException e) {
                throw new FormServiceException("Couldn't parse form " + packageName + " : " + uuid, e);
            } catch (Exception e) {
                if (e instanceof FormServiceException) {
                    throw (FormServiceException) e;
                }
                throw new FormServiceException("Unexpected error", e);
            } finally {
                call.releaseConnection();
            }
        }
        return null;
View Full Code Here

                helper.setAuth(client, method);
                client.executeMethod(method);
                String json = method.getResponseBodyAsString();
                return decoder.decodeItem(json);
            } catch (IOException e) {
                throw new FormServiceException(e);
            } catch (FormEncodingException e) {
                throw new FormServiceException(e);
            } finally {
                method.releaseConnection();
            }
        }
        return null;
View Full Code Here

                    items.put(assetId, item);
                }
            }
            return items;
        } catch (IOException e) {
            throw new FormServiceException(e);
        } catch (Exception e) {
            if (e instanceof FormServiceException) {
                throw (FormServiceException) e;
            }
            throw new FormServiceException("Unexpected error", e);
        } finally {
            if (method != null) {
                method.releaseConnection();
            }
        }
View Full Code Here

                    forms.add(form);
                }
            }
            return forms;
        } catch (IOException e) {
            throw new FormServiceException(e);
        } catch (Exception e) {
            if (e instanceof FormServiceException) {
                throw (FormServiceException) e;
            }
            throw new FormServiceException("Unexpected error", e);
        } finally {
            if (method != null) {
                method.releaseConnection();
            }
        }
View Full Code Here

                        URLEncoder.encode(formId, GuvnorHelper.ENCODING) + ".formdef";
                method = helper.createDeleteMethod(deleteUrl);
                helper.setAuth(client, method);
                client.executeMethod(method);
            } catch (IOException e) {
                throw new FormServiceException(e);
            } catch (Exception e) {
                throw new FormServiceException("Unexpected error", e);
            } finally {
                if (method != null) {
                    method.releaseConnection();
                }
            }
View Full Code Here

                        URLEncoder.encode(formItemId, GuvnorHelper.ENCODING) + ".json";
                method = helper.createDeleteMethod(deleteUrl);
                helper.setAuth(client, method);
                client.executeMethod(method);
            } catch (IOException e) {
                throw new FormServiceException(e);
            } catch (Exception e) {
                throw new FormServiceException("Unexpected error", e);
            } finally {
                if (method != null) {
                    method.releaseConnection();
                }
            }
View Full Code Here

            if (method instanceof PutMethod) {
                message = "Problem updating template " + packageName + "/" + templateName;
            } else {
                message = "Problem creating template " + packageName + "/" + templateName;
            }
            throw new FormServiceException(message, e);
        } catch (FormServiceException e) {
            throw e;
        } catch (Exception e) {
            throw new FormServiceException("Unexpected error", e);
        } finally {
            if (method != null) method.releaseConnection();
        }
    }
View Full Code Here

TOP

Related Classes of org.jbpm.formbuilder.shared.form.FormServiceException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.