Package com.fasterxml.jackson.databind.node

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


    public void testAdds()
    {
        ArrayNode n = new ArrayNode(JsonNodeFactory.instance);
        assertNotNull(n.addArray());
        assertNotNull(n.addObject());
        n.addPOJO("foobar");
        n.add(1);
        n.add(1L);
        n.add(0.5);
        n.add(0.5f);
View Full Code Here


      assertEquals(1, runtimeService.createProcessInstanceQuery().processInstanceTenantId("my tenant").processDefinitionKey("processWithSignalStart1").count());
     
     
      // Signal with tenant AND variables
      ArrayNode vars = requestNode.putArray("variables");
      ObjectNode var = vars.addObject();
      var.put("name", "testVar");
      var.put("value", "test");
     
      httpPost.setEntity(new StringEntity(requestNode.toString()));
      closeResponse(executeRequest(httpPost, HttpStatus.SC_NO_CONTENT));
View Full Code Here

      // Check if job is queued as a result of the signal, in the right tenant
      assertEquals(1, managementService.createJobQuery().jobTenantId("my tenant").count());
     
      // Signal with variables and async, should fail as it's not supported
      ArrayNode vars = requestNode.putArray("variables");
      ObjectNode var = vars.addObject();
      var.put("name", "testVar");
      var.put("value", "test");
     
      httpPost.setEntity(new StringEntity(requestNode.toString()));
      closeResponse(executeRequest(httpPost, HttpStatus.SC_BAD_REQUEST));
View Full Code Here

  @Deployment(resources = {"org/activiti/rest/service/api/runtime/ProcessInstanceResourceTest.process-one.bpmn20.xml"})
  public void testStartProcessWithVariables() throws Exception {
    ArrayNode variablesNode = objectMapper.createArrayNode();
   
    // String variable
    ObjectNode stringVarNode = variablesNode.addObject();
    stringVarNode.put("name", "stringVariable");
    stringVarNode.put("value", "simple string value");
    stringVarNode.put("type", "string");

    ObjectNode integerVarNode = variablesNode.addObject();
View Full Code Here

    ObjectNode stringVarNode = variablesNode.addObject();
    stringVarNode.put("name", "stringVariable");
    stringVarNode.put("value", "simple string value");
    stringVarNode.put("type", "string");

    ObjectNode integerVarNode = variablesNode.addObject();
    integerVarNode.put("name", "integerVariable");
    integerVarNode.put("value", 1234);
    integerVarNode.put("type", "integer");
   
    ObjectNode shortVarNode = variablesNode.addObject();
View Full Code Here

    ObjectNode integerVarNode = variablesNode.addObject();
    integerVarNode.put("name", "integerVariable");
    integerVarNode.put("value", 1234);
    integerVarNode.put("type", "integer");
   
    ObjectNode shortVarNode = variablesNode.addObject();
    shortVarNode.put("name", "shortVariable");
    shortVarNode.put("value", 123);
    shortVarNode.put("type", "short");
   
    ObjectNode longVarNode = variablesNode.addObject();
View Full Code Here

    ObjectNode shortVarNode = variablesNode.addObject();
    shortVarNode.put("name", "shortVariable");
    shortVarNode.put("value", 123);
    shortVarNode.put("type", "short");
   
    ObjectNode longVarNode = variablesNode.addObject();
    longVarNode.put("name", "longVariable");
    longVarNode.put("value", 4567890L);
    longVarNode.put("type", "long");
   
    ObjectNode doubleVarNode = variablesNode.addObject();
View Full Code Here

    ObjectNode longVarNode = variablesNode.addObject();
    longVarNode.put("name", "longVariable");
    longVarNode.put("value", 4567890L);
    longVarNode.put("type", "long");
   
    ObjectNode doubleVarNode = variablesNode.addObject();
    doubleVarNode.put("name", "doubleVariable");
    doubleVarNode.put("value", 123.456);
    doubleVarNode.put("type", "double");
   
    ObjectNode booleanVarNode = variablesNode.addObject();
View Full Code Here

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

    booleanVarNode.put("type", "boolean");
   
    // Date
    Calendar varCal = Calendar.getInstance();
    String isoString = getISODateString(varCal.getTime());
    ObjectNode dateVarNode = variablesNode.addObject();
    dateVarNode.put("name", "dateVariable");
    dateVarNode.put("value", isoString);
    dateVarNode.put("type", "date");
   
    ObjectNode requestNode = objectMapper.createObjectNode();
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.