Examples of marshall()


Examples of org.jbpm.designer.bpmn2.impl.Bpmn2JsonMarshaller.marshall()

        return new IDiagramUnmarshaller() {
            public String parseModel(String xmlModel, IDiagramProfile profile, String preProcessingData) {
                Bpmn2JsonMarshaller marshaller = new Bpmn2JsonMarshaller();
                marshaller.setProfile(profile);
                try {
                    return marshaller.marshall(getDefinitions(xmlModel), preProcessingData);
                } catch (Exception e) {
                    _logger.error(e.getMessage(), e);
                }
                return "";
            }
View Full Code Here

Examples of org.jbpm.designer.epn.impl.EpnJsonMarshaller.marshall()

        return new IDiagramUnmarshaller() {
            public String parseModel(String xmlModel, IDiagramProfile profile, String preProcessingData) {
                EpnJsonMarshaller marshaller = new EpnJsonMarshaller();
                marshaller.setProfile(profile);
                try {
                    return marshaller.marshall(""); // TODO FIX THIS!
                } catch (Exception e) {
                    _logger.error(e.getMessage(), e);
                }
                return "";
            }
View Full Code Here

Examples of org.jbpm.designer.expressioneditor.marshalling.ExpressionEditorMessageJSONMarshaller.marshall()

                "\"script\":\"return true;\"," +
                "\"errorCode\":\"The error code\"," +
                "\"errorMessage\":\"The error message\"" +
                "}";

        String result = marshaller.marshall(message);

        assertEquals(expectedResult, result);

    }
}
View Full Code Here

Examples of org.kie.api.marshalling.Marshaller.marshall()

        StatefulKnowledgeSession ksession = (StatefulKnowledgeSession) getKnowledgeRuntime();

        Marshaller marshaller = MarshallerFactory.newMarshaller(ksession.getKieBase(), new ObjectMarshallingStrategy[]{MarshallerFactory.newSerializeMarshallingStrategy()});

        ByteArrayOutputStream stream = new ByteArrayOutputStream();
        marshaller.marshall( stream, (StatefulKnowledgeSession) getKnowledgeRuntime() );
        stream.close();

        byte[] bytes = stream.toByteArray();
        out.writeInt( bytes.length );
        out.write( bytes );
View Full Code Here

Examples of org.kie.api.marshalling.Marshaller.marshall()

       
        // Serialize and Deserialize
        try {
          Marshaller marshaller = MarshallerFactory.newMarshaller(kbase);
          ByteArrayOutputStream baos = new ByteArrayOutputStream();
          marshaller.marshall(baos, ksession);
          marshaller = MarshallerFactory.newMarshaller(kbase);
          ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
          baos.close();
          ksession = (StatefulKnowledgeSession)marshaller.unmarshall(bais);
          bais.close();
View Full Code Here

Examples of org.kie.api.marshalling.Marshaller.marshall()

        StatefulKnowledgeSession ksession = (StatefulKnowledgeSession) getKnowledgeRuntime();

        Marshaller marshaller = MarshallerFactory.newMarshaller(ksession.getKieBase(), new ObjectMarshallingStrategy[]{MarshallerFactory.newSerializeMarshallingStrategy()});

        ByteArrayOutputStream stream = new ByteArrayOutputStream();
        marshaller.marshall( stream, (StatefulKnowledgeSession) getKnowledgeRuntime() );
        stream.close();

        byte[] bytes = stream.toByteArray();
        out.writeInt( bytes.length );
        out.write( bytes );
View Full Code Here

Examples of org.kie.api.marshalling.Marshaller.marshall()

        StatefulKnowledgeSession ksession = (StatefulKnowledgeSession) getKnowledgeRuntime();

        Marshaller marshaller = MarshallerFactory.newMarshaller(ksession.getKieBase(), new ObjectMarshallingStrategy[]{MarshallerFactory.newSerializeMarshallingStrategy()});

        ByteArrayOutputStream stream = new ByteArrayOutputStream();
        marshaller.marshall( stream, (StatefulKnowledgeSession) getKnowledgeRuntime() );
        stream.close();

        byte[] bytes = stream.toByteArray();
        out.writeInt( bytes.length );
        out.write(bytes);
View Full Code Here

Examples of org.kie.api.marshalling.Marshaller.marshall()

        StatefulKnowledgeSession ksession = (StatefulKnowledgeSession) getKnowledgeRuntime();

        Marshaller marshaller = MarshallerFactory.newMarshaller(ksession.getKieBase(), new ObjectMarshallingStrategy[]{MarshallerFactory.newSerializeMarshallingStrategy()});

        ByteArrayOutputStream stream = new ByteArrayOutputStream();
        marshaller.marshall( stream, (StatefulKnowledgeSession) getKnowledgeRuntime() );
        stream.close();

        byte[] bytes = stream.toByteArray();
        out.writeInt( bytes.length );
        out.write(bytes);
View Full Code Here

Examples of org.kie.api.marshalling.Marshaller.marshall()

        StatefulKnowledgeSession ksession = (StatefulKnowledgeSession) getKnowledgeRuntime();

        Marshaller marshaller = MarshallerFactory.newMarshaller(ksession.getKieBase(), new ObjectMarshallingStrategy[]{MarshallerFactory.newSerializeMarshallingStrategy()});

        ByteArrayOutputStream stream = new ByteArrayOutputStream();
        marshaller.marshall( stream, (StatefulKnowledgeSession) getKnowledgeRuntime() );
        stream.close();

        byte[] bytes = stream.toByteArray();
        out.writeInt( bytes.length );
        out.write(bytes);
View Full Code Here

Examples of org.kie.api.marshalling.Marshaller.marshall()

       
        // Serialize and Deserialize
        try {
          Marshaller marshaller = MarshallerFactory.newMarshaller(kbase);
          ByteArrayOutputStream baos = new ByteArrayOutputStream();
          marshaller.marshall(baos, ksession);
          marshaller = MarshallerFactory.newMarshaller(kbase);
          ByteArrayInputStream bais = new ByteArrayInputStream(baos.toByteArray());
          baos.close();
          ksession = (StatefulKnowledgeSession)marshaller.unmarshall(bais);
          bais.close();
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.