Package org.activiti.engine.impl.bpmn.data

Examples of org.activiti.engine.impl.bpmn.data.ItemInstance


        }
      });
 
      ItemDefinition itemDefinition = processDefinition.getIoSpecification().getDataInputs().get(0).getDefinition();

    ItemInstance itemInstance = itemDefinition.createInstance();
    FieldBaseStructureInstance structureInstance = (FieldBaseStructureInstance) itemInstance.getStructureInstance();
    structureInstance.setFieldValue("prefix", "The counter has the value ");
    structureInstance.setFieldValue("suffix", ". Good news");

    Map<String, Object> variables = new HashMap<String, Object>();
    variables.put("dataInputOfProcess", itemInstance);
View Full Code Here


  public void execute(ActivityExecution execution) throws Exception {
    MessageInstance message;
   
    if (ioSpecification != null) {
      this.ioSpecification.initialize(execution);
      ItemInstance inputItem = (ItemInstance) execution.getVariable(this.ioSpecification.getFirstDataInputName());
      message = new MessageInstance(this.operation.getInMessage(), inputItem);
    } else {
      message = this.operation.getInMessage().createInstance();
    }
   
    execution.setVariable(CURRENT_MESSAGE, message);
   
    this.fillMessage(message, execution);
   
    MessageInstance receivedMessage = this.operation.sendMessage(message);

    execution.setVariable(CURRENT_MESSAGE, receivedMessage);

    if (ioSpecification != null) {
      String firstDataOutputName = this.ioSpecification.getFirstDataOutputName();
      if (firstDataOutputName != null) {
        ItemInstance outputItem = (ItemInstance) execution.getVariable(firstDataOutputName);
        outputItem.getStructureInstance().loadFrom(receivedMessage.getStructureInstance().toArray());
      }
    }
   
    this.returnMessage(receivedMessage, execution);
   
View Full Code Here

        }
      });
   
    ItemDefinition itemDefinition = processDefinition.getIoSpecification().getDataInputs().get(0).getDefinition();

    ItemInstance itemInstance = itemDefinition.createInstance();
    FieldBaseStructureInstance structureInstance = (FieldBaseStructureInstance) itemInstance.getStructureInstance();
    structureInstance.setFieldValue("newCounterValue", 23);

    Map<String, Object> variables = new HashMap<String, Object>();
    variables.put("dataInputOfProcess", itemInstance);
View Full Code Here

        }
      });
 
      ItemDefinition itemDefinition = processDefinition.getIoSpecification().getDataInputs().get(0).getDefinition();

    ItemInstance itemInstance = itemDefinition.createInstance();
    FieldBaseStructureInstance structureInstance = (FieldBaseStructureInstance) itemInstance.getStructureInstance();
    structureInstance.setFieldValue("prefix", "The counter has the value ");
    structureInstance.setFieldValue("suffix", ". Good news");

    Map<String, Object> variables = new HashMap<String, Object>();
    variables.put("dataInputOfProcess", itemInstance);
View Full Code Here

        }
      });
   
    ItemDefinition itemDefinition = processDefinition.getIoSpecification().getDataInputs().get(0).getDefinition();

    ItemInstance itemInstance = itemDefinition.createInstance();
    FieldBaseStructureInstance structureInstance = (FieldBaseStructureInstance) itemInstance.getStructureInstance();
    structureInstance.setFieldValue("newCounterValue", 23);

    Map<String, Object> variables = new HashMap<String, Object>();
    variables.put("dataInputOfProcess", itemInstance);
View Full Code Here

  public void execute(ActivityExecution execution) throws Exception {
    MessageInstance message;
   
    if (ioSpecification != null) {
      this.ioSpecification.initialize(execution);
      ItemInstance inputItem = (ItemInstance) execution.getVariable(this.ioSpecification.getFirstDataInputName());
      message = new MessageInstance(this.operation.getInMessage(), inputItem);
    } else {
      message = this.operation.getInMessage().createInstance();
    }
   
    execution.setVariable(CURRENT_MESSAGE, message);
   
    this.fillMessage(message, execution);
   
    MessageInstance receivedMessage = this.operation.sendMessage(message);

    execution.setVariable(CURRENT_MESSAGE, receivedMessage);

    if (ioSpecification != null) {
      String firstDataOutputName = this.ioSpecification.getFirstDataOutputName();
      if (firstDataOutputName != null) {
        ItemInstance outputItem = (ItemInstance) execution.getVariable(firstDataOutputName);
        outputItem.getStructureInstance().loadFrom(receivedMessage.getStructureInstance().toArray());
      }
    }
   
    this.returnMessage(receivedMessage, execution);
   
View Full Code Here

TOP

Related Classes of org.activiti.engine.impl.bpmn.data.ItemInstance

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.