cancel
Showing results for 
Search instead for 
Did you mean: 

Sub Process as Compensation Handler

gokceng1
Champ in-the-making
Champ in-the-making
Hi,

I noticed that org.activiti.bpmn.converter.parser.SubProcessParser.parse method does not check org.activiti.bpmn.constants.BpmnXMLConstants.ATTRIBUTE_ACTIVITY_ISFORCOMPENSATION property. So deploying subprocess which has isForCompensation="true" causes

Caused by: org.activiti.engine.ActivitiException: Errors while parsing:
compensation boundary catch must be connected to element with isForCompensation=true | _38 | line 169 | column 86
   at org.activiti.engine.impl.bpmn.parser.BpmnParse.execute(BpmnParse.java:191) ~[activiti-engine-5.12.jar:5.12]
….

at org.activiti.engine.impl.bpmn.parser.handler.AbstractBpmnParseHandler line 236. Is this a bug?

If it is, may I contribute to this, I worked hard to find it  Smiley Happy
8 REPLIES 8

frederikherema1
Star Contributor
Star Contributor
This is indeed an issue. Feel free to create a pull-request for this or suggest a patch Smiley Wink

gokceng1
Champ in-the-making
Champ in-the-making
Thank you frederik, I will check it out Smiley Happy

Edit: http://docs.codehaus.org/display/ACT/Developers+Guide, is this link up-to-date?

jbarrez
Star Contributor
Star Contributor
No, unfortunately not.

Basically you 'fork' the repository of Activiti on Github (https://github.com/Activiti/Activiti),  clone the repo to your local machine, o some changes, commit and push them, and open a pull request through the pull request mechanism of github.

gokceng1
Champ in-the-making
Champ in-the-making
Thank you joram, I'm not familiar with github but tonight I will try to accomplish this issue.

jbarrez
Star Contributor
Star Contributor
If you got any problems doing so, just posts and we'll try to help you along the way!

gokceng1
Champ in-the-making
Champ in-the-making
Hey, thank you for your kindness.
I get the project, I'm using Intellij Idea. I tried Eclipse Juno but it didn't see any projects in root, I'm surprised. Anyway, I opened the projects in Idea, maven clean, compile worked. There are some tests that are not passing, I don't know whether they are important. Here:


Tests in error:
  testDeployRevisedProcessAfterDeleteOnOtherProcessEngine(org.activiti.engine.test.cache.ProcessDefinitionCacheTest)
  testStartProcessInstanceByIdAfterReboot(org.activiti.engine.test.cache.ProcessDefinitionCacheTest)

Tests run: 1079, Failures: 0, Errors: 2, Skipped: 0

[INFO] ————————————————————————
[INFO] Reactor Summary:
[INFO]
[INFO] Activiti …………………………………… SUCCESS [0.001s]
[INFO] Activiti - BPMN Model ……………………….. SUCCESS [2.470s]
[INFO] Activiti - BPMN Converter ……………………. SUCCESS [1.734s]
[INFO] Activiti - Engine …………………………… FAILURE [2:04.757s]
[INFO] Activiti - Spring …………………………… SKIPPED
[INFO] Activiti - BPMN Layout ………………………. SKIPPED
[INFO] Activiti - JSON Converter ……………………. SKIPPED
[INFO] Activiti - Simple Workflow …………………… SKIPPED
[INFO] Activiti - REST - Common …………………….. SKIPPED
[INFO] Activiti - Modeler ………………………….. SKIPPED
[INFO] Activiti - Diagram - REST ……………………. SKIPPED
[INFO] Activiti - Explorer …………………………. SKIPPED
[INFO] Activiti - Rest - Classes ……………………. SKIPPED
[INFO] Activiti - Rest …………………………….. SKIPPED
[INFO] Activiti - Webapp - Explorer V2 ………………. SKIPPED
[INFO] Activiti - Cxf ……………………………… SKIPPED
[INFO] Activiti - OSGi …………………………….. SKIPPED
[INFO] Activiti - Camel ……………………………. SKIPPED
[INFO] Activiti - Mule …………………………….. SKIPPED
[INFO] Activiti - Cdi ……………………………… SKIPPED
[INFO] ————————————————————————
[INFO] BUILD FAILURE
[INFO] ————————————————————————
[INFO] Total time: 2:09.507s
[INFO] Finished at: Mon Mar 25 20:24:06 VET 2013
[INFO] Final Memory: 19M/57M
[INFO] ————————————————————————
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.7.1:test (default-test) on project activiti-engine: There are test failures.
[ERROR]
[ERROR] Please refer to D:\gitRepo\Activiti\modules\activiti-engine\target\surefire-reports for the individual test results.
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.7.1:test (default-test) on project activiti-engine: There are test failures.

Please refer to D:\gitRepo\Activiti\modules\activiti-engine\target\surefire-reports for the individual test results.
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:213)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
at org.codehaus.classworlds.Launcher.main(Launcher.java:47)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
Caused by: org.apache.maven.plugin.MojoFailureException: There are test failures.

Please refer to D:\gitRepo\Activiti\modules\activiti-engine\target\surefire-reports for the individual test results.
at org.apache.maven.plugin.surefire.SurefireHelper.reportExecution(SurefireHelper.java:74)
at org.apache.maven.plugin.surefire.SurefirePlugin.execute(SurefirePlugin.java:631)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
… 25 more

The maven profile I'm using is distro, is that ok?

I'm asking too many questions, I know  Smiley Indifferent

I've created a pull request. I've added a test case, similar to yours, and a new bpmn for this test.
This is my first commit to an open source project, I'm sorry in advance in a case of mistake.

jbarrez
Star Contributor
Star Contributor
The maven profile I'm using is distro, is that ok?

Yes that is ok. You can also run -Pcheck, that is quicker.

Don't worry about the failing tests, I fixed those yesterday on master. They were indeed failing for everyone.

I've created a pull request. I've added a test case, similar to yours, and a new bpmn for this test.
This is my first commit to an open source project, I'm sorry in advance in a case of mistake.

Awesome! We'll verify the pull request shortly! Thanks for the effort!

gokceng1
Champ in-the-making
Champ in-the-making
Thnak you joram.