AnsweredAssumed Answered

Error retrieving form properties from activiti-REST

Question asked by memetscc on Feb 10, 2012
Latest reply on Jun 1, 2012 by trademak
Hello,

I have encountered this error when trying to retrieve the form properties. I am using activiti 5.8
http://localhost:8080/activiti-rest/service/form/1724/properties

the stacktrace:
java.lang.NullPointerException
        at org.codehaus.jackson.node.ObjectNode.toString(ObjectNode.java:344)
        at org.codehaus.jackson.node.ArrayNode.toString(ArrayNode.java:403)
        at org.codehaus.jackson.node.ObjectNode.toString(ObjectNode.java:344)
        at java.lang.String.valueOf(String.java:2826)
        at java.lang.StringBuilder.append(StringBuilder.java:115)
        at org.restlet.service.ConverterService.toRepresentation(ConverterService.java:213)
        at org.restlet.resource.UniformResource.toRepresentation(UniformResource.java:667)
        at org.restlet.resource.ServerResource.doHandle(ServerResource.java:464)
        at org.restlet.resource.ServerResource.get(ServerResource.java:645)

heres my process definition.

<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="diagrams">
  <process id="LoanProcess" name="LoanProcess">
    <userTask id="processLoanRequestTask" name="Process Loan Request" activiti:assignee="${initiator}">
      <extensionElements>
        <activiti:formProperty id="ICNO" name="IC Number" type="string" required="true"></activiti:formProperty>
        <activiti:formProperty id="amount" name="Loan Amount" type="long" required="true"></activiti:formProperty>
      </extensionElements>
    </userTask>
    <startEvent id="startevent1" name="Start" activiti:initiator="initiator"></startEvent>
    <sequenceFlow id="flow2" name="" sourceRef="startevent1" targetRef="processLoanRequestTask"></sequenceFlow>
    <endEvent id="endevent1" name="End"></endEvent>
    <serviceTask id="checkCredit" name="Check Credit" activiti:class="loan.CheckCredit"></serviceTask>
    <sequenceFlow id="flow3" name="" sourceRef="processLoanRequestTask" targetRef="checkCredit"></sequenceFlow>
    <userTask id="approveLoanTask" name="Approve Loan" activiti:candidateGroups="management" activiti:formKey="approveLoan.jsp">
      <extensionElements>
        <activiti:formProperty id="approveLoan" name="Approve Loan?" type="enum" required="true">
          <activiti:value id="true" name="Yes"></activiti:value>
          <activiti:value id="false" name="No"></activiti:value>
        </activiti:formProperty>
      </extensionElements>
    </userTask>
    <exclusiveGateway id="exclusivegateway2" name="Exclusive Gateway"></exclusiveGateway>
    <sequenceFlow id="flow7" name="" sourceRef="approveLoanTask" targetRef="exclusivegateway2"></sequenceFlow>
    <userTask id="processLoanTask" name="Process Loan" activiti:assignee="${initiator}"></userTask>
    <sequenceFlow id="flow9" name="Approved" sourceRef="exclusivegateway2" targetRef="processLoanTask">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${approveLoan == 'true'}]]></conditionExpression>
    </sequenceFlow>
    <sequenceFlow id="flow10" name="Reject" sourceRef="exclusivegateway2" targetRef="endevent1">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${approveLoan == 'false'}]]></conditionExpression>
    </sequenceFlow>
    <sequenceFlow id="flow11" name="" sourceRef="processLoanTask" targetRef="endevent1"></sequenceFlow>
    <sequenceFlow id="flow12" name="" sourceRef="checkCredit" targetRef="exclusivegateway3"></sequenceFlow>
    <sequenceFlow id="flow13" name="" sourceRef="exclusivegateway3" targetRef="endevent1">
      <extensionElements>
        <activiti:executionListener event="take" class="loan.FailCreditListener"></activiti:executionListener>
      </extensionElements>
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${result.equals('false')}]]></conditionExpression>
    </sequenceFlow>
    <sequenceFlow id="flow14" name="" sourceRef="exclusivegateway3" targetRef="approveLoanTask">
      <extensionElements>
        <activiti:executionListener event="take" class="loan.PassCreditListener"></activiti:executionListener>
      </extensionElements>
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${result.equals('true')}]]></conditionExpression>
    </sequenceFlow>
    <exclusiveGateway id="exclusivegateway3" name="Exclusive Gateway"></exclusiveGateway>
  </process>

Any help is greatly appreciated.

Thanks

Outcomes