Examples of MarshallerWriteContext


Examples of org.drools.marshalling.impl.MarshallerWriteContext

    @PreUpdate
    public void update() {
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
    boolean variablesChanged = false;
        try {
            MarshallerWriteContext context = new MarshallerWriteContext(baos,
                    null, null, null, null);
      String processType = ((ProcessInstanceImpl) processInstance)
          .getProcess().getType();
      saveProcessInstanceType(context, processInstance, processType);
      ProcessInstanceMarshaller marshaller = ProcessMarshallerRegistry.INSTANCE
        .getMarshaller(processType);
      externalVariables = VariablePersistenceStrategyFactory.getVariablePersistenceStrategy().isEnabled();
      marshaller.writeProcessInstance(context, processInstance, !externalVariables);
      if (externalVariables) {
        variablesChanged = persistVariables();
      }
            context.close();
        } catch (IOException e) {
            throw new IllegalArgumentException(
                    "IOException while storing process instance "
                            + processInstance.getId() + ": " + e.getMessage());
        }
View Full Code Here

Examples of org.drools.marshalling.impl.MarshallerWriteContext

    @PreUpdate
    public void update() {
        this.state = workItem.getState();
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        try {
            MarshallerWriteContext context = new MarshallerWriteContext( baos,
                                                                         null,
                                                                         null,
                                                                         null,
                                                                         null,
                                                                         this.env);
           
            OutputMarshaller.writeWorkItem( context,
                                                 workItem );

            context.close();
            this.workItemByteArray = baos.toByteArray();
        } catch ( IOException e ) {
            throw new IllegalArgumentException( "IOException while storing workItem " + workItem.getId() + ": " + e.getMessage() );
        }
    }
View Full Code Here

Examples of org.drools.marshalling.impl.MarshallerWriteContext

    @PreUpdate
    public void update() {
        this.state = workItem.getState();
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        try {
            MarshallerWriteContext context = new MarshallerWriteContext( baos,
                                                                         null,
                                                                         null,
                                                                         null,
                                                                         null,
                                                                         this.env);
           
            OutputMarshaller.writeWorkItem( context,
                                                 workItem );

            context.close();
            this.workItemByteArray = baos.toByteArray();
        } catch ( IOException e ) {
            throw new IllegalArgumentException( "IOException while storing workItem " + workItem.getId() + ": " + e.getMessage() );
        }
    }
View Full Code Here

Examples of org.drools.marshalling.impl.MarshallerWriteContext

                = new ObjectMarshallingStrategy[] {
                    MarshallerFactory.newSerializeMarshallingStrategy(),
                    new MarshallerProviderImpl().newIdentityMarshallingStrategy() };
   
            ByteArrayOutputStream baos = new ByteArrayOutputStream();
            MarshallerWriteContext outContext = new MarshallerWriteContext( baos, null, null, null,
                    new ObjectMarshallingStrategyStoreImpl(strats), true, true, null);
            OldOutputMarshallerMethods.writeFactHandle_v1(outContext, (ObjectOutputStream) outContext,
                    outContext.objectMarshallingStrategyStore, 2, factHandle);
            outContext.close();
            byteArray = baos.toByteArray();
        }
       
        // unmarshall/deserialize workItem
        InternalFactHandle newFactHandle;
View Full Code Here

Examples of org.drools.marshalling.impl.MarshallerWriteContext

        ObjectMarshallingStrategy[] strats
            = new ObjectMarshallingStrategy[] { MarshallerFactory.newSerializeMarshallingStrategy() };

        // marshall/serialize workItem
        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        MarshallerWriteContext outContext = new MarshallerWriteContext( baos, null, null, null,
                new ObjectMarshallingStrategyStoreImpl(strats), true, true, null);
        OutputMarshaller.writeWorkItem(outContext, workItem);
       
        // unmarshall/deserialize workItem
        byte [] byteArray = baos.toByteArray();
View Full Code Here

Examples of org.drools.marshalling.impl.MarshallerWriteContext

                = new ObjectMarshallingStrategy[] {
                    MarshallerFactory.newSerializeMarshallingStrategy(),
                    new MarshallerProviderImpl().newIdentityMarshallingStrategy() };
   
            ByteArrayOutputStream baos = new ByteArrayOutputStream();
            MarshallerWriteContext outContext = new MarshallerWriteContext( baos, null, null, null,
                    new ObjectMarshallingStrategyStoreImpl(strats), true, true, null);
            OutputMarshaller.writeWorkItem(outContext, workItem);
            byteArray = baos.toByteArray();
        }
      
View Full Code Here

Examples of org.drools.marshalling.impl.MarshallerWriteContext

                = new ObjectMarshallingStrategy[] {
                    MarshallerFactory.newSerializeMarshallingStrategy(),
                    new MarshallerProviderImpl().newIdentityMarshallingStrategy() };
   
            ByteArrayOutputStream baos = new ByteArrayOutputStream();
            MarshallerWriteContext outContext = new MarshallerWriteContext( baos, null, null, null,
                    new ObjectMarshallingStrategyStoreImpl(strats), true, true, null);
            OutputMarshaller.writeWorkItem(outContext, workItem);
            byteArray = baos.toByteArray();
        }
   
View Full Code Here

Examples of org.drools.marshalling.impl.MarshallerWriteContext

                = new ObjectMarshallingStrategy[] {
                    MarshallerFactory.newSerializeMarshallingStrategy(),
                    new MarshallerProviderImpl().newIdentityMarshallingStrategy() };
   
            ByteArrayOutputStream baos = new ByteArrayOutputStream();
            MarshallerWriteContext outContext = new MarshallerWriteContext( baos, null, null, null,
                    new ObjectMarshallingStrategyStoreImpl(strats), true, true, null);
            OutputMarshaller.writeWorkItem(outContext, workItem);
            byteArray = baos.toByteArray();
        }
   
View Full Code Here

Examples of org.drools.marshalling.impl.MarshallerWriteContext

                = new ObjectMarshallingStrategy[] {
                    MarshallerFactory.newSerializeMarshallingStrategy(),
                    new MarshallerProviderImpl().newIdentityMarshallingStrategy() };
   
            ByteArrayOutputStream baos = new ByteArrayOutputStream();
            MarshallerWriteContext outContext = new MarshallerWriteContext( baos, null, null, null,
                    new ObjectMarshallingStrategyStoreImpl(strats), true, true, null);
            OldOutputMarshallerMethods.writeWorkItem_v1(outContext, workItem);
            byteArray = baos.toByteArray();
        }
       
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.