cancel
Showing results for 
Search instead for 
Did you mean: 

deploy model with cyrillic symbols

mouserok
Champ in-the-making
Champ in-the-making
Hello.
deploy encoding - corrupt, if cyrillic symbols in model

look in "<scriptTask name="тестй"

model before deploy

<?xml version="1.0" encoding="UTF-8"?>
-<definitions targetNamespace="http://www.activiti.org/test" expressionLanguage="http://www.w3.org/1999/XPath" typeLanguage="http://www.w3.org/2001/XMLSchema" xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:activiti="http://activiti.org/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"> -<process isExecutable="true" name="process1" id="process"> <startEvent id="sid-ED61A3A9-AC41-422C-90A3-3B1E830FFBEC"/> <scriptTask name="тестй" id="sid-A04C6448-499B-48CF-B4EF-386FA888EC4F"/> </process> -<bpmndi:BPMNDiagram id="BPMNDiagram_process"> -<bpmndi:BPMNPlane id="BPMNPlane_process" bpmnElement="process"> -<bpmndi:BPMNShape id="BPMNShape_sid-ED61A3A9-AC41-422C-90A3-3B1E830FFBEC" bpmnElement="sid-ED61A3A9-AC41-422C-90A3-3B1E830FFBEC"> <omgdc:Bounds y="219.33333587646484" x="261.3333282470703" width="30.0" height="30.0"/> </bpmndi:BPMNShape> -<bpmndi:BPMNShape id="BPMNShape_sid-A04C6448-499B-48CF-B4EF-386FA888EC4F" bpmnElement="sid-A04C6448-499B-48CF-B4EF-386FA888EC4F"> <omgdc:Bounds y="265.33333587646484" x="474.3333282470703" width="100.0" height="80.0"/> </bpmndi:BPMNShape> </bpmndi:BPMNPlane> </bpmndi:BPMNDiagram> </definitions>

after deploy
<definitions typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://www.activiti.org/test"><process id="process" name="process1" isExecutable="true"><startEvent id="sid-ED61A3A9-AC41-422C-90A3-3B1E830FFBEC"/><scriptTask id="sid-A04C6448-499B-48CF-B4EF-386FA888EC4F" name="??????????"/></process><bpmndi:BPMNDiagram id="BPMNDiagram_process"><bpmndi:BPMNPlane bpmnElement="process" id="BPMNPlane_process"><bpmndi:BPMNShape bpmnElement="sid-ED61A3A9-AC41-422C-90A3-3B1E830FFBEC" id="BPMNShape_sid-ED61A3A9-AC41-422C-90A3-3B1E830FFBEC"><omgdc:Bounds height="30.0" width="30.0" x="261.3333282470703" y="219.33333587646484"/></bpmndi:BPMNShape><bpmndi:BPMNShape bpmnElement="sid-A04C6448-499B-48CF-B4EF-386FA888EC4F" id="BPMNShape_sid-A04C6448-499B-48CF-B4EF-386FA888EC4F"><omgdc:Bounds height="80.0" width="100.0" x="474.3333282470703" y="265.33333587646484"/></bpmndi:BPMNShape></bpmndi:BPMNPlane></bpmndi:BPMNDiagram></definitions>
6 REPLIES 6

iam
Champ in-the-making
Champ in-the-making
And your file is in UTF-8 too?
I have no problem with cyrillic in my processes.

mouserok
Champ in-the-making
Champ in-the-making
And your file is in UTF-8 too?
I have no problem with cyrillic in my processes.
yes!
it is created with the "Activiti Modeler" and then deployed with broken encoding

udoderk
Champ in-the-making
Champ in-the-making
Hi mouserok,

if i try to deploy your example using Activiti Explorer (Activiti 5.10) , the exception " Content ist not allowed in Prolog." will be thrown:
r
       at org.activiti.engine.impl.util.xml.Parse.execute(Parse.java:136)
       at org.activiti.engine.impl.bpmn.parser.BpmnParse.execute(BpmnParse.java:225)
       at org.activiti.engine.impl.bpmn.deployer.BpmnDeployer.deploy(BpmnDeployer.java:90)
       at org.activiti.engine.impl.persistence.deploy.DeploymentCache.deploy(DeploymentCache.java:38)
       at org.activiti.engine.impl.persistence.entity.DeploymentManager.insertDeployment(DeploymentManager.java:42)
       at org.activiti.engine.impl.cmd.DeployCmd.execute(DeployCmd.java:59)
       at org.activiti.engine.impl.cmd.DeployCmd.execute(DeployCmd.java:31)
       at org.activiti.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:24)
       at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:42)
       at org.activiti.spring.SpringTransactionInterceptor$1.doInTransaction(SpringTransactionInterceptor.java:42)
       at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:130)
       at org.activiti.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:40)
       at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:33)
       at org.activiti.engine.impl.RepositoryServiceImpl.deploy(RepositoryServiceImpl.java:54)
       at org.activiti.engine.impl.repository.DeploymentBuilderImpl.deploy(DeploymentBuilderImpl.java:106)
       at org.activiti.explorer.ui.management.deployment.DeploymentUploadReceiver.deployUploadedFile(DeploymentUploadReceiver.java:83)
       at org.activiti.explorer.ui.management.deployment.DeploymentUploadReceiver.uploadFinished(DeploymentUploadReceiver.java:71)
       at org.activiti.explorer.ui.custom.UploadComponent.uploadFinished(UploadComponent.java:173)

But if i use my business with process cyrillic symbols, i have no problem: The cyrillic symbols are correctly displayed.

My example:

<?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="process1" name="process1">
    <startEvent id="startevent1" name="Начало"></startEvent>
    <userTask id="usertask1" name="задача пользователя " activiti:assignee="kermit" activiti:candidateUsers="kermit">
      <extensionElements>
        <activiti:formProperty id="id111" name="имя поля 1" type="string" required="true" readable="true" writable="true"></activiti:formProperty>
      </extensionElements>
    </userTask>
    <sequenceFlow id="flow1" name="" sourceRef="startevent1" targetRef="usertask1"></sequenceFlow>
    <endEvent id="endevent1" name="Завершение"></endEvent>
    <sequenceFlow id="flow2" name="" sourceRef="usertask1" targetRef="endevent1"></sequenceFlow>
  </process>
  <bpmndi:BPMNDiagram id="BPMNDiagram_process1">
    <bpmndi:BPMNPlane bpmnElement="process1" id="BPMNPlane_process1">
      <bpmndi:BPMNShape bpmnElement="startevent1" id="BPMNShape_startevent1">
        <omgdc:Bounds height="35" width="35" x="80" y="180"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="usertask1" id="BPMNShape_usertask1">
        <omgdc:Bounds height="55" width="105" x="160" y="170"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="endevent1" id="BPMNShape_endevent1">
        <omgdc:Bounds height="35" width="35" x="320" y="180"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge bpmnElement="flow1" id="BPMNEdge_flow1">
        <omgdi:waypoint x="115" y="197"></omgdi:waypoint>
        <omgdi:waypoint x="160" y="197"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="flow2" id="BPMNEdge_flow2">
        <omgdi:waypoint x="265" y="197"></omgdi:waypoint>
        <omgdi:waypoint x="320" y="197"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</definitions>

Screenshot
[img]http://img69.imageshack.us/img69/7549/testcyrlismbl.png[/img]

P.S i created this test using not Modeler but Designer. I created the empty xml file and then fill it with content checking before deploying it code page.

mouserok
Champ in-the-making
Champ in-the-making
it occurs when using Oracle DB
how to correct the coding?

mouserok
Champ in-the-making
Champ in-the-making
the decision is found

in tomcat
web.xml
uncomment block
    <filter>
        <filter-name>setCharacterEncodingFilter</filter-name>
        <filter-class>org.apache.catalina.filters.SetCharacterEncodingFilter</filter-class>
        <init-param>
            <param-name>encoding</param-name>
            <param-value>UTF-8</param-value>
        </init-param>
        <async-supported>true</async-supported>
    </filter>

udoderk
Champ in-the-making
Champ in-the-making
the decision is found

in tomcat
web.xml
uncomment block…

The SetCharacterEncodingFilter
has the tomcat since as core version.7.0.20
Before 7.0.20 this class was allocated into /examples order.
Notice, that not only the web.xml under config order must be changed! The server.xml must bechanged changed too.

Because i use the tomcat tomcat-6.0.32, delivered with activiti 5.10, i have no problem with cyrillic symbols. (But it is possible, that encodig was set in other place (i-e java code)
P.S
User agents don't always include character encoding information in requests. Depending on the how the request is processed, usually the default encoding of ISO-8859-1 is used. This is not always desirable. This filter provides options for setting that encoding or forcing it to a particular value. Essentially this filter calls ServletRequest.setCharacterEncoding() method.

Effectively the value set by this filter is used when parsing parameters in a POST request, if parameter parsing occurs later than this filter. Thus the order of filter mappings is important. Note that the encoding for GET requests is not set here, but on a Connector.
(c)