AnsweredAssumed Answered

Encoding error using Chinese character in form properties

Question asked by guoweizhan on Sep 11, 2014
Latest reply on Sep 15, 2014 by jbarrez
Encoding error using Chinese character in form properties when invoked by API or activiti-explorer, it works fine in Modeler, Can you help me about this issue?
the BPM file as follows:

<?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:xsd="http://www.w3.org/2001/XMLSchema" 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="http://www.activiti.org/processdef">
  <process id="afterSaleProcessTest" isExecutable="true">
    <startEvent id="SalesProperties"/>
    <userTask id="sid-3C0CCE0F-AC0E-4CE1-9786-05CF15F6B3B9" name="Submit" activiti:assignee="kermit">
      <extensionElements>
        <activiti:formProperty id="hjzje" name="hjzje" type="long"/>
        <activiti:formProperty id="title" name="title" type="string"/>
      </extensionElements>
    </userTask>
    <sequenceFlow id="sid-F411991D-566D-4124-BF96-F1447A946B7A" sourceRef="SalesProperties" targetRef="sid-3C0CCE0F-AC0E-4CE1-9786-05CF15F6B3B9"/>
    <userTask id="sid-EF0723ED-6E9C-416B-8CB1-7E23F29127C6" name="Approve" activiti:assignee="kermit">
      <extensionElements>
        <activiti:formProperty id="status" name="status" type="enum" expression="1">
          <activiti:value id="pass" name="同意"/>
          <activiti:value id="failed" name="拒绝"/>
        </activiti:formProperty>
      </extensionElements>
    </userTask>
    <endEvent id="sid-830C1658-A034-40A1-B0CB-F3B443ACF273"/>
    <sequenceFlow id="sid-2C9B54C7-F671-4146-9F14-1DA8FD3FC126" sourceRef="sid-EF0723ED-6E9C-416B-8CB1-7E23F29127C6" targetRef="sid-830C1658-A034-40A1-B0CB-F3B443ACF273"/>
    <exclusiveGateway id="sid-4F3B3F14-2D09-4DE7-859B-121C3120A57E"/>
    <sequenceFlow id="sid-6A3EB15B-65F9-42F5-BB8C-A86C537613A4" sourceRef="sid-3C0CCE0F-AC0E-4CE1-9786-05CF15F6B3B9" targetRef="sid-4F3B3F14-2D09-4DE7-859B-121C3120A57E"/>
    <sequenceFlow id="sid-32DDCB19-413E-4AF6-8236-267912EFF0DE" sourceRef="sid-4F3B3F14-2D09-4DE7-859B-121C3120A57E" targetRef="sid-EF0723ED-6E9C-416B-8CB1-7E23F29127C6">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${hjzje >=1000} ]]></conditionExpression>
    </sequenceFlow>
    <sequenceFlow id="sid-60D5AFA1-2AA9-402D-9C2C-887534F49D3A" sourceRef="sid-4F3B3F14-2D09-4DE7-859B-121C3120A57E" targetRef="sid-8060A6D6-385C-4403-8D1B-116D55EFF659">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${hjzje < 1000} ]]></conditionExpression>
    </sequenceFlow>
    <sequenceFlow id="sid-5C18D8CB-A331-4DDF-AFE1-46BE33178DD8" sourceRef="sid-8060A6D6-385C-4403-8D1B-116D55EFF659" targetRef="sid-830C1658-A034-40A1-B0CB-F3B443ACF273"/>
    <serviceTask id="sid-8060A6D6-385C-4403-8D1B-116D55EFF659" name="smaller" activiti:class="com.mi.mibpm.task.service.HelloWorld">
      <documentation>test is fine</documentation>
      <extensionElements>
         <activiti:field name="emailTemplate" stringValue="ok.html" />
      </extensionElements>
    </serviceTask>
  </process>
  <bpmndi:BPMNDiagram id="BPMNDiagram_process">
    <bpmndi:BPMNPlane bpmnElement="process" id="BPMNPlane_process">
      <bpmndi:BPMNShape bpmnElement="SalesProperties" id="BPMNShape_SalesProperties">
        <omgdc:Bounds height="30.0" width="30.0" x="242.0" y="186.0"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="sid-3C0CCE0F-AC0E-4CE1-9786-05CF15F6B3B9" id="BPMNShape_sid-3C0CCE0F-AC0E-4CE1-9786-05CF15F6B3B9">
        <omgdc:Bounds height="80.0" width="100.0" x="317.0" y="161.0"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="sid-EF0723ED-6E9C-416B-8CB1-7E23F29127C6" id="BPMNShape_sid-EF0723ED-6E9C-416B-8CB1-7E23F29127C6">
        <omgdc:Bounds height="80.0" width="100.0" x="570.0" y="315.0"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="sid-830C1658-A034-40A1-B0CB-F3B443ACF273" id="BPMNShape_sid-830C1658-A034-40A1-B0CB-F3B443ACF273">
        <omgdc:Bounds height="28.0" width="28.0" x="870.0" y="240.0"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="sid-4F3B3F14-2D09-4DE7-859B-121C3120A57E" id="BPMNShape_sid-4F3B3F14-2D09-4DE7-859B-121C3120A57E">
        <omgdc:Bounds height="40.0" width="40.0" x="462.0" y="181.0"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="sid-8060A6D6-385C-4403-8D1B-116D55EFF659" id="BPMNShape_sid-8060A6D6-385C-4403-8D1B-116D55EFF659">
        <omgdc:Bounds height="80.0" width="100.0" x="555.0" y="45.0"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge bpmnElement="sid-6A3EB15B-65F9-42F5-BB8C-A86C537613A4" id="BPMNEdge_sid-6A3EB15B-65F9-42F5-BB8C-A86C537613A4">
        <omgdi:waypoint x="417.0" y="201.2164502164502"/>
        <omgdi:waypoint x="462.4130434782609" y="201.41304347826087"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="sid-5C18D8CB-A331-4DDF-AFE1-46BE33178DD8" id="BPMNEdge_sid-5C18D8CB-A331-4DDF-AFE1-46BE33178DD8">
        <omgdi:waypoint x="655.0" y="85.0"/>
        <omgdi:waypoint x="884.0" y="85.0"/>
        <omgdi:waypoint x="884.0" y="240.0"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="sid-2C9B54C7-F671-4146-9F14-1DA8FD3FC126" id="BPMNEdge_sid-2C9B54C7-F671-4146-9F14-1DA8FD3FC126">
        <omgdi:waypoint x="670.0" y="355.0"/>
        <omgdi:waypoint x="884.0" y="355.0"/>
        <omgdi:waypoint x="884.0" y="268.0"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="sid-32DDCB19-413E-4AF6-8236-267912EFF0DE" id="BPMNEdge_sid-32DDCB19-413E-4AF6-8236-267912EFF0DE">
        <omgdi:waypoint x="501.5" y="201.5"/>
        <omgdi:waypoint x="620.0" y="201.5"/>
        <omgdi:waypoint x="620.0" y="315.0"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="sid-F411991D-566D-4124-BF96-F1447A946B7A" id="BPMNEdge_sid-F411991D-566D-4124-BF96-F1447A946B7A">
        <omgdi:waypoint x="272.0" y="201.0"/>
        <omgdi:waypoint x="317.0" y="201.0"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="sid-60D5AFA1-2AA9-402D-9C2C-887534F49D3A" id="BPMNEdge_sid-60D5AFA1-2AA9-402D-9C2C-887534F49D3A">
        <omgdi:waypoint x="492.7510460251046" y="191.7510460251046"/>
        <omgdi:waypoint x="562.9399141630902" y="125.0"/>
      </bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</definitions>

Thanks,
Weizhan Guo

Outcomes