cancel
Showing results for 
Search instead for 
Did you mean: 

activiti diagram image i18n via REST

mfuru
Champ in-the-making
Champ in-the-making
Hi

I want to display the Japanese in Activity diagram.

I can display Japanese Language in Activiti Explorer.
but I can't display Japanese Language in Activiti REST.

Is there a solution?
5 REPLIES 5

jbarrez
Star Contributor
Star Contributor
The diagram generation uses UTF8. I assumed japanese is part of UTF8? Do you have an example process xml I can try?

mfuru
Champ in-the-making
Champ in-the-making
This topics is same problem. (please see attachment instance diagram)
http://forums.activiti.org/content/ugly-generated-instance-diagram

my diagram japanese is  garbled. □□□

mfuru
Champ in-the-making
Champ in-the-making
Thank you for your comment.

Yes. Japanese is part of UTF8.

#Japanese OK
Activiti Explorer > Process > Deployed process definition
Activiti Explorer > Process > Model workspace & Designer

#garbled characters
Activiti Explorer > Administration > Process Definitions > Process Instance > diagram
diagarm.png via REST

<code>
<?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" 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/processdef">
  <process id="GeneralRequest4" name="汎用申請4" isExecutable="true">
    <documentation>1段階承認-日本語</documentation>
    <startEvent id="start" activiti:initiator="employeeName">
      <extensionElements>
        <activiti:formProperty id="dataType" type="string"></activiti:formProperty>
        <activiti:formProperty id="refId" type="string"></activiti:formProperty>
        <activiti:formProperty id="displayId" type="string"></activiti:formProperty>
        <activiti:formProperty id="mailAddr" type="string"></activiti:formProperty>
        <activiti:formProperty id="amount" type="long"></activiti:formProperty>
        <activiti:formProperty id="assignee1" type="string"></activiti:formProperty>
        <activiti:formProperty id="assignee2" type="string"></activiti:formProperty>
      </extensionElements>
    </startEvent>
    <userTask id="approve" name="承認" activiti:assignee="${assignee1}">
      <extensionElements>
        <activiti:formProperty id="decision1" name="承認判断" type="string" required="true"></activiti:formProperty>
      </extensionElements>
    </userTask>
    <exclusiveGateway id="X1"></exclusiveGateway>
    <serviceTask id="approvedMail" name="承認メール送信" activiti:type="mail">
      <extensionElements>
        <activiti:field name="to">
          <activiti:expression>${mailAddr}</activiti:expression>
        </activiti:field>
        <activiti:field name="from">
          <activiti:string><![CDATA[Activiti@mydomain.com]]></activiti:string>
        </activiti:field>
        <activiti:field name="subject">
          <activiti:expression>汎用申請承認メール 申請No:${displayId}</activiti:expression>
        </activiti:field>
        <activiti:field name="text">
          <activiti:expression>申請が承認されました。
申請No:${displayId}</activiti:expression>
        </activiti:field>
        <activiti:field name="charset">
          <activiti:string><![CDATA[UTF-8]]></activiti:string>
        </activiti:field>
      </extensionElements>
    </serviceTask>
    <userTask id="sid-E8A59A8E-4811-4092-AE46-ED24A5381833" name="修正後再申請" activiti:assignee="${employeeName}">
      <documentation>差し戻されました。</documentation>
    </userTask>
    <endEvent id="sid-402718BE-D457-41FC-A87B-361EA13043A8"></endEvent>
    <endEvent id="sid-E93F73D2-1EEE-43C1-A55F-052CB7309DB8"></endEvent>
    <sequenceFlow id="flow3" sourceRef="approvedMail" targetRef="sid-E93F73D2-1EEE-43C1-A55F-052CB7309DB8"></sequenceFlow>
    <sequenceFlow id="flow1" sourceRef="start" targetRef="approve"></sequenceFlow>
    <serviceTask id="deniedMail" name="否認メール送信" activiti:type="mail">
      <extensionElements>
        <activiti:field name="to">
          <activiti:expression>${mailAddr}</activiti:expression>
        </activiti:field>
        <activiti:field name="from">
          <activiti:string><![CDATA[Activiti@mydomain.com]]></activiti:string>
        </activiti:field>
        <activiti:field name="subject">
          <activiti:expression>汎用申請却下メール 申請No:${displayId}</activiti:expression>
        </activiti:field>
        <activiti:field name="text">
          <activiti:expression>申請が却下されました。
申請No:${displayId}</activiti:expression>
        </activiti:field>
        <activiti:field name="charset">
          <activiti:string><![CDATA[UTF-8]]></activiti:string>
        </activiti:field>
      </extensionElements>
    </serviceTask>
    <sequenceFlow id="sid-C9329ECE-0386-4934-BF0A-B610A17AA03B" sourceRef="deniedMail" targetRef="sid-402718BE-D457-41FC-A87B-361EA13043A8"></sequenceFlow>
    <serviceTask id="rejectedMail" name="差し戻しメール送信" activiti:type="mail">
      <extensionElements>
        <activiti:field name="to">
          <activiti:expression>${mailAddr}</activiti:expression>
        </activiti:field>
        <activiti:field name="from">
          <activiti:string><![CDATA[Activiti@mydomain.com]]></activiti:string>
        </activiti:field>
        <activiti:field name="subject">
          <activiti:expression>汎用申請差し戻しメール 申請No:${displayId}</activiti:expression>
        </activiti:field>
        <activiti:field name="text">
          <activiti:expression>申請が差し戻しされました。
申請No:${displayId}</activiti:expression>
        </activiti:field>
        <activiti:field name="charset">
          <activiti:string><![CDATA[UTF-8]]></activiti:string>
        </activiti:field>
      </extensionElements>
    </serviceTask>
    <sequenceFlow id="sid-D61D3C86-70D6-445E-8138-44ABAD59EAF9" sourceRef="rejectedMail" targetRef="sid-E8A59A8E-4811-4092-AE46-ED24A5381833"></sequenceFlow>
    <sequenceFlow id="flow6" sourceRef="sid-E8A59A8E-4811-4092-AE46-ED24A5381833" targetRef="approve"></sequenceFlow>
    <sequenceFlow id="flow2" sourceRef="approve" targetRef="X1"></sequenceFlow>
    <sequenceFlow id="sid-DCDD3B53-2F02-4E53-B49F-27A9818C82F5" name="否認" sourceRef="X1" targetRef="deniedMail">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${decision1== 'denied'}]]></conditionExpression>
    </sequenceFlow>
    <sequenceFlow id="sid-F4B28F08-87C1-4C16-95AE-73A04B79ABC0" name="承認" sourceRef="X1" targetRef="approvedMail">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${decision1== 'approved'}]]></conditionExpression>
    </sequenceFlow>
    <sequenceFlow id="sid-2349D272-E843-4DBE-9E86-933E81283440" name="差し戻し" sourceRef="X1" targetRef="rejectedMail">
      <conditionExpression xsi:type="tFormalExpression"><![CDATA[${decision1== 'rejected'}]]></conditionExpression>
    </sequenceFlow>
    <textAnnotation id="sid-530A5012-D9EF-4A9C-9503-E0E02B8F13A3">
      <text>申請者に割当</text>
    </textAnnotation>
    <association id="sid-C7985B68-2075-4537-9303-2EBE2737E61C" sourceRef="sid-E8A59A8E-4811-4092-AE46-ED24A5381833" targetRef="sid-530A5012-D9EF-4A9C-9503-E0E02B8F13A3"></association>
  </process>
  <bpmndi:BPMNDiagram id="BPMNDiagram_GeneralRequest4">
    <bpmndi:BPMNPlane bpmnElement="GeneralRequest4" id="BPMNPlane_GeneralRequest4">
      <bpmndi:BPMNShape bpmnElement="start" id="BPMNShape_start">
        <omgdc:Bounds height="30.0" width="30.0" x="67.0" y="115.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="approve" id="BPMNShape_approve">
        <omgdc:Bounds height="80.0" width="100.0" x="195.0" y="90.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="X1" id="BPMNShape_X1">
        <omgdc:Bounds height="40.0" width="40.0" x="375.0" y="110.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="approvedMail" id="BPMNShape_approvedMail">
        <omgdc:Bounds height="80.0" width="100.0" x="495.0" y="0.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="sid-E8A59A8E-4811-4092-AE46-ED24A5381833" id="BPMNShape_sid-E8A59A8E-4811-4092-AE46-ED24A5381833">
        <omgdc:Bounds height="80.0" width="100.0" x="630.0" y="185.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="sid-402718BE-D457-41FC-A87B-361EA13043A8" id="BPMNShape_sid-402718BE-D457-41FC-A87B-361EA13043A8">
        <omgdc:Bounds height="28.0" width="28.0" x="705.0" y="116.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="sid-E93F73D2-1EEE-43C1-A55F-052CB7309DB8" id="BPMNShape_sid-E93F73D2-1EEE-43C1-A55F-052CB7309DB8">
        <omgdc:Bounds height="28.0" width="28.0" x="705.0" y="26.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="deniedMail" id="BPMNShape_deniedMail">
        <omgdc:Bounds height="80.0" width="100.0" x="495.0" y="90.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="rejectedMail" id="BPMNShape_rejectedMail">
        <omgdc:Bounds height="80.0" width="100.0" x="495.0" y="185.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="sid-530A5012-D9EF-4A9C-9503-E0E02B8F13A3" id="BPMNShape_sid-530A5012-D9EF-4A9C-9503-E0E02B8F13A3">
        <omgdc:Bounds height="29.0" width="129.0" x="615.5" y="150.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="sid-C7985B68-2075-4537-9303-2EBE2737E61C" id="BPMNShape_sid-C7985B68-2075-4537-9303-2EBE2737E61C">
        <omgdc:Bounds height="6.24522636164167" width="6.463011760303857" x="631.830134744848" y="178.45332431917916"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge bpmnElement="sid-C9329ECE-0386-4934-BF0A-B610A17AA03B" id="BPMNEdge_sid-C9329ECE-0386-4934-BF0A-B610A17AA03B">
        <omgdi:waypoint x="595.0" y="130.0"></omgdi:waypoint>
        <omgdi:waypoint x="705.0" y="130.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1">
        <omgdi:waypoint x="97.0" y="130.0"></omgdi:waypoint>
        <omgdi:waypoint x="195.0" y="130.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2">
        <omgdi:waypoint x="295.0" y="130.5"></omgdi:waypoint>
        <omgdi:waypoint x="375.5" y="130.5"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow3" id="BPMNEdge_flow3">
        <omgdi:waypoint x="595.0" y="40.0"></omgdi:waypoint>
        <omgdi:waypoint x="705.0" y="40.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="sid-C7985B68-2075-4537-9303-2EBE2737E61C" id="BPMNEdge_sid-C7985B68-2075-4537-9303-2EBE2737E61C">
        <omgdi:waypoint x="638.6051080550097" y="185.0"></omgdi:waypoint>
        <omgdi:waypoint x="632.3958742632612" y="179.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="sid-D61D3C86-70D6-445E-8138-44ABAD59EAF9" id="BPMNEdge_sid-D61D3C86-70D6-445E-8138-44ABAD59EAF9">
        <omgdi:waypoint x="595.0" y="225.0"></omgdi:waypoint>
        <omgdi:waypoint x="630.0" y="225.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow6" id="BPMNEdge_flow6">
        <omgdi:waypoint x="680.0" y="265.0"></omgdi:waypoint>
        <omgdi:waypoint x="680.0" y="302.0"></omgdi:waypoint>
        <omgdi:waypoint x="245.0" y="302.0"></omgdi:waypoint>
        <omgdi:waypoint x="245.0" y="170.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="sid-F4B28F08-87C1-4C16-95AE-73A04B79ABC0" id="BPMNEdge_sid-F4B28F08-87C1-4C16-95AE-73A04B79ABC0">
        <omgdi:waypoint x="397.0" y="112.0"></omgdi:waypoint>
        <omgdi:waypoint x="397.0" y="40.0"></omgdi:waypoint>
        <omgdi:waypoint x="495.0" y="40.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="sid-DCDD3B53-2F02-4E53-B49F-27A9818C82F5" id="BPMNEdge_sid-DCDD3B53-2F02-4E53-B49F-27A9818C82F5">
        <omgdi:waypoint x="414.56375838926175" y="130.43624161073825"></omgdi:waypoint>
        <omgdi:waypoint x="495.0" y="130.16722408026754"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="sid-2349D272-E843-4DBE-9E86-933E81283440" id="BPMNEdge_sid-2349D272-E843-4DBE-9E86-933E81283440">
        <omgdi:waypoint x="395.0" y="150.0"></omgdi:waypoint>
        <omgdi:waypoint x="395.0" y="225.0"></omgdi:waypoint>
        <omgdi:waypoint x="495.0" y="225.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</definitions>
</code>

jbarrez
Star Contributor
Star Contributor
I tried it with the pure engine diagram generator, and it seems fine (see attachment, rename .txt to .png) … can someone japanese confirm?
So im guessing it's the REST resource around it that garbles it.

mfuru
Champ in-the-making
Champ in-the-making
I've check the diagram.png .
Japanese has been displayed without any problems .
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.