Package org.jbpm.designer.web.profile

Examples of org.jbpm.designer.web.profile.IDiagramProfile.createUnmarshaller()


          String retValue = "false";
          IDiagramProfile profile = _profileService.findProfile(req, req.getParameter("profile"));
            String json = req.getParameter("data");
            try {
        String xmlOut = profile.createMarshaller().parseModel(json, preProcessingParam);
        String jsonIn = profile.createUnmarshaller().parseModel(xmlOut, profile, preProcessingParam);
        if(jsonIn == null || jsonIn.length() < 1) {
          retValue = "true";
        }
      } catch (Throwable t) {
        retValue = "true";
View Full Code Here


                bpmn2resource.getContents().add(def);
                ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
                bpmn2resource.save(outputStream, new HashMap<Object, Object>());
                String fullXmlModel =  outputStream.toString();
                // convert to json and write response
                String json = profile.createUnmarshaller().parseModel(fullXmlModel, profile, pp);
                resp.setContentType("application/json");
                resp.getWriter().print(json);
            } catch(Exception e) {
                _logger.error(e.getMessage());
                resp.setContentType("application/json");
View Full Code Here

                rSet.getResources().add(bpmn2resource);
                bpmn2resource.getContents().add(def);
                ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
                bpmn2resource.save(outputStream, new HashMap<Object, Object>());
                String revisedXmlModel =  outputStream.toString();
                String json = profile.createUnmarshaller().parseModel(revisedXmlModel, profile, pp);
                resp.setContentType("application/json");
                resp.getWriter().print(json);
            } catch(Exception e) {
                e.printStackTrace();
                _logger.error(e.getMessage());
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.