Package com.fasterxml.jackson.databind.node

Examples of com.fasterxml.jackson.databind.node.ArrayNode.addObject()


    doubleVarNode.put("name", "doubleVariable");
    doubleVarNode.put("value", 123.456);
    doubleVarNode.put("type", "double");
   
    // Boolean
    ObjectNode booleanVarNode = requestNode.addObject();
    booleanVarNode.put("name", "booleanVariable");
    booleanVarNode.put("value", Boolean.TRUE);
    booleanVarNode.put("type", "boolean");
   
    // Date
View Full Code Here


   
    // Date
    Calendar varCal = Calendar.getInstance();
    String isoString = getISODateString(varCal.getTime());
   
    ObjectNode dateVarNode = requestNode.addObject();
    dateVarNode.put("name", "dateVariable");
    dateVarNode.put("value", isoString);
    dateVarNode.put("type", "date");
           
    // Create local variables with a single request
View Full Code Here

    ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("oneTaskProcess");
    runtimeService.setVariable(processInstance.getId(), "stringVariable", "initialValue");
    ArrayNode requestNode = objectMapper.createArrayNode();
   
    // String variable
    ObjectNode stringVarNode = requestNode.addObject();
    stringVarNode.put("name", "stringVariable");
    stringVarNode.put("value", "simple string value");
    stringVarNode.put("type", "string");
   
    ObjectNode anotherVariable = requestNode.addObject();
View Full Code Here

    ObjectNode stringVarNode = requestNode.addObject();
    stringVarNode.put("name", "stringVariable");
    stringVarNode.put("value", "simple string value");
    stringVarNode.put("type", "string");
   
    ObjectNode anotherVariable = requestNode.addObject();
    anotherVariable.put("name", "stringVariable2");
    anotherVariable.put("value", "another string value");
    anotherVariable.put("type", "string");
   
    // Create local variables with a single request
View Full Code Here

  public void testCreateSingleTaskVariable() throws Exception {
    ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("oneTaskProcess");
    Task task = taskService.createTaskQuery().processInstanceId(processInstance.getId()).singleResult();
   
    ArrayNode requestNode = objectMapper.createArrayNode();
    ObjectNode variableNode = requestNode.addObject();
    variableNode.put("name", "myVariable");
    variableNode.put("value", "simple string value");
    variableNode.put("scope", "local");
    variableNode.put("type", "string");
           
View Full Code Here

   */
  public void testCreateSingleTaskVariableEdgeCases() throws Exception {
    try {
      // Test adding variable to unexisting task
      ArrayNode requestNode = objectMapper.createArrayNode();
      ObjectNode variableNode = requestNode.addObject();
      variableNode.put("name", "existingVariable");
      variableNode.put("value", "simple string value");
      variableNode.put("scope", "local");
      variableNode.put("type", "string");

View Full Code Here

      Task task = taskService.newTask();
      taskService.saveTask(task);
     
      // String type detection
      ArrayNode requestNode = objectMapper.createArrayNode();
      ObjectNode varNode = requestNode.addObject();
      varNode.put("name", "stringVar");
      varNode.put("value", "String value");
      varNode.put("scope", "local");
     
      HttpPost httpPost = new HttpPost(SERVER_URL_PREFIX +
View Full Code Here

      taskService.saveTask(task);
     
      ArrayNode requestNode = objectMapper.createArrayNode();
     
      // String variable
      ObjectNode stringVarNode = requestNode.addObject();
      stringVarNode.put("name", "stringVariable");
      stringVarNode.put("value", "simple string value");
      stringVarNode.put("scope", "local");
      stringVarNode.put("type", "string");
     
View Full Code Here

      stringVarNode.put("value", "simple string value");
      stringVarNode.put("scope", "local");
      stringVarNode.put("type", "string");
     
      // Integer
      ObjectNode integerVarNode = requestNode.addObject();
      integerVarNode.put("name", "integerVariable");
      integerVarNode.put("value", 1234);
      integerVarNode.put("scope", "local");
      integerVarNode.put("type", "integer");
     
View Full Code Here

      integerVarNode.put("value", 1234);
      integerVarNode.put("scope", "local");
      integerVarNode.put("type", "integer");
     
      // Short
      ObjectNode shortVarNode = requestNode.addObject();
      shortVarNode.put("name", "shortVariable");
      shortVarNode.put("value", 123);
      shortVarNode.put("scope", "local");
      shortVarNode.put("type", "short");
     
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.