cancel
Showing results for 
Search instead for 
Did you mean: 

Request processing failed; nested exception is org.activiti.engine.ActivitiIllegalArgumentException: unknown type 'String' nameO

kishore_mutchar
Champ in-the-making
Champ in-the-making
Request processing failed; nested exception is org.activiti.engine.ActivitiIllegalArgumentException: unknown type 'String' nameO

Request processing failed; nested exception is org.activiti.engine.ActivitiIllegalArgumentException: unknown type 'String' nameOfBusiness

Am Developing SpringMVC+Activiti

 While i running the Project, i am getting the above Exception(i.e org.activiti.engine.ActivitiIllegalArgumentException: unknown type 'String' nameOfBusiness).

  Here my Approval.bpmn20.xml

<?xml version="1.0" encoding="UTF-8"?>

<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"xmlnsSmiley Surprisedmgdc="http://www.omg.org/spec/DD/20100524/DC"xmlnsSmiley Surprisedmgdi="http://www.omg.org/spec/DD/20100524/DI"typeLanguage="http://www.w3.org/2001/XMLSchema"expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://www.activiti.org/test">

  <process id="BusinessApproval" name="My process" isExecutable="true">

    <startEvent id="startevent1" name="Start" activiti:initiator="ManagingDirector">

      <extensionElements>

        <activiti:formProperty id="nameOfBusiness" name="Name of Business or Individual" type="String" required="true"></activiti:formProperty>

        <activiti:formProperty id="address" name="Address" type="String" expression="${address}" required="true"></activiti:formProperty>

        <activiti:formProperty id="mangingDirector" name="Managing Director/Owner" type="String" expression="${mangingDirector}" required="true"></activiti:formProperty>

        <activiti:formProperty id="telephone" name="Tel" type="long" expression="${telephone}" required="true"></activiti:formProperty>

        <activiti:formProperty id="fax" name="Fax" type="long"></activiti:formProperty>

        <activiti:formProperty id="email" name="Email" type="String" expression="${Email}"></activiti:formProperty>

        <activiti:formProperty id="wwwAddress" name="WWWaddress" type="String" expression="${WWWaddress}"></activiti:formProperty>

        <activiti:formProperty id="parentCompanyOrOtherBusinessNames" name="ParentCompany(Full legal Name), or other business names under which you do business" type="String" expression="${ParentCompany}" variable="${ParentCompany}"></activiti:formProperty>

        <activiti:formProperty id="subsidiaries" name="Subsidaries and Overseas Representatives(s): State Partially, fully owned or agent and attach a list if necessary" type="String" expression="${Subsidaries}"></activiti:formProperty>

        <activiti:formProperty id="typeOfBusiness" name="Type of Business" type="String" expression="${TypeOfBusiness}" variable="${TypeOfBusiness}" required="true"></activiti:formProperty>

        <activiti:formProperty id="natureOfBusiness" name="Nature Of Business" type="String" expression="${NatureOfBusiness}" required="true"></activiti:formProperty>

        <activiti:formProperty id="nameOfCustomer1" name="NameOfCustomer" type="String" variable="${NameOfCustomer1}" required="true"></activiti:formProperty>

        <activiti:formProperty id="address1" name="Address" type="String" expression="${CustomerAddress1}" variable="${CustomerAddress1}"></activiti:formProperty>

        <activiti:formProperty id="nameOfCustomer2" name="Name Of Customer" type="String" expression="${NameOfCustomer2}" required="true"></activiti:formProperty>

        <activiti:formProperty id="address2" name="Address" type="String" expression="${CustomerAddress2}" variable="${CustomerAddress2}" default="${CustomerAddress2}"></activiti:formProperty>

        <activiti:formProperty id="yearBusinessEstablished" name="Year Business Established(dd-MM-yyy)" type="dd-MM-yyyy hh:mm" expression="${YearOfBusinessEstablished}" variable="${YearOfBusinessEstablished}" default="${YearOfBusinessEstablished}"></activiti:formProperty>

        <activiti:formProperty id="numberOfFullTimeEmployees" name="Number Of Full Time Employees" type="long" expression="${NumberOfFullTimeEmployees}"></activiti:formProperty>

        <activiti:formProperty id="businessRegistrationNumber" name="Business Registration Number/Place where registered(Privately held companies must attach copy certificate of incorporation)" type="String" expression="${BusinessRegistrationNumber}" variable="${BusinessRegistrationNumber}" default="${BusinessRegistrationNumber}" required="true"></activiti:formProperty>

      </extensionElements>

    </startEvent>

    <serviceTask id="servicetask1" name="Analyst Queue"></serviceTask>

    <serviceTask id="servicetask2" name="Secondary Approval"></serviceTask>

    <serviceTask id="servicetask3" name="Service Task"></serviceTask>

    <endEvent id="endevent1" name="End"></endEvent>

    <sequenceFlow id="flow9" sourceRef="servicetask3" targetRef="endevent1"></sequenceFlow>

    <exclusiveGateway id="exclusivegateway3" name="Exclusive Gateway"></exclusiveGateway>

    <sequenceFlow id="flow12" sourceRef="servicetask2" targetRef="exclusivegateway3"></sequenceFlow>

    <sequenceFlow id="flow13" sourceRef="exclusivegateway3" targetRef="servicetask3"></sequenceFlow>

    <sequenceFlow id="flow14" sourceRef="servicetask2" targetRef="startevent1"></sequenceFlow>

    <exclusiveGateway id="exclusivegateway5" name="Exclusive Gateway"></exclusiveGateway>

    <sequenceFlow id="flow16" sourceRef="servicetask1" targetRef="exclusivegateway5"></sequenceFlow>

    <sequenceFlow id="flow17" sourceRef="exclusivegateway5" targetRef="servicetask2"></sequenceFlow>

    <sequenceFlow id="flow18" sourceRef="exclusivegateway5" targetRef="startevent1"></sequenceFlow>

    <scriptTask id="scripttask1" name="Script Task" scriptFormat="groovy" activiti:autoStoreVariables="false">

      <script>def badwords = 'fuck|bla'

def replacement = 'xxx'

 

def

filterednameOfBusiness = summary.replaceAll(badwords, replacement)

def

filteredDescription = description.replaceAll(badwords, replacement)

 

execution.setVariable('summary', filterednameOfBusiness )

execution.setVariable('description', filteredDescription )</script>

    </scriptTask>

    <sequenceFlow id="flow20" sourceRef="startevent1" targetRef="scripttask1"></sequenceFlow>

    <sequenceFlow id="flow21" sourceRef="scripttask1" targetRef="servicetask1"></sequenceFlow>

  </process>

  <bpmndi:BPMNDiagram id="BPMNDiagram_BusinessApproval">

    <bpmndi:BPMNPlane bpmnElement="BusinessApproval" id="BPMNPlane_BusinessApproval">

      <bpmndi:BPMNShape bpmnElement="startevent1" id="BPMNShape_startevent1">

        <omgdc:Bounds height="35.0" width="35.0" x="60.0" y="220.0"></omgdc:Bounds>

      </bpmndi:BPMNShape>

      <bpmndi:BPMNShape bpmnElement="servicetask1" id="BPMNShape_servicetask1">

        <omgdc:Bounds height="184.0" width="105.0" x="340.0" y="146.0"></omgdc:Bounds>

      </bpmndi:BPMNShape>

      <bpmndi:BPMNShape bpmnElement="servicetask2" id="BPMNShape_servicetask2">

        <omgdc:Bounds height="190.0" width="105.0" x="610.0" y="140.0"></omgdc:Bounds>

      </bpmndi:BPMNShape>

      <bpmndi:BPMNShape bpmnElement="servicetask3" id="BPMNShape_servicetask3">

        <omgdc:Bounds height="85.0" width="105.0" x="910.0" y="191.0"></omgdc:Bounds>

      </bpmndi:BPMNShape>

      <bpmndi:BPMNShape bpmnElement="endevent1" id="BPMNShape_endevent1">

        <omgdc:Bounds height="35.0" width="35.0" x="1050.0" y="216.0"></omgdc:Bounds>

      </bpmndi:BPMNShape>

      <bpmndi:BPMNShape bpmnElement="exclusivegateway3" id="BPMNShape_exclusivegateway3">

        <omgdc:Bounds height="40.0" width="40.0" x="760.0" y="216.0"></omgdc:Bounds>

      </bpmndi:BPMNShape>

      <bpmndi:BPMNShape bpmnElement="exclusivegateway5" id="BPMNShape_exclusivegateway5">

        <omgdc:Bounds height="40.0" width="40.0" x="500.0" y="218.0"></omgdc:Bounds>

      </bpmndi:BPMNShape>

      <bpmndi:BPMNShape bpmnElement="scripttask1" id="BPMNShape_scripttask1">

        <omgdc:Bounds height="55.0" width="105.0" x="180.0" y="211.0"></omgdc:Bounds>

      </bpmndi:BPMNShape>

      <bpmndi:BPMNEdge bpmnElement="flow9" id="BPMNEdge_flow9">

        <omgdi:waypoint x="1015.0" y="233.0"></omgdi:waypoint>

        <omgdi:waypoint x="1050.0" y="233.0"></omgdi:waypoint>

      </bpmndi:BPMNEdge>

      <bpmndi:BPMNEdge bpmnElement="flow12" id="BPMNEdge_flow12">

        <omgdi:waypoint x="715.0" y="235.0"></omgdi:waypoint>

        <omgdi:waypoint x="760.0" y="236.0"></omgdi:waypoint>

      </bpmndi:BPMNEdge>

      <bpmndi:BPMNEdge bpmnElement="flow13" id="BPMNEdge_flow13">

        <omgdi:waypoint x="800.0" y="236.0"></omgdi:waypoint>

        <omgdi:waypoint x="910.0" y="233.0"></omgdi:waypoint>

      </bpmndi:BPMNEdge>

      <bpmndi:BPMNEdge bpmnElement="flow14" id="BPMNEdge_flow14">

        <omgdi:waypoint x="662.0" y="330.0"></omgdi:waypoint>

        <omgdi:waypoint x="669.0" y="439.0"></omgdi:waypoint>

        <omgdi:waypoint x="367.0" y="439.0"></omgdi:waypoint>

        <omgdi:waypoint x="-9.0" y="439.0"></omgdi:waypoint>

        <omgdi:waypoint x="-9.0" y="237.0"></omgdi:waypoint>

        <omgdi:waypoint x="37.0" y="237.0"></omgdi:waypoint>

        <omgdi:waypoint x="60.0" y="237.0"></omgdi:waypoint>

      </bpmndi:BPMNEdge>

      <bpmndi:BPMNEdge bpmnElement="flow16" id="BPMNEdge_flow16">

        <omgdi:waypoint x="445.0" y="238.0"></omgdi:waypoint>

        <omgdi:waypoint x="500.0" y="238.0"></omgdi:waypoint>

      </bpmndi:BPMNEdge>

      <bpmndi:BPMNEdge bpmnElement="flow17" id="BPMNEdge_flow17">

        <omgdi:waypoint x="540.0" y="238.0"></omgdi:waypoint>

        <omgdi:waypoint x="610.0" y="235.0"></omgdi:waypoint>

      </bpmndi:BPMNEdge>

      <bpmndi:BPMNEdge bpmnElement="flow18" id="BPMNEdge_flow18">

        <omgdi:waypoint x="520.0" y="258.0"></omgdi:waypoint>

        <omgdi:waypoint x="520.0" y="387.0"></omgdi:waypoint>

        <omgdi:waypoint x="77.0" y="387.0"></omgdi:waypoint>

        <omgdi:waypoint x="77.0" y="255.0"></omgdi:waypoint>

      </bpmndi:BPMNEdge>

      <bpmndi:BPMNEdge bpmnElement="flow20" id="BPMNEdge_flow20">

        <omgdi:waypoint x="95.0" y="237.0"></omgdi:waypoint>

        <omgdi:waypoint x="180.0" y="238.0"></omgdi:waypoint>

      </bpmndi:BPMNEdge>

      <bpmndi:BPMNEdge bpmnElement="flow21" id="BPMNEdge_flow21">

        <omgdi:waypoint x="285.0" y="238.0"></omgdi:waypoint>

        <omgdi:waypoint x="340.0" y="238.0"></omgdi:waypoint>

      </bpmndi:BPMNEdge>

    </bpmndi:BPMNPlane>

  </bpmndi:BPMNDiagram>

</definitions>

 

 Here this Approval.bpmn20.xml is loads into process engine using following code as follows

 @RequestMapping("/SaveUserInfo")

   public String Registration(@ModelAttribute(value="reg") Registration reg,HttpServletRequest request) {

           

           Map<String, Object> variables = new HashMap<String, Object>();

           variables.put("nameOfBusiness", reg.getNameOfBusiness());

           variables.put("address",reg.getAddress());

           variables.put("mangingDirector", reg.getMangingDirector());

           variables.put("telephone",reg.getTelephone());

           variables.put("fax", reg.getFax());

           variables.put("email",reg.getEmail());

           variables.put("wwwAddress", reg.getWwwAddress());

           variables.put("parentCompanyOrOtherBusinessNames", reg.getParentCompanyOrOtherBusinessNames());

           variables.put("subsidiaries",reg.getSubsidiaries());

           variables.put("mangingDirector", reg.getMangingDirector());

           variables.put("typeOfBusiness",reg.getTypeOfBusiness());

           variables.put("natureOfBusiness", reg.getNatureOfBusiness());

           variables.put("email",reg.getEmail());

           variables.put("nameOfCustomer1", reg.getNameOfCustomer1());

           variables.put("address1",reg.getAddress1());

           variables.put("nameOfCustomer2", reg.getNameOfCustomer2());

           variables.put("address2",reg.getAddress2());

           variables.put("yearBusinessEstablished", reg.getYearBusinessEstablished());

           variables.put("numberOfFullTimeEmployees",reg.getNumberOfFullTimeEmployees());

           variables.put("businessRegistrationNumber", reg.getBusinessRegistrationNumber());

           ProcessEngine processEngine = ProcessEngines.getDefaultProcessEngine();

           RepositoryService  repositoryService=processEngine.getRepositoryService();

           DeploymentBuilder builder = repositoryService.createDeployment();

           

           builder.addClasspathResource("diagrams/Approval.bpmn20.xml"); //Here at this line code is getting the exception, As ActivitiIllegalArgumentException....  

           builder.deploy();

           

           ProcessInstance proc = runtimeService.startProcessInstanceByKey("BusinessApproval",variables);

 

}

}

  Getting an IllegalAcitivitiArgumentException.......... 

2 REPLIES 2

frederikherema1
Star Contributor
Star Contributor
Use lower-case "string" as a type for the form-properties, as mentioned in the userguide.

kishore_mutchar
Champ in-the-making
Champ in-the-making
Oho Its Solved, Tans Again……………..