JBoss Community

Re: Random error in Editor

created by jourrey in jBPM - View the full discussion

Hello, Thank you this answer, the upgrade to 2.2.1 or 2.3 will be able to solve it? This error I have, there will be randomness.

            ResourceSet resourceSet = new ResourceSetImpl();

            resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap()

                .put(Resource.Factory.Registry.DEFAULT_EXTENSION, new JBPMBpmn2ResourceFactoryImpl());

            resourceSet.getPackageRegistry().put("http://www.omg.org/spec/BPMN/20100524/MODEL", Bpmn2Package.eINSTANCE);

            JBPMBpmn2ResourceImpl resource = (JBPMBpmn2ResourceImpl) resourceSet.createResource(URI.createURI("inputStream://dummyUriWithValidSuffix.xml"));

            resource.getDefaultLoadOptions().put(JBPMBpmn2ResourceImpl.OPTION_ENCODING, "UTF-8");

            resource.setEncoding("UTF-8");

            Map<String, Object> options = new HashMap<String, Object>();

            options.put( JBPMBpmn2ResourceImpl.OPTION_ENCODING, "UTF-8" );

            InputStream is = new ByteArrayInputStream(xml.getBytes("UTF-8"));

            resource.load(is, options);// Is here Is here

From designer2.0 to designer2.2 all have this problem.Prior to designer2.2 xml(.bpmn file) is bpmn2 beginning, after it becomes the model.Is this true?This project so hard,I do not understand。

Reply to this message by going to Community

Start a new discussion in jBPM at Community