cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with escape characters using 'generate a unit test'

rittmann
Champ in-the-making
Champ in-the-making
Greetings. I have recently begun to dig into Activiti, and so this is my first post in these forums.

While trying the designer - Eclipse Kepler (JEE Edition), designer plugin 5.12 -, I generated a couple of simple diagrams. When I used the Activiti command to generate a unit test, the resulting Java code creates

private String filename = "route"

The problem is that the generated route is taken directly as a windows route, and in Java that causes escape character problems:

private String filename = "D:\activitiDesignerWS\Activiti learning\src\main\resources\diagrams\SimpleProcess.bpmn";

I fix it manually by doubling the slashes:

private String filename = "D:\\activitiDesignerWS\\Activiti learning\\src\\main\\resources\\diagrams\\SimpleProcess.bpmn";

But I'd like to know if there's a way to prevent this behavior, since if we adopt Activiti in my company, our analysts using the designer will probably have not the technical background to perform this kind of operation. Should I install the plugin in an earlier version of Eclipse?
4 REPLIES 4

tiesebarrell
Champ in-the-making
Champ in-the-making
Actually, this issue has been in de Designer plugin for a very long time, so downgrading will not help you, I'm afraid. The unit test style generated by that action is also rather outdated, so it seems time we upgrade that. Please file a jira issue for us to address this.

Mind you, are your analysts going to be doing any kind of work with the unit tests? All that's generated is a starter for a unit test.

Also, please note that we don't actually support Kepler at this point, so you might run into issues.

Ok, I filed the issue in Jira. And I'll keep in mind the lack of support for Kepler, I'll probably re-build the environment with Juno.

As for the analysts, I can't say at this point. I am the responsible for discovering Activiti's functionality and establish how to work with it, and I know that at some point, analysts will want to test their models before committing them to the database. If there is any way to do such a thing without having to go through the unit tests, that will be how they will be doing it definitely. Actually, we've spotted that KIS BPM claims to be able to test and simulate, so probably I'll ask later info about that product.

frederikherema1
Star Contributor
Star Contributor
… or don't use windows Smiley Wink

rittmann
Champ in-the-making
Champ in-the-making
>> … or don't use windows

Hehehe… That is not my choice, unfortunately.