summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Kammermann2012-09-10 04:39:51 (EDT)
committerFlorian Kammermann2012-09-10 04:39:51 (EDT)
commit5df2cac4ee7ef9062cf1632ee897aff954dbe810 (patch)
tree5d6d72aaf4632a187d70ac3b6380dbf4d83a051a
parentcb060f0f2e0b0c43cc225047d7704d65a090f6e7 (diff)
downloadorg.eclipse.stardust.ide-5df2cac4ee7ef9062cf1632ee897aff954dbe810.zip
org.eclipse.stardust.ide-5df2cac4ee7ef9062cf1632ee897aff954dbe810.tar.gz
org.eclipse.stardust.ide-5df2cac4ee7ef9062cf1632ee897aff954dbe810.tar.bz2
Some refactoring; Added Support Parallel Gateways, Mixed-Directionrefs/changes/97/7697/1
Gateways, Sequence of Gateways; Create Application-Activity for ServiceTask; Create Route for AbstractTask Change-Id: I44273995349764cdc147e8d1f44b975841ee57d2
-rw-r--r--model/org.eclipse.stardust.model.bpmn2.transform/.settings/org.eclipse.jdt.core.prefs286
-rw-r--r--model/org.eclipse.stardust.model.bpmn2.transform/.settings/org.eclipse.jdt.ui.prefs4
-rw-r--r--model/org.eclipse.stardust.model.bpmn2.transform/.settings/org.eclipse.m2e.core.prefs5
-rw-r--r--model/org.eclipse.stardust.model.bpmn2.transform/src/main/java/org/eclipse/stardust/model/bpmn2/transform/TransformationControl.java12
-rw-r--r--model/org.eclipse.stardust.model.bpmn2.transform/src/main/java/org/eclipse/stardust/model/bpmn2/transform/Transformator.java6
-rw-r--r--model/org.eclipse.stardust.model.bpmn2.transform/src/main/java/org/eclipse/stardust/model/bpmn2/transform/xpdl/Bpmn2StardustXPDL.java (renamed from model/org.eclipse.stardust.model.bpmn2.transform/src/main/java/org/eclipse/stardust/model/bpmn2/transform/carnot/Bpmn2CarnotXPDL.java)324
-rw-r--r--model/org.eclipse.stardust.model.bpmn2.transform/src/main/java/org/eclipse/stardust/model/bpmn2/transform/xpdl/Bpmn2StardustXPDLExtension.java (renamed from model/org.eclipse.stardust.model.bpmn2.transform/src/main/java/org/eclipse/stardust/model/bpmn2/transform/carnot/Bpmn2CarnotXPDLExtension.java)28
-rw-r--r--model/org.eclipse.stardust.model.bpmn2.transform/src/main/java/org/eclipse/stardust/model/bpmn2/transform/xpdl/DialectStardustXPDL.java (renamed from model/org.eclipse.stardust.model.bpmn2.transform/src/main/java/org/eclipse/stardust/model/bpmn2/transform/carnot/DialectCarnotXPDL.java)10
-rw-r--r--model/org.eclipse.stardust.model.bpmn2.transform/src/main/java/org/eclipse/stardust/model/bpmn2/transform/xpdl/elements/Gateway2Stardust.java340
-rw-r--r--model/org.eclipse.stardust.model.bpmn2.transform/src/main/java/org/eclipse/stardust/model/bpmn2/transform/xpdl/elements/Gateway2Stardust_Bck.java334
-rw-r--r--model/org.eclipse.stardust.model.bpmn2.transform/src/main/java/org/eclipse/stardust/model/bpmn2/transform/xpdl/elements/Sequence2Stardust.java84
-rw-r--r--model/org.eclipse.stardust.model.bpmn2.transform/src/main/java/org/eclipse/stardust/model/bpmn2/transform/xpdl/helper/BpmnModelQuery.java37
-rw-r--r--model/org.eclipse.stardust.model.bpmn2.transform/src/main/java/org/eclipse/stardust/model/bpmn2/transform/xpdl/helper/BpmnTimerCycle.java91
-rw-r--r--model/org.eclipse.stardust.model.bpmn2.transform/src/main/java/org/eclipse/stardust/model/bpmn2/transform/xpdl/helper/CarnotModelQuery.java107
-rw-r--r--model/org.eclipse.stardust.model.bpmn2.transform/src/main/java/org/eclipse/stardust/model/bpmn2/transform/xpdl/helper/DocumentationTool.java44
-rw-r--r--model/org.eclipse.stardust.model.bpmn2.transform/src/test/java/org/eclipse/stardust/test/model/transformation/bpmn/Bpmn2CarnotXPDLTest.java392
-rw-r--r--model/org.eclipse.stardust.model.bpmn2.transform/src/test/resources/models/bpmn/MixedGateway.bpmn312
-rw-r--r--model/org.eclipse.stardust.model.bpmn2.transform/src/test/resources/models/bpmn/ParallelGatewaysSingle.bpmn322
-rw-r--r--model/org.eclipse.stardust.model.bpmn2.transform/src/test/resources/models/bpmn/SequentialMixedGateway.bpmn307
-rw-r--r--model/org.eclipse.stardust.model.bpmn2.transform/src/test/resources/models/bpmn/StartEventMessage.bpmn2
-rw-r--r--model/org.eclipse.stardust.model.bpmn2.transform/src/test/resources/models/bpmn/StartEventNone.bpmn2
-rw-r--r--model/org.eclipse.stardust.model.bpmn2.transform/src/test/resources/models/bpmn/UserTask.bpmn2
22 files changed, 2725 insertions, 326 deletions
diff --git a/model/org.eclipse.stardust.model.bpmn2.transform/.settings/org.eclipse.jdt.core.prefs b/model/org.eclipse.stardust.model.bpmn2.transform/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..e2bd5d4
--- /dev/null
+++ b/model/org.eclipse.stardust.model.bpmn2.transform/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,286 @@
+#Mon Sep 10 10:36:21 CEST 2012
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
+org.eclipse.jdt.core.compiler.source=1.5
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=80
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=true
+org.eclipse.jdt.core.formatter.join_wrapped_lines=true
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=120
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/model/org.eclipse.stardust.model.bpmn2.transform/.settings/org.eclipse.jdt.ui.prefs b/model/org.eclipse.stardust.model.bpmn2.transform/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 0000000..3a35b8a
--- /dev/null
+++ b/model/org.eclipse.stardust.model.bpmn2.transform/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,4 @@
+#Mon Sep 10 10:36:21 CEST 2012
+eclipse.preferences.version=1
+formatter_profile=_Eclipse based LongLines
+formatter_settings_version=12
diff --git a/model/org.eclipse.stardust.model.bpmn2.transform/.settings/org.eclipse.m2e.core.prefs b/model/org.eclipse.stardust.model.bpmn2.transform/.settings/org.eclipse.m2e.core.prefs
new file mode 100644
index 0000000..92aa475
--- /dev/null
+++ b/model/org.eclipse.stardust.model.bpmn2.transform/.settings/org.eclipse.m2e.core.prefs
@@ -0,0 +1,5 @@
+#Mon Sep 10 09:43:36 CEST 2012
+activeProfiles=
+eclipse.preferences.version=1
+resolveWorkspaceProjects=true
+version=1
diff --git a/model/org.eclipse.stardust.model.bpmn2.transform/src/main/java/org/eclipse/stardust/model/bpmn2/transform/TransformationControl.java b/model/org.eclipse.stardust.model.bpmn2.transform/src/main/java/org/eclipse/stardust/model/bpmn2/transform/TransformationControl.java
index 3cf4d06..48d2f1d 100644
--- a/model/org.eclipse.stardust.model.bpmn2.transform/src/main/java/org/eclipse/stardust/model/bpmn2/transform/TransformationControl.java
+++ b/model/org.eclipse.stardust.model.bpmn2.transform/src/main/java/org/eclipse/stardust/model/bpmn2/transform/TransformationControl.java
@@ -254,6 +254,8 @@ public class TransformationControl {
processManualTask((ManualTask)activity, container);
} else if (activity instanceof BusinessRuleTask) {
processBusinessRuleTask((BusinessRuleTask)activity, container);
+ } else {
+ processAbstractTask((Task)activity, container);
}
} else if (activity instanceof SubProcess) {
processSubProcess((SubProcess)activity, container);
@@ -334,8 +336,12 @@ public class TransformationControl {
}
private void processParallelGateway(ParallelGateway gateway, FlowElementsContainer container) {
- processingInfo += "ParallelGateway" + NOT_SUPPORTED;
- //transf.addParallelGateway(gateway, container);
+ //processingInfo += "ParallelGateway" + NOT_SUPPORTED;
+ transf.addParallelGateway(gateway, container);
+ }
+
+ private void processAbstractTask(Task task, FlowElementsContainer container) {
+ transf.addAbstractTask(task, container);
}
private void processUserTask(UserTask activity, FlowElementsContainer container) {
@@ -344,7 +350,7 @@ public class TransformationControl {
private void processServiceTask(ServiceTask activity, FlowElementsContainer container) {
processingInfo += "ServiceTask" + NOT_SUPPORTED;
-
+ transf.addServiceTask(activity, container);
}
private void processSubProcessDefault(SubProcess activity, FlowElementsContainer container) {
diff --git a/model/org.eclipse.stardust.model.bpmn2.transform/src/main/java/org/eclipse/stardust/model/bpmn2/transform/Transformator.java b/model/org.eclipse.stardust.model.bpmn2.transform/src/main/java/org/eclipse/stardust/model/bpmn2/transform/Transformator.java
index 34bb12d..3127131 100644
--- a/model/org.eclipse.stardust.model.bpmn2.transform/src/main/java/org/eclipse/stardust/model/bpmn2/transform/Transformator.java
+++ b/model/org.eclipse.stardust.model.bpmn2.transform/src/main/java/org/eclipse/stardust/model/bpmn2/transform/Transformator.java
@@ -27,8 +27,10 @@ import org.eclipse.bpmn2.Participant;
import org.eclipse.bpmn2.PartnerEntity;
import org.eclipse.bpmn2.Process;
import org.eclipse.bpmn2.SequenceFlow;
+import org.eclipse.bpmn2.ServiceTask;
import org.eclipse.bpmn2.StartEvent;
import org.eclipse.bpmn2.SubProcess;
+import org.eclipse.bpmn2.Task;
import org.eclipse.bpmn2.UserTask;
/**
@@ -43,6 +45,8 @@ public interface Transformator {
public void addProcess(Process process);
+ public void addAbstractTask(Task task, FlowElementsContainer container);
+
public void addUserTask(UserTask task, FlowElementsContainer container);
public void addStartEvent(StartEvent event, FlowElementsContainer container);
@@ -75,5 +79,7 @@ public interface Transformator {
public void addPartnerEntity(PartnerEntity entity);
+ public void addServiceTask(ServiceTask activity, FlowElementsContainer container);
+
}
diff --git a/model/org.eclipse.stardust.model.bpmn2.transform/src/main/java/org/eclipse/stardust/model/bpmn2/transform/carnot/Bpmn2CarnotXPDL.java b/model/org.eclipse.stardust.model.bpmn2.transform/src/main/java/org/eclipse/stardust/model/bpmn2/transform/xpdl/Bpmn2StardustXPDL.java
index dbdf9fe..b8b0c7e 100644
--- a/model/org.eclipse.stardust.model.bpmn2.transform/src/main/java/org/eclipse/stardust/model/bpmn2/transform/carnot/Bpmn2CarnotXPDL.java
+++ b/model/org.eclipse.stardust.model.bpmn2.transform/src/main/java/org/eclipse/stardust/model/bpmn2/transform/xpdl/Bpmn2StardustXPDL.java
@@ -8,14 +8,17 @@
* Contributors:
* ITpearls - initial API and implementation and/or initial documentation
*******************************************************************************/
-package org.eclipse.stardust.model.bpmn2.transform.carnot;
+package org.eclipse.stardust.model.bpmn2.transform.xpdl;
+import static org.eclipse.stardust.model.xpdl.builder.BpmModelBuilder.newApplicationActivity;
import static org.eclipse.stardust.model.xpdl.builder.BpmModelBuilder.newBpmModel;
import static org.eclipse.stardust.model.xpdl.builder.BpmModelBuilder.newManualActivity;
import static org.eclipse.stardust.model.xpdl.builder.BpmModelBuilder.newManualTrigger;
+import static org.eclipse.stardust.model.xpdl.builder.BpmModelBuilder.newModelDiagram;
import static org.eclipse.stardust.model.xpdl.builder.BpmModelBuilder.newOrganization;
import static org.eclipse.stardust.model.xpdl.builder.BpmModelBuilder.newProcessDefinition;
import static org.eclipse.stardust.model.xpdl.builder.BpmModelBuilder.newRole;
+import static org.eclipse.stardust.model.xpdl.builder.BpmModelBuilder.newRouteActivity;
import static org.eclipse.stardust.model.xpdl.builder.BpmModelBuilder.newSubProcessActivity;
import java.io.File;
@@ -27,7 +30,6 @@ import java.util.List;
import org.apache.log4j.Logger;
import org.eclipse.bpmn2.Activity;
-import org.eclipse.bpmn2.CatchEvent;
import org.eclipse.bpmn2.DataObject;
import org.eclipse.bpmn2.DataObjectReference;
import org.eclipse.bpmn2.DataStoreReference;
@@ -51,65 +53,67 @@ import org.eclipse.bpmn2.Process;
import org.eclipse.bpmn2.Resource;
import org.eclipse.bpmn2.ResourceRole;
import org.eclipse.bpmn2.SequenceFlow;
+import org.eclipse.bpmn2.ServiceTask;
import org.eclipse.bpmn2.StartEvent;
import org.eclipse.bpmn2.SubProcess;
+import org.eclipse.bpmn2.Task;
import org.eclipse.bpmn2.TimerEventDefinition;
import org.eclipse.bpmn2.UserTask;
-import org.eclipse.emf.common.util.EList;
import org.eclipse.stardust.engine.api.model.PredefinedConstants;
import org.eclipse.stardust.engine.core.extensions.triggers.timer.TimerTriggerValidator;
import org.eclipse.stardust.engine.extensions.jms.trigger.JMSTriggerValidator;
import org.eclipse.stardust.engine.extensions.mail.trigger.MailTriggerValidator;
import org.eclipse.stardust.model.bpmn2.transform.Transformator;
import org.eclipse.stardust.model.bpmn2.transform.util.Bpmn2ProxyResolver;
+import org.eclipse.stardust.model.bpmn2.transform.xpdl.elements.Gateway2Stardust;
+import org.eclipse.stardust.model.bpmn2.transform.xpdl.elements.Sequence2Stardust;
+import org.eclipse.stardust.model.bpmn2.transform.xpdl.helper.BpmnModelQuery;
+import org.eclipse.stardust.model.bpmn2.transform.xpdl.helper.CarnotModelQuery;
+import org.eclipse.stardust.model.bpmn2.transform.xpdl.helper.DocumentationTool;
import org.eclipse.stardust.model.xpdl.builder.common.AbstractElementBuilder;
import org.eclipse.stardust.model.xpdl.builder.defaults.DefaultTypesInitializer;
import org.eclipse.stardust.model.xpdl.builder.utils.XpdlModelIoUtils;
import org.eclipse.stardust.model.xpdl.builder.utils.XpdlModelUtils;
import org.eclipse.stardust.model.xpdl.carnot.ActivityType;
-import org.eclipse.stardust.model.xpdl.carnot.CarnotWorkflowModelFactory;
-import org.eclipse.stardust.model.xpdl.carnot.CarnotWorkflowModelPackage;
import org.eclipse.stardust.model.xpdl.carnot.DescriptionType;
import org.eclipse.stardust.model.xpdl.carnot.IModelParticipant;
-import org.eclipse.stardust.model.xpdl.carnot.JoinSplitType;
import org.eclipse.stardust.model.xpdl.carnot.ModelType;
-import org.eclipse.stardust.model.xpdl.carnot.OrganizationType;
import org.eclipse.stardust.model.xpdl.carnot.ProcessDefinitionType;
-import org.eclipse.stardust.model.xpdl.carnot.RoleType;
import org.eclipse.stardust.model.xpdl.carnot.TransitionType;
import org.eclipse.stardust.model.xpdl.carnot.TriggerType;
import org.eclipse.stardust.model.xpdl.carnot.TriggerTypeType;
-import org.eclipse.stardust.model.xpdl.carnot.XmlTextNode;
-import org.eclipse.stardust.model.xpdl.carnot.util.ModelUtils;
/**
* @author Simon Nikles
*
*/
-public class Bpmn2CarnotXPDL implements Transformator {
+public class Bpmn2StardustXPDL implements Transformator {
- private static final String FAIL_NO_PROCESS_DEF = "Stardust Process definition not found";
- private static final String FAIL_ELEMENT_CREATION = "Could not create Stardust element";
- private static final String FAIL_ELEMENT_UNSUPPORTED_FEATURE = "Usupported feature: ";
+ public static final String FAIL_NO_PROCESS_DEF = "Stardust Process definition not found";
+ public static final String FAIL_ELEMENT_CREATION = "Could not create Stardust element";
+ public static final String FAIL_ELEMENT_UNSUPPORTED_FEATURE = "Usupported feature: ";
- private static final String CONDITION_KEY = "CONDITION";
- private static final String OTHERWISE_KEY = "OTHERWISE";
-
- private static final String EXPRESSION_LANGUAGE_JAVA = "http://www.sun.com/java";
-
-
- private ModelType carnotModel = null;
+ public ModelType carnotModel = null;
private List<String> failures = new ArrayList<String>();
private final Logger logger = Logger.getLogger(this.getClass());
+ private CarnotModelQuery query;
+ private BpmnModelQuery bpmnquery;
+
+
public void createTargetModel(Definitions definitions) {
carnotModel = newBpmModel()
.withIdAndName(definitions.getId(), definitions.getName())
.build();
- Bpmn2CarnotXPDLExtension.addModelExtensions(definitions, carnotModel);
+ Bpmn2StardustXPDLExtension.addModelExtensions(definitions, carnotModel);
+ Bpmn2StardustXPDLExtension.addModelExtensionDefaults(definitions, carnotModel);
+
+ query = new CarnotModelQuery(carnotModel);
+ bpmnquery = new BpmnModelQuery();
+
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
- //////////TODO REMOVE IF DEFAULTTYPESINITIALIZER IS COMPLETE!!! ////////////////////////////////////////////////////
+ //////////TODO REMOVE IF DEFAULTTYPESINITIALIZER IS COMPLETE (OR WHAT IS ABOUT THESE TYPES?)!!! ////////////////////
DefaultTypesInitializer initializer = new DefaultTypesInitializer();
initializer.initializeTriggerType(carnotModel, PredefinedConstants.JMS_TRIGGER, "JMS Trigger",
false, JMSTriggerValidator.class);
@@ -117,6 +121,7 @@ public class Bpmn2CarnotXPDL implements Transformator {
false, MailTriggerValidator.class);
initializer.initializeTriggerType(carnotModel, PredefinedConstants.TIMER_TRIGGER, "Timer Trigger",
false, TimerTriggerValidator.class);
+
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
}
@@ -145,23 +150,23 @@ public class Bpmn2CarnotXPDL implements Transformator {
public void addStartEvent(StartEvent event, FlowElementsContainer container) {
logger.debug("addStartEvent " + event);
- int eventDefCount = countEventDefinitions(event);
- EventDefinition def = getFirstEventDefinition(event);
+ int eventDefCount = bpmnquery.countEventDefinitions(event);
+ EventDefinition def = bpmnquery.getFirstEventDefinition(event);
if (eventDefCount > 1) {
failures.add(FAIL_ELEMENT_UNSUPPORTED_FEATURE + "StartEvent - Multiple Event definitions " + event.getId());
return;
}
- ProcessDefinitionType processDef = findProcessDefinition(container.getId());
+ ProcessDefinitionType processDef = query.findProcessDefinition(container.getId());
if (processDef != null) {
if (def == null) {
failures.add("StartEvent - no event definition available (" + event.getId() + "). Manual Start is assumed.");
addManualTrigger(event, container, processDef);
} else if (def instanceof MessageEventDefinition) {
- def = event.getEventDefinitions().get(0);
- addMessageTrigger(event, def, container, processDef);
+ //def = event.getEventDefinitions().get(0);
+ addMessageTrigger(event, (MessageEventDefinition)def, container, processDef);
} else if (def instanceof TimerEventDefinition) {
- def = event.getEventDefinitions().get(0);
- addTimerTrigger(event, def, container, processDef);
+ //def = event.getEventDefinitions().get(0);
+ addTimerTrigger(event, (TimerEventDefinition)def, container, processDef);
} else {
failures.add(FAIL_ELEMENT_UNSUPPORTED_FEATURE + "StartEvent " + event.getId() + " EventDefinition " + def.getClass().getName());
return;
@@ -174,78 +179,38 @@ public class Bpmn2CarnotXPDL implements Transformator {
public void addExclusiveGateway(ExclusiveGateway gateway, FlowElementsContainer container) {
logger.info("addExclusiveGateway" + gateway.getId() + " " + gateway.getName());
- ProcessDefinitionType processDef = findProcessDefinition(container.getId());
- List<SequenceFlow> incomings = gateway.getIncoming();
- List<SequenceFlow> outgoings = gateway.getOutgoing();
- if (processDef ==null) {
- failures.add(FAIL_NO_PROCESS_DEF + "(Id: " + container.getId() + ")");
- return;
- }
- if (incomings == null || outgoings == null) return;
- if (incomings.size() == 0 || outgoings.size() == 0) return;
-
- boolean isFork = outgoings.size() > 1;
- boolean isJoin = incomings.size() > 1;
-
- if (incomings.size() > 1 && outgoings.size() > 1) {
- failures.add(FAIL_ELEMENT_UNSUPPORTED_FEATURE + " n:n exclusive gateway - target model incomplete.");
- return;
- }
- if (isFork) {
- ActivityType sourceActivity = findActivity(incomings.get(0).getSourceRef(), container);
- if (sourceActivity != null) sourceActivity.setSplit(JoinSplitType.XOR_LITERAL);
- for (SequenceFlow outgoing : outgoings) {
- if (outgoing.getTargetRef() instanceof Activity) {
- ActivityType targetActivity = findActivity(outgoing.getTargetRef(), container);
- if (targetActivity == null) continue;
- boolean hasCondition = outgoing.getConditionExpression() != null;
- List<Documentation> conditionDoc = hasCondition ? outgoing.getConditionExpression().getDocumentation() : null;
- String condition = hasCondition ? getDescriptionFromDocumentation(conditionDoc) : "";
- String gatewayDoc = getDescriptionFromDocumentation(gateway.getDocumentation());
- addGatewayTransition(gateway, condition, outgoing.getName(), outgoing.getId(), gatewayDoc, sourceActivity, targetActivity, container, processDef);
- } else {
- // TODO
- failures.add(FAIL_ELEMENT_UNSUPPORTED_FEATURE + " exclusive gateway target other than activity - target model incomplete.");
- continue;
- }
- }
- } else if (isJoin) {
- ActivityType targetActivity = findActivity(outgoings.get(0).getTargetRef(), container);
- if (targetActivity != null) targetActivity.setJoin(JoinSplitType.XOR_LITERAL);
- for (SequenceFlow incoming : incomings) {
- if (incoming.getSourceRef() instanceof Activity) {
- ActivityType sourceActivity = findActivity(incoming.getSourceRef(), container);
- if (sourceActivity == null) continue;
- addGatewayTransition(gateway, "", incoming.getId(), incoming.getId(), getDescriptionFromDocumentation(gateway.getDocumentation()), sourceActivity, targetActivity, container, processDef);
- } else {
- // TODO
- failures.add(FAIL_ELEMENT_UNSUPPORTED_FEATURE + " exclusive gateway source other than activity - target model incomplete.");
- continue;
- }
- }
- }
+ new Gateway2Stardust(carnotModel,failures).addExclusiveGateway(gateway, container);
}
+ public void addParallelGateway(ParallelGateway gateway, FlowElementsContainer container) {
+ logger.info("addParallelGateway" + gateway.getId() + " " + gateway.getName());
+ new Gateway2Stardust(carnotModel,failures).addParallelGateway(gateway, container);
+ }
+
public void addPartnerEntity(PartnerEntity entity) {
newOrganization(carnotModel)
.withIdAndName(entity.getId(), entity.getName())
- .withDescription(getDescriptionFromDocumentation(entity.getDocumentation()))
+ .withDescription(DocumentationTool.getDescriptionFromDocumentation(entity.getDocumentation()))
.build();
}
public void addProcess(Process process) {
logger.debug("addProcess " + process);
List<Documentation> docs = process.getDocumentation();
- String processDescription = getDescriptionFromDocumentation(docs);
- newProcessDefinition(carnotModel)
- .withIdAndName(process.getId(), process.getName())
- .withDescription(processDescription)
- .build();
+ String processDescription = DocumentationTool.getDescriptionFromDocumentation(docs);
+
+ ProcessDefinitionType def =
+ newProcessDefinition(carnotModel)
+ .withIdAndName(process.getId(), process.getName())
+ .withDescription(processDescription)
+ .build();
+
+ newModelDiagram(carnotModel).forProcess(def).build();
}
public void addSequenceFlow(SequenceFlow seq, FlowElementsContainer container) {
logger.debug("addSequenceFlow " + seq);
- ProcessDefinitionType processDef = findProcessDefinition(container.getId());
+ ProcessDefinitionType processDef = query.findProcessDefinition(container.getId());
FlowNode sourceNode = seq.getSourceRef();
FlowNode targetNode = seq.getTargetRef();
if (processDef != null) {
@@ -260,10 +225,10 @@ public class Bpmn2CarnotXPDL implements Transformator {
public void addSubProcess(SubProcess subprocess, FlowElementsContainer container) {
logger.info("addSubProcess" + subprocess.getId() + " " + subprocess.getName());
- ProcessDefinitionType processDef = findProcessDefinition(container.getId());
+ ProcessDefinitionType processDef = query.findProcessDefinition(container.getId());
if (processDef != null) {
List<Documentation> docs = subprocess.getDocumentation();
- String processDescription = getDescriptionFromDocumentation(docs);
+ String processDescription = DocumentationTool.getDescriptionFromDocumentation(docs);
ProcessDefinitionType implProcessDef = newProcessDefinition(carnotModel)
.withIdAndName(subprocess.getId(), subprocess.getName())
.withDescription(processDescription).build();
@@ -277,15 +242,26 @@ public class Bpmn2CarnotXPDL implements Transformator {
}
}
+ public void addAbstractTask(Task task, FlowElementsContainer container) {
+ ProcessDefinitionType processDef = query.findProcessDefinition(container.getId());
+ if (processDef == null) return;
+ String descr = DocumentationTool.getDescriptionFromDocumentation(task.getDocumentation());
+ newRouteActivity(processDef)
+ .withIdAndName(task.getId(), task.getName())
+ .withDescription(descr)
+ .build();
+ }
+
public void addUserTask(UserTask task, FlowElementsContainer container) {
- ProcessDefinitionType processDef = findProcessDefinition(container.getId());
+ ProcessDefinitionType processDef = query.findProcessDefinition(container.getId());
if (processDef != null) {
- String descr = getDescriptionFromDocumentation(task.getDocumentation());
+ String descr = DocumentationTool.getDescriptionFromDocumentation(task.getDocumentation());
ActivityType activity = newManualActivity(processDef)
.withIdAndName(task.getId(), task.getName())
.withDescription(descr)
- .build();
- Bpmn2CarnotXPDLExtension.addUserTaskExtensions(task, activity);
+ .build();
+
+ Bpmn2StardustXPDLExtension.addUserTaskExtensions(task, activity);
List<ResourceRole> resources = task.getResources();
for (ResourceRole role : resources) {
@@ -299,22 +275,37 @@ public class Bpmn2CarnotXPDL implements Transformator {
}
+ public void addServiceTask(ServiceTask task, FlowElementsContainer container) {
+ ProcessDefinitionType processDef = query.findProcessDefinition(container.getId());
+ if (processDef != null) {
+ String descr = DocumentationTool.getDescriptionFromDocumentation(task.getDocumentation());
+ ActivityType activity = newApplicationActivity(processDef)
+ .withIdAndName(task.getId(), task.getName())
+ .withDescription(descr)
+ .build();
+ // TODO StardustServiceTaskType (Extensions)
+ } else {
+ failures.add(FAIL_NO_PROCESS_DEF + "(Id: " + container.getId() + ")");
+ }
+ }
+
+
private void addActivityToActivityTransition(SequenceFlow seq, FlowNode sourceNode, FlowNode targetNode, FlowElementsContainer container, ProcessDefinitionType processDef) {
if (processDef != null) {
- ActivityType sourceActivity = findActivity(sourceNode, container);
- ActivityType targetActivity = findActivity(targetNode, container);
+ ActivityType sourceActivity = query.findActivity(sourceNode, container);
+ ActivityType targetActivity = query.findActivity(targetNode, container);
if (sourceActivity != null && targetActivity != null) {
- String documentation = getDescriptionFromDocumentation(seq.getDocumentation());
- TransitionType transition = createTransition(seq.getId(), seq.getName(), documentation, sourceActivity, targetActivity);
+ String documentation = DocumentationTool.getDescriptionFromDocumentation(seq.getDocumentation());
+ TransitionType transition = Sequence2Stardust.createTransition(seq.getId(), seq.getName(), documentation, processDef, sourceActivity, targetActivity);
if (seq.getConditionExpression() != null) {
if (seq.getConditionExpression() instanceof FormalExpression) {
- setSequenceFormalCondition(transition, (FormalExpression)seq.getConditionExpression());
+ Sequence2Stardust.setSequenceFormalCondition(transition, (FormalExpression)seq.getConditionExpression(), failures);
} else if (seq.getConditionExpression().getDocumentation() != null
&& seq.getConditionExpression().getDocumentation().get(0) != null
&& !seq.getConditionExpression().getDocumentation().get(0).getText().equals("")) {
- setSequenceInformalCondition(transition, seq.getConditionExpression().getDocumentation().get(0).getText());
+ Sequence2Stardust.setSequenceInformalCondition(transition, seq.getConditionExpression().getDocumentation().get(0).getText());
} else {
- setSequenceTrueCondition(transition);
+ Sequence2Stardust.setSequenceTrueCondition(transition);
}
}
// TODO transition.setForkOnTraversal()
@@ -327,42 +318,23 @@ public class Bpmn2CarnotXPDL implements Transformator {
}
}
- private void addGatewayTransition(ExclusiveGateway gateway, String condition, String name, String Id, String documentation, ActivityType sourceActivity, ActivityType targetActivity, FlowElementsContainer container, ProcessDefinitionType processDef) {
- logger.info("addGatewayTransition from " + sourceActivity.getName() + " to " + targetActivity.getName());
- if (processDef != null) {
- if (sourceActivity != null && targetActivity != null) {
- TransitionType transition = createTransition(Id, name, documentation, sourceActivity, targetActivity);
- if (gateway.getDefault() != null && gateway.getDefault().getTargetRef().getId().equals(targetActivity.getId())) {
- setSequenceOtherwiseCondition(transition);
- } else if (!condition.equals("")) {
- transition.setCondition(condition);
- }
- processDef.getTransition().add(transition);
- } else {
- failures.add("No valid source and target for gateway sequence: " + Id);
- }
- } else {
- failures.add(FAIL_NO_PROCESS_DEF + "(Id: " + container.getId() + ")");
- }
- }
-
private void addManualTrigger(StartEvent event, FlowElementsContainer container, ProcessDefinitionType processDef) {
logger.debug("addManualTrigger " + event);
TriggerType trigger = newManualTrigger(processDef)
.withIdAndName(event.getId(), event.getName())
.build();
- Bpmn2CarnotXPDLExtension.addStartEventExtensions(event, trigger);
+ Bpmn2StardustXPDLExtension.addStartEventExtensions(event, trigger);
}
- private void addMessageTrigger(StartEvent event, EventDefinition def, FlowElementsContainer container, ProcessDefinitionType processDef) {
+ private void addMessageTrigger(StartEvent event, MessageEventDefinition def, FlowElementsContainer container, ProcessDefinitionType processDef) {
logger.debug("addMessageTrigger (JMS) " + event);
- TriggerTypeType triggerType = Bpmn2CarnotXPDLExtension.getMessageStartEventTriggerType(event, carnotModel);
+ TriggerTypeType triggerType = Bpmn2StardustXPDLExtension.getMessageStartEventTriggerType(event, carnotModel);
if (triggerType != null) {
TriggerType trigger = AbstractElementBuilder.F_CWM.createTriggerType();
trigger.setType(triggerType);
trigger.setId(event.getId());
trigger.setName(event.getName());
- Bpmn2CarnotXPDLExtension.addMessageStartEventExtensions(event, trigger);
+ Bpmn2StardustXPDLExtension.addMessageStartEventExtensions(event, trigger);
processDef.getTrigger().add(trigger);
} else {
failures.add(FAIL_ELEMENT_CREATION + "(Start event: " + event.getId() + " - trigger type + " + PredefinedConstants.JMS_TRIGGER + " not found)");
@@ -377,15 +349,12 @@ public class Bpmn2CarnotXPDL implements Transformator {
trigger.setType(triggerType);
trigger.setId(event.getId());
trigger.setName(event.getName());
- Bpmn2CarnotXPDLExtension.addTimerStartEventExtensions(event, trigger);
+ Bpmn2StardustXPDLExtension.addTimerStartEventExtensions(event, trigger);
processDef.getTrigger().add(trigger);
} else {
failures.add(FAIL_ELEMENT_CREATION + "(Start event: " + event.getId() + " - trigger type + " + PredefinedConstants.JMS_TRIGGER + " not found)");
}
}
-
- public void addParallelGateway(ParallelGateway gateway, FlowElementsContainer container) {
- }
public void addParticipant(Participant participant, Process process) {
}
@@ -418,106 +387,13 @@ public class Bpmn2CarnotXPDL implements Transformator {
}
- private int countEventDefinitions(CatchEvent event) {
- if (event.getEventDefinitions() != null) return event.getEventDefinitions().size();
- return 0;
- }
-
- private TransitionType createTransition(String id, String name, String documentation, ActivityType sourceActivity, ActivityType targetActivity) {
- DescriptionType descrType = getDescription(documentation);
- TransitionType transition = AbstractElementBuilder.F_CWM.createTransitionType();
- transition.setFrom(sourceActivity);
- transition.setTo(targetActivity);
- transition.setId(id);
- transition.setName(name);
- transition.setDescription(descrType);
- return transition;
- }
-
- private ActivityType findActivity(FlowNode node, FlowElementsContainer container) {
- String nodeId = node != null ? node.getId() : null;
- ProcessDefinitionType processDef = findProcessDefinition(container.getId());
- if (processDef != null && nodeId != null) {
- for (ActivityType activity : processDef.getActivity()) {
- if (activity.getId().equals(nodeId)) return activity;
- }
- }
- return null;
- }
-
- private ProcessDefinitionType findProcessDefinition(String id) {
- EList<ProcessDefinitionType> processDefs = carnotModel.getProcessDefinition();
- for (ProcessDefinitionType processDef : processDefs) {
- if (processDef.getId().equals(id)) return processDef;
- }
- return null;
- }
-
- private IModelParticipant findResourceType(String id) {
- EList<RoleType> roles = carnotModel.getRole();
- EList<OrganizationType> orgs = carnotModel.getOrganization();
- for (RoleType role : roles) {
- if (role.getId().equals(id)) return role;
- }
- for (OrganizationType org : orgs) {
- if (org.getId().equals(id)) return org;
- }
- return null;
- }
-
- private DescriptionType getDescription(String description) {
+ @SuppressWarnings("unused")
+ private static DescriptionType getDescription(String description) {
DescriptionType descriptor = AbstractElementBuilder.F_CWM.createDescriptionType();
XpdlModelUtils.setCDataString(descriptor.getMixed(), description, true);
return descriptor;
}
- private String getDescriptionFromDocumentation(List<Documentation> documentation) {
- String description = "";
- for (Documentation doc : documentation) {
- description = description.concat(doc.getText());
- }
- return description;
- }
-
- private EventDefinition getFirstEventDefinition(CatchEvent event) {
- if (countEventDefinitions(event) > 0) {
- return event.getEventDefinitions().get(0);
- }
- return null;
- }
-
- private void setSequenceFormalCondition(TransitionType transition, FormalExpression formalExpression) {
- if (formalExpression.getLanguage().equals(EXPRESSION_LANGUAGE_JAVA)) {
- transition.setCondition(CONDITION_KEY);
- XmlTextNode expression = CarnotWorkflowModelFactory.eINSTANCE.createXmlTextNode();
- ModelUtils.setCDataString(expression.getMixed(), formalExpression.getBody(), true);
- transition.setExpression(expression);
- } else {
- String expr = formalExpression.getLanguage()
- + " \n" + formalExpression.getBody();
- setSequenceInformalCondition(transition, expr);
- failures.add(FAIL_ELEMENT_UNSUPPORTED_FEATURE + "(Sequence - " + transition.getId() + " - Expression language (" + formalExpression.getLanguage() + ") not supported.");
- }
- }
-
- private void setSequenceInformalCondition(TransitionType transition, String string) {
- DescriptionType descrType = transition.getDescription();
- String val = descrType.getMixed().getValue(CarnotWorkflowModelPackage.DESCRIPTION_TYPE__MIXED).toString();
- descrType.getMixed().setValue(CarnotWorkflowModelPackage.DESCRIPTION_TYPE__MIXED, val + " " + string);
- transition.setDescription(descrType);
- }
-
- private void setSequenceOtherwiseCondition(TransitionType transition) {
- transition.setCondition(OTHERWISE_KEY);
- }
-
- private void setSequenceTrueCondition(TransitionType transition) {
- transition.setCondition(CONDITION_KEY);
- XmlTextNode expression = CarnotWorkflowModelFactory.eINSTANCE.createXmlTextNode();
- ModelUtils.setCDataString(expression.getMixed(), "true", true);
- transition.setExpression(expression);
- }
-
private void setTaskPerformer(ActivityType activity, ResourceRole role, UserTask task, FlowElementsContainer container) {
if (role.getResourceAssignmentExpression() != null) failures.add(FAIL_ELEMENT_UNSUPPORTED_FEATURE + "(RESOURCE ASSIGNMENT EXPRESSION NOT IMPLEMENTED)");
if (role.getResourceParameterBindings() != null) failures.add(FAIL_ELEMENT_UNSUPPORTED_FEATURE + "RESOURCE PARAMETER BINDINGS NOT IMPLEMENTED");
@@ -527,9 +403,9 @@ public class Bpmn2CarnotXPDL implements Transformator {
Resource resource = role.getResourceRef();
if (resource.eIsProxy()) resource = Bpmn2ProxyResolver.resolveResourceProxy(resource, container);
if (resource != null) {
- IModelParticipant resourceType = findResourceType(resource.getId());
+ IModelParticipant resourceType = query.findResourceType(resource.getId());
if (resourceType==null) {
- String descr = getDescriptionFromDocumentation(resource.getDocumentation());
+ String descr = DocumentationTool.getDescriptionFromDocumentation(resource.getDocumentation());
resourceType = newRole(carnotModel).withIdAndName(resource.getId(), resource.getName()).withDescription(descr).build();
}
activity.setPerformer(resourceType);
diff --git a/model/org.eclipse.stardust.model.bpmn2.transform/src/main/java/org/eclipse/stardust/model/bpmn2/transform/carnot/Bpmn2CarnotXPDLExtension.java b/model/org.eclipse.stardust.model.bpmn2.transform/src/main/java/org/eclipse/stardust/model/bpmn2/transform/xpdl/Bpmn2StardustXPDLExtension.java
index 36a6c7d..9aa4cfe 100644
--- a/model/org.eclipse.stardust.model.bpmn2.transform/src/main/java/org/eclipse/stardust/model/bpmn2/transform/carnot/Bpmn2CarnotXPDLExtension.java
+++ b/model/org.eclipse.stardust.model.bpmn2.transform/src/main/java/org/eclipse/stardust/model/bpmn2/transform/xpdl/Bpmn2StardustXPDLExtension.java
@@ -8,7 +8,10 @@
* Contributors:
* ITpearls - initial API and implementation and/or initial documentation
*******************************************************************************/
-package org.eclipse.stardust.model.bpmn2.transform.carnot;
+package org.eclipse.stardust.model.bpmn2.transform.xpdl;
+
+import java.text.DateFormat;
+import java.util.Date;
import org.eclipse.bpmn2.Definitions;
import org.eclipse.bpmn2.StartEvent;
@@ -22,6 +25,7 @@ import org.eclipse.stardust.model.bpmn2.sdbpmn.StardustTimerStartEventType;
import org.eclipse.stardust.model.bpmn2.sdbpmn.StardustUserTaskType;
import org.eclipse.stardust.model.xpdl.builder.utils.XpdlModelUtils;
import org.eclipse.stardust.model.xpdl.carnot.ActivityType;
+import org.eclipse.stardust.model.xpdl.carnot.AttributeType;
import org.eclipse.stardust.model.xpdl.carnot.ModelType;
import org.eclipse.stardust.model.xpdl.carnot.TriggerType;
import org.eclipse.stardust.model.xpdl.carnot.TriggerTypeType;
@@ -30,7 +34,7 @@ import org.eclipse.stardust.model.xpdl.carnot.TriggerTypeType;
* @author Simon Nikles
*
*/
-public class Bpmn2CarnotXPDLExtension {
+public class Bpmn2StardustXPDLExtension {
public static void addStartEventExtensions(StartEvent event, TriggerType trigger) {
StardustStartEventType extension = ExtensionHelper.getInstance().getStartEventExtension(event);
@@ -46,6 +50,10 @@ public class Bpmn2CarnotXPDLExtension {
}
public static void addTimerStartEventExtensions(StartEvent event, TriggerType trigger) {
+ StardustTimerStartEventType ext = ExtensionHelper.getInstance().getTimerStartEventExtension(event);
+ if (ext!=null&&ext.getStardustAttributes()!=null&&ext.getStardustAttributes().getAttributeType() != null &&ext.getStardustAttributes().getAttributeType().size()>0) {
+ AttributeType attr = ext.getStardustAttributes().getAttributeType().get(0);
+ }
StardustTimerStartEventType extension = ExtensionHelper.getInstance().getTimerStartEventExtension(event);
if (extension != null)
trigger.getAttribute().addAll(extension.getStardustAttributes().getAttributeType());
@@ -77,13 +85,21 @@ public class Bpmn2CarnotXPDLExtension {
activity.getEventHandler().addAll(taskExt.getEventHandler());
}
+ public static void addModelExtensionDefaults(Definitions definitions, ModelType carnotModel) {
+ if (carnotModel.getCreated().isEmpty()) carnotModel.setCreated(DateFormat.getInstance().format(new Date()));
+ if (carnotModel.getModelOID() <= 0) carnotModel.setModelOID(0);
+ if (carnotModel.getOid() <= 0) carnotModel.setOid(0);
+ if (carnotModel.getVendor().isEmpty()) carnotModel.setVendor(definitions.getExporter());
+ if (carnotModel.getName() == null || carnotModel.getName().isEmpty()) carnotModel.setName("Unnamed");
+ }
+
public static void addModelExtensions(Definitions definitions, ModelType carnotModel) {
StardustModelType modelValues = ExtensionHelper.getInstance().getModelAttributes(definitions);
if (modelValues == null) return;
- carnotModel.setCarnotVersion(modelValues.getCarnotVersion());
- carnotModel.setAuthor(modelValues.getAuthor());
- carnotModel.setCreated(modelValues.getCreated().toXMLFormat());
- carnotModel.setModelOID(Math.max(modelValues.getModelOID().intValue(), 1));
+ if (!modelValues.getCarnotVersion().isEmpty()) carnotModel.setCarnotVersion(modelValues.getCarnotVersion());
+ if (!modelValues.getAuthor().isEmpty()) carnotModel.setAuthor(modelValues.getAuthor());
+ if (modelValues.getCreated() != null) carnotModel.setCreated(modelValues.getCreated().toXMLFormat());
+ if (modelValues.getModelOID().intValue() > 0) carnotModel.setModelOID(Math.max(modelValues.getModelOID().intValue(), 1));
if (modelValues.getOid() > 0) carnotModel.setOid(modelValues.getOid());
carnotModel.setVendor(modelValues.getVendor());
}
diff --git a/model/org.eclipse.stardust.model.bpmn2.transform/src/main/java/org/eclipse/stardust/model/bpmn2/transform/carnot/DialectCarnotXPDL.java b/model/org.eclipse.stardust.model.bpmn2.transform/src/main/java/org/eclipse/stardust/model/bpmn2/transform/xpdl/DialectStardustXPDL.java
index 4f9115e..ffc8505 100644
--- a/model/org.eclipse.stardust.model.bpmn2.transform/src/main/java/org/eclipse/stardust/model/bpmn2/transform/carnot/DialectCarnotXPDL.java
+++ b/model/org.eclipse.stardust.model.bpmn2.transform/src/main/java/org/eclipse/stardust/model/bpmn2/transform/xpdl/DialectStardustXPDL.java
@@ -8,7 +8,7 @@
* Contributors:
* ITpearls - initial API and implementation and/or initial documentation
*******************************************************************************/
-package org.eclipse.stardust.model.bpmn2.transform.carnot;
+package org.eclipse.stardust.model.bpmn2.transform.xpdl;
import org.eclipse.stardust.model.bpmn2.transform.Dialect;
import org.eclipse.stardust.model.bpmn2.transform.Transformator;
@@ -17,16 +17,16 @@ import org.eclipse.stardust.model.bpmn2.transform.Transformator;
* @author Simon Nikles
*
*/
-public class DialectCarnotXPDL implements Dialect {
+public class DialectStardustXPDL implements Dialect {
- public static final String DIALECT_CARNOT = "carnot_xpdl";
+ public static final String DIALECT_STARDUSTXPDL = "stardust_xpdl";
public Transformator getTransformator() {
- return new Bpmn2CarnotXPDL();
+ return new Bpmn2StardustXPDL();
}
public String getDialectName() {
- return DIALECT_CARNOT;
+ return DIALECT_STARDUSTXPDL;
};
}
diff --git a/model/org.eclipse.stardust.model.bpmn2.transform/src/main/java/org/eclipse/stardust/model/bpmn2/transform/xpdl/elements/Gateway2Stardust.java b/model/org.eclipse.stardust.model.bpmn2.transform/src/main/java/org/eclipse/stardust/model/bpmn2/transform/xpdl/elements/Gateway2Stardust.java
new file mode 100644
index 0000000..85d43ed
--- /dev/null
+++ b/model/org.eclipse.stardust.model.bpmn2.transform/src/main/java/org/eclipse/stardust/model/bpmn2/transform/xpdl/elements/Gateway2Stardust.java
@@ -0,0 +1,340 @@
+/*******************************************************************************
+ * Copyright (c) 2012 ITpearls AG and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * ITpearls - initial API and implementation and/or initial documentation
+ *******************************************************************************/
+package org.eclipse.stardust.model.bpmn2.transform.xpdl.elements;
+
+import static org.eclipse.stardust.model.xpdl.builder.BpmModelBuilder.newRouteActivity;
+
+import java.util.List;
+
+import org.apache.log4j.Logger;
+import org.eclipse.bpmn2.Activity;
+import org.eclipse.bpmn2.ExclusiveGateway;
+import org.eclipse.bpmn2.Expression;
+import org.eclipse.bpmn2.FlowElementsContainer;
+import org.eclipse.bpmn2.FlowNode;
+import org.eclipse.bpmn2.FormalExpression;
+import org.eclipse.bpmn2.Gateway;
+import org.eclipse.bpmn2.ParallelGateway;
+import org.eclipse.bpmn2.SequenceFlow;
+import org.eclipse.stardust.model.bpmn2.transform.xpdl.Bpmn2StardustXPDL;
+import org.eclipse.stardust.model.bpmn2.transform.xpdl.helper.CarnotModelQuery;
+import org.eclipse.stardust.model.bpmn2.transform.xpdl.helper.DocumentationTool;
+import org.eclipse.stardust.model.xpdl.carnot.ActivityType;
+import org.eclipse.stardust.model.xpdl.carnot.JoinSplitType;
+import org.eclipse.stardust.model.xpdl.carnot.ModelType;
+import org.eclipse.stardust.model.xpdl.carnot.ProcessDefinitionType;
+import org.eclipse.stardust.model.xpdl.carnot.TransitionType;
+
+/**
+ * @author Simon Nikles
+ *
+ */
+public class Gateway2Stardust {
+
+ private enum Gate {
+ EXCLUSIVE,
+ INCLUSIVE,
+ PARALLEL,
+ EVENT
+ }
+ private enum GateDirection {
+ CONVERGE,
+ DIVERGE,
+ MIXED
+ }
+
+ private final Logger logger = Logger.getLogger(this.getClass());
+ private final CarnotModelQuery query;
+ private List<String> failures;
+
+ public Gateway2Stardust(ModelType carnotModel, List<String> failures) {
+ this.query = new CarnotModelQuery(carnotModel);
+ this.failures = failures;
+ }
+
+ public void addExclusiveGateway(ExclusiveGateway gateway, FlowElementsContainer container) {
+ addGateway(Gate.EXCLUSIVE, gateway, container);
+ }
+
+ public void addParallelGateway(ParallelGateway gateway, FlowElementsContainer container) {
+ addGateway(Gate.PARALLEL, gateway, container);
+ }
+
+ private void addGateway(Gate type, Gateway gateway, FlowElementsContainer container) {
+ if (!validateContainer(container)) return;
+ if (!validateGate(gateway)) return;
+
+ ProcessDefinitionType processDef = query.findProcessDefinition(container.getId());
+ boolean isFork = isFork(gateway);
+ boolean isJoin = isJoin(gateway);
+ boolean isMixed = isMixed(gateway);
+ boolean isInGatewaySequence = hasBpmnGateSource(gateway, gateway.getIncoming());
+ JoinSplitType joinsplit = getJoinSplitType(type);
+
+ if (isMixed || isInGatewaySequence) {
+ GateDirection direction = getDirection(isMixed, isFork, isJoin);
+ ActivityType route = addRoute(type, direction, gateway, processDef, container);
+ createRouteTransitions(route, processDef, type, direction, gateway, container);
+ } else if (isFork) {
+ createForkingTransitions(type, joinsplit, gateway, processDef, container);
+ } else if (isJoin) {
+ createJoiningTransitions(type, joinsplit, gateway, processDef, container);
+ }
+ }
+
+ private ActivityType addRoute(Gate type, GateDirection direction, Gateway gateway, ProcessDefinitionType processDef, FlowElementsContainer container) {
+
+ ActivityType route =
+ newRouteActivity(processDef)
+ .withIdAndName(gateway.getId(), gateway.getName())
+ .withDescription(DocumentationTool.getDescriptionFromDocumentation(gateway.getDocumentation()))
+ .build();
+
+ JoinSplitType routeType = ( type.equals(Gate.EXCLUSIVE) ? JoinSplitType.XOR_LITERAL : JoinSplitType.AND_LITERAL);
+ if (direction.equals(GateDirection.DIVERGE) || direction.equals(GateDirection.MIXED)) {
+ route.setSplit(routeType);
+ }
+ if (direction.equals(GateDirection.CONVERGE) || direction.equals(GateDirection.MIXED)) {
+ route.setJoin(routeType);
+ }
+
+ return route;
+ }
+
+ private void createForkingTransitions(Gate gate, JoinSplitType splitType, Gateway gateway, ProcessDefinitionType processDef, FlowElementsContainer container) {
+ List<SequenceFlow> incomings = gateway.getIncoming();
+ List<SequenceFlow> outgoings = gateway.getOutgoing();
+ ActivityType sourceActivity = query.findActivity(incomings.get(0).getSourceRef(), container);
+ if (sourceActivity != null) sourceActivity.setSplit(splitType);
+ for (SequenceFlow outgoing : outgoings) {
+ if (outgoing.getTargetRef() instanceof Activity || outgoing.getTargetRef() instanceof Gateway) {
+ ActivityType targetActivity = query.findActivity(outgoing.getTargetRef(), container);
+ if (targetActivity == null) continue;
+ String gatewayDoc = DocumentationTool.getDescriptionFromDocumentation(gateway.getDocumentation());
+ addGatewayTransition(gate, gateway, outgoing.getConditionExpression(), outgoing.getName(), outgoing.getId(), gatewayDoc, sourceActivity, targetActivity, processDef);
+ } else {
+ failures.add(Bpmn2StardustXPDL.FAIL_ELEMENT_UNSUPPORTED_FEATURE + " exclusive gateway target other than activity or gateway - target model incomplete.");
+ continue;
+ }
+ }
+ }
+
+ private void createJoiningTransitions(Gate gate, JoinSplitType joinsplit, Gateway gateway, ProcessDefinitionType processDef, FlowElementsContainer container) {
+ List<SequenceFlow> incomings = gateway.getIncoming();
+ List<SequenceFlow> outgoings = gateway.getOutgoing();
+ ActivityType targetActivity = query.findActivity(outgoings.get(0).getTargetRef(), container);
+ if (targetActivity != null) targetActivity.setJoin(joinsplit);
+ for (SequenceFlow incoming : incomings) {
+ if (incoming.getSourceRef() instanceof Activity || incoming.getSourceRef() instanceof Gateway) {
+ ActivityType sourceActivity = query.findActivity(incoming.getSourceRef(), container);
+ if (sourceActivity == null) continue;
+ addGatewayTransition(gate, gateway, incoming.getConditionExpression(), incoming.getId(), incoming.getId(), DocumentationTool.getDescriptionFromDocumentation(gateway.getDocumentation()), sourceActivity, targetActivity, processDef);
+ } else {
+ failures.add(Bpmn2StardustXPDL.FAIL_ELEMENT_UNSUPPORTED_FEATURE + " exclusive gateway source other than activity - target model incomplete.");
+ continue;
+ }
+ }
+ }
+
+ private void addGatewayTransition(Gate gate, Gateway gateway, Expression expression, String name, String Id, String documentation, ActivityType sourceActivity, ActivityType targetActivity, ProcessDefinitionType processDef) {
+ logger.info("addGatewayTransition from " + sourceActivity.getName() + " to " + targetActivity.getName());
+ if (sourceActivity != null && targetActivity != null) {
+ TransitionType transition = Sequence2Stardust.createTransition(Id, name, documentation, processDef, sourceActivity, targetActivity);
+ setGatewayConditions(gate, gateway, expression, transition, sourceActivity, targetActivity);
+ processDef.getTransition().add(transition);
+ } else {
+ failures.add("No valid source and target for gateway sequence: " + Id);
+ }
+ }
+
+ private void createRouteTransitions(ActivityType route, ProcessDefinitionType processDef, Gate type, GateDirection direction, Gateway gateway, FlowElementsContainer container) {
+ createIncomingRouteTransitions(route, processDef, type, direction, gateway, container);
+ createOutgoingRouteTransitions(route, processDef, type, direction, gateway, container);
+ }
+
+ private void createOutgoingRouteTransitions(ActivityType route, ProcessDefinitionType processDef, Gate type, GateDirection direction, Gateway gateway, FlowElementsContainer container) {
+ List<SequenceFlow> outgoings = gateway.getOutgoing();
+ for (SequenceFlow out : outgoings) {
+ ActivityType target = findSequenceTargetActivity(out, container);
+ if (target != null) {
+ TransitionType transition = Sequence2Stardust.createTransition(out.getId(), out.getName(), DocumentationTool.getDescriptionFromDocumentation(out.getDocumentation()), processDef, route, target);
+ setGatewayConditions(type, gateway, out.getConditionExpression(), transition, route, target);
+ }
+ }
+ }
+
+ private void createIncomingRouteTransitions(ActivityType route, ProcessDefinitionType processDef, Gate type, GateDirection direction, Gateway gateway, FlowElementsContainer container) {
+ List<SequenceFlow> incomings = gateway.getIncoming();
+
+ for (SequenceFlow in : incomings) {
+ ActivityType source = findSequenceSourceActivity(in, container);
+ if (source == null) {
+ FlowNode sourceNode = in.getSourceRef();
+ if (sourceNode instanceof Gateway) {
+ Gateway sourceGate = (Gateway)sourceNode;
+ if (!isGatewayTransformedToRoute(sourceGate)) {
+ backwardCreateMissingTransitions(type, sourceGate, route, processDef, in, container);
+ }
+ }
+ } else {
+ TransitionType transition = Sequence2Stardust.createTransition(in.getId(), in.getName(), DocumentationTool.getDescriptionFromDocumentation(in.getDocumentation()), processDef, source, route);
+ setGatewayConditions(type, gateway, in.getConditionExpression(), transition, source, route);
+ }
+ }
+ }
+
+
+ private void backwardCreateMissingTransitions(Gate type, Gateway gateway, ActivityType target, ProcessDefinitionType processDef, SequenceFlow flowToTarget, FlowElementsContainer container) {
+
+ if (isMixed(gateway)) return;
+
+ if (isFork(gateway)) {
+ if (null != query.findTransition(flowToTarget.getId(), container)) return;
+ FlowNode sourceNode = getFirstIncomingSource(gateway);
+ if (sourceNode != null && sourceNode instanceof Activity) {
+ ActivityType source = query.findActivity(sourceNode, container);
+ if (source == null) return;
+ TransitionType transition = Sequence2Stardust.createTransition(flowToTarget.getId(), flowToTarget.getName(), DocumentationTool.getDescriptionFromDocumentation(flowToTarget.getDocumentation()), processDef, source, target);
+ setGatewayConditions(type, gateway, flowToTarget.getConditionExpression(), transition, source, target);
+ }
+ } else {
+ for (SequenceFlow in : gateway.getIncoming()) {
+ if (null == query.findTransition(in.getId(), container)) {
+ FlowNode sourceNode = in.getSourceRef();
+ if (sourceNode != null && sourceNode instanceof Activity) {
+ ActivityType source = query.findActivity(sourceNode, container);
+ if (source == null) continue;
+ TransitionType transition = Sequence2Stardust.createTransition(in.getId(), flowToTarget.getName(), DocumentationTool.getDescriptionFromDocumentation(in.getDocumentation()), processDef, source, target);
+ setGatewayConditions(type, gateway, in.getConditionExpression(), transition, source, target);
+ }
+
+ }
+ }
+ }
+ }
+
+ private void setGatewayConditions(Gate gate, Gateway gateway, Expression expression, TransitionType transition, ActivityType sourceActivity, ActivityType targetActivity) {
+ String expressionVal = "";
+ FormalExpression formal = null;
+ if (expression != null)
+ if (expression instanceof FormalExpression) {
+ formal = (FormalExpression) expression;
+ } else {
+ expressionVal = DocumentationTool.getInformalExpressionValue(expression);
+ }
+
+ if (isGatewayDefaultSequenceTarget(gate, gateway, targetActivity)) {
+ logger.debug("transition: " + transition.getId() + " setSequenceOtherwiseCondition");
+ Sequence2Stardust.setSequenceOtherwiseCondition(transition);
+ } else if (gate.equals(Gate.PARALLEL)) {
+ logger.debug("transition: " + transition.getId() + " setSequenceTrueCondition");
+ Sequence2Stardust.setSequenceTrueCondition(transition);
+ } else if (!expressionVal.equals("")) {
+ logger.debug("transition: " + transition.getId() + " setSequenceInformalCondition: " + expressionVal);
+ Sequence2Stardust.setSequenceInformalCondition(transition, expressionVal);
+ } else if (formal != null) {
+ logger.debug("transition: " + transition.getId() + " setSequenceFormalCondition ");
+ Sequence2Stardust.setSequenceFormalCondition(transition, formal, failures);
+ } else {
+ logger.debug("transition: " + transition.getId() + " setSequenceTrueCondition");
+ Sequence2Stardust.setSequenceTrueCondition(transition);
+ }
+
+ }
+
+ private boolean validateGate(Gateway gateway) {
+ List<SequenceFlow> incomings = gateway.getIncoming();
+ List<SequenceFlow> outgoings = gateway.getOutgoing();
+
+ if (incomings == null || outgoings == null) return false;
+ if (incomings.size() == 0 || outgoings.size() == 0) return false;
+
+ return true;
+ }
+
+ private boolean validateContainer(FlowElementsContainer container) {
+ ProcessDefinitionType processDef = query.findProcessDefinition(container.getId());
+ if (processDef ==null) {
+ failures.add(Bpmn2StardustXPDL.FAIL_NO_PROCESS_DEF + "(Id: " + container.getId() + ")");
+ return false;
+ }
+
+ return true;
+ }
+
+ private boolean isGatewayTransformedToRoute(Gateway sourceGate) {
+ if (isMixed(sourceGate)) return true;
+ if (hasBpmnGateSource(sourceGate, sourceGate.getIncoming())) return true;
+ return false;
+ }
+
+ private ActivityType findSequenceTargetActivity(SequenceFlow flow, FlowElementsContainer container) {
+ FlowNode targetNode = flow.getTargetRef();
+ return query.findActivity(targetNode, container);
+ }
+
+ private ActivityType findSequenceSourceActivity(SequenceFlow flow, FlowElementsContainer container) {
+ FlowNode sourceNode = flow.getSourceRef();
+ return query.findActivity(sourceNode, container);
+ }
+
+ private boolean isFork(Gateway gateway) {
+ return gateway.getOutgoing() != null & gateway.getOutgoing().size() > 1;
+ }
+
+ private boolean isJoin(Gateway gateway) {
+ return gateway.getIncoming() != null && gateway.getIncoming().size() > 1;
+ }
+
+ private boolean isMixed(Gateway gateway) {
+ if (isJoin(gateway) && isFork(gateway)) {
+ return true;
+ }
+ return false;
+ }
+
+ private boolean hasBpmnGateSource(Gateway gateway, List<SequenceFlow> incomings) {
+ for (SequenceFlow in : incomings) {
+ if (in.getSourceRef() instanceof Gateway) return true;
+ }
+ return false;
+ }
+
+ private JoinSplitType getJoinSplitType(Gate type) {
+ switch(type) {
+ case EXCLUSIVE:
+ return JoinSplitType.XOR_LITERAL;
+ case INCLUSIVE:
+ return JoinSplitType.AND_LITERAL;
+ case PARALLEL:
+ return JoinSplitType.AND_LITERAL;
+ }
+ return JoinSplitType.XOR_LITERAL;
+ }
+
+ private GateDirection getDirection(boolean isMixed, boolean isFork, boolean isJoin) {
+ return isMixed ? GateDirection.MIXED : (isFork ? GateDirection.DIVERGE : GateDirection.CONVERGE);
+ }
+
+ private FlowNode getFirstIncomingSource(Gateway gateway) {
+ for (SequenceFlow in : gateway.getIncoming()) {
+ if (in != null) return in.getSourceRef();
+ }
+ return null;
+ }
+
+ private boolean isGatewayDefaultSequenceTarget(Gate gate, Gateway gateway, ActivityType targetActivity) {
+ return gate.equals(Gate.EXCLUSIVE)
+ && ((ExclusiveGateway)gateway).getDefault() != null
+ && ((ExclusiveGateway)gateway).getDefault().getTargetRef().getId().equals(targetActivity.getId());
+ }
+
+}
diff --git a/model/org.eclipse.stardust.model.bpmn2.transform/src/main/java/org/eclipse/stardust/model/bpmn2/transform/xpdl/elements/Gateway2Stardust_Bck.java b/model/org.eclipse.stardust.model.bpmn2.transform/src/main/java/org/eclipse/stardust/model/bpmn2/transform/xpdl/elements/Gateway2Stardust_Bck.java
new file mode 100644
index 0000000..9908718
--- /dev/null
+++ b/model/org.eclipse.stardust.model.bpmn2.transform/src/main/java/org/eclipse/stardust/model/bpmn2/transform/xpdl/elements/Gateway2Stardust_Bck.java
@@ -0,0 +1,334 @@
+//package org.eclipse.stardust.model.bpmn2.transform.xpdl.elements;
+//
+//import static org.eclipse.stardust.model.xpdl.builder.BpmModelBuilder.newRouteActivity;
+//
+//import java.util.List;
+//
+//import org.apache.log4j.Logger;
+//import org.eclipse.bpmn2.Activity;
+//import org.eclipse.bpmn2.ExclusiveGateway;
+//import org.eclipse.bpmn2.Expression;
+//import org.eclipse.bpmn2.FlowElementsContainer;
+//import org.eclipse.bpmn2.FlowNode;
+//import org.eclipse.bpmn2.FormalExpression;
+//import org.eclipse.bpmn2.Gateway;
+//import org.eclipse.bpmn2.ParallelGateway;
+//import org.eclipse.bpmn2.SequenceFlow;
+//import org.eclipse.stardust.model.bpmn2.transform.xpdl.Bpmn2StardustXPDL;
+//import org.eclipse.stardust.model.bpmn2.transform.xpdl.helper.CarnotModelQuery;
+//import org.eclipse.stardust.model.bpmn2.transform.xpdl.helper.DocumentationTool;
+//import org.eclipse.stardust.model.xpdl.carnot.ActivityType;
+//import org.eclipse.stardust.model.xpdl.carnot.JoinSplitType;
+//import org.eclipse.stardust.model.xpdl.carnot.ModelType;
+//import org.eclipse.stardust.model.xpdl.carnot.ProcessDefinitionType;
+//import org.eclipse.stardust.model.xpdl.carnot.TransitionType;
+//
+//public class Gateway2Stardust_Bck {
+//
+// private enum Gate {
+// EXCLUSIVE,
+// INCLUSIVE,
+// PARALLEL,
+// EVENT
+// }
+// private enum GateDirection {
+// CONVERGE,
+// DIVERGE,
+// MIXED
+// }
+//
+// private final Logger logger = Logger.getLogger(this.getClass());
+//
+// private final CarnotModelQuery query;
+// private List<String> failures;
+//
+// public Gateway2Stardust_Bck(ModelType carnotModel, List<String> failures) {
+// this.query = new CarnotModelQuery(carnotModel);
+// this.failures = failures;
+// }
+//
+// public void addExclusiveGateway(ExclusiveGateway gateway, FlowElementsContainer container) {
+// if (!validateContainer(container)) return;
+// //if (isMixed(gateway)) return;
+// if (!validateGate(gateway)) return;
+//
+// ProcessDefinitionType processDef = query.findProcessDefinition(container.getId());
+// List<SequenceFlow> incomings = gateway.getIncoming();
+// List<SequenceFlow> outgoings = gateway.getOutgoing();
+// boolean isFork = isFork(gateway);
+// boolean isJoin = isJoin(gateway);
+// boolean isMixed = isMixed(gateway);
+// boolean hasGateSource = hasBpmnGateSource(gateway, incomings);
+//
+// if (isMixed || hasGateSource) {
+// GateDirection direction = isMixed ? GateDirection.MIXED : (isFork ? GateDirection.DIVERGE : GateDirection.CONVERGE);
+// ActivityType route = addRoute(Gate.EXCLUSIVE, direction, gateway, processDef, container, incomings, outgoings);
+// createRouteTransitions(route, processDef, Gate.EXCLUSIVE, direction, gateway, container, incomings, outgoings);
+// } else if (isFork) {
+// addFork(Gate.EXCLUSIVE, JoinSplitType.XOR_LITERAL, gateway, processDef, container, incomings, outgoings);
+// } else if (isJoin) {
+// addJoin(Gate.EXCLUSIVE, JoinSplitType.XOR_LITERAL, gateway, processDef, container, incomings, outgoings);
+// }
+// }
+//
+// public void addParallelGateway(ParallelGateway gateway, FlowElementsContainer container) {
+// if (!validateContainer(container)) return;
+// //if (isMixed(gateway)) return;
+// if (!validateGate(gateway)) return;
+//
+// ProcessDefinitionType processDef = query.findProcessDefinition(container.getId());
+// List<SequenceFlow> incomings = gateway.getIncoming();
+// List<SequenceFlow> outgoings = gateway.getOutgoing();
+// boolean isFork = isFork(gateway);
+// boolean isJoin = isJoin(gateway);
+// boolean isMixed = isMixed(gateway);
+// boolean hasGateSource = hasBpmnGateSource(gateway, incomings);
+//
+// if (isMixed || hasGateSource) {
+// GateDirection direction = isMixed ? GateDirection.MIXED : (isFork ? GateDirection.DIVERGE : GateDirection.CONVERGE);
+// ActivityType route = addRoute(Gate.PARALLEL, direction, gateway, processDef, container, incomings, outgoings);
+// createRouteTransitions(route, processDef, Gate.PARALLEL, direction, gateway, container, incomings, outgoings);
+// } else if (isFork) {
+// addFork(Gate.PARALLEL, JoinSplitType.AND_LITERAL, gateway, processDef, container, incomings, outgoings);
+// } else if (isJoin) {
+// addJoin(Gate.PARALLEL, JoinSplitType.AND_LITERAL, gateway, processDef, container, incomings, outgoings);
+// }
+// }
+//
+// private ActivityType addRoute(Gate type, GateDirection direction, Gateway gateway,
+// ProcessDefinitionType processDef, FlowElementsContainer container, List<SequenceFlow> incomings, List<SequenceFlow> outgoings) {
+//
+// ActivityType route =
+// newRouteActivity(processDef)
+// .withIdAndName(gateway.getId(), gateway.getName())
+// .withDescription(DocumentationTool.getDescriptionFromDocumentation(gateway.getDocumentation()))
+// .build();
+//
+// JoinSplitType routeType = ( type.equals(Gate.EXCLUSIVE) ? JoinSplitType.XOR_LITERAL : JoinSplitType.AND_LITERAL);
+// if (direction.equals(GateDirection.DIVERGE) || direction.equals(GateDirection.MIXED)) {
+// route.setSplit(routeType);
+// }
+// if (direction.equals(GateDirection.CONVERGE) || direction.equals(GateDirection.MIXED)) {
+// route.setJoin(routeType);
+// }
+//
+// return route;
+// }
+//
+// private void createRouteTransitions(ActivityType route, ProcessDefinitionType processDef, Gate type, GateDirection direction, Gateway gateway, FlowElementsContainer container, List<SequenceFlow> incomings, List<SequenceFlow> outgoings) {
+// createIncomingRouteTransitions(route, processDef, type, direction, gateway, container, incomings, outgoings);
+// createOutgoingRouteTransitions(route, processDef, type, direction, gateway, container, incomings, outgoings);
+// }
+//
+// private void createOutgoingRouteTransitions(ActivityType route, ProcessDefinitionType processDef, Gate type,
+// GateDirection direction, Gateway gateway, FlowElementsContainer container, List<SequenceFlow> incomings,
+// List<SequenceFlow> outgoings) {
+// for (SequenceFlow out : outgoings) {
+// ActivityType target = findSequenceTargetActivity(out, container);
+// if (target != null) {
+// TransitionType transition = Sequence2Stardust.createTransition(out.getId(), out.getName(), DocumentationTool.getDescriptionFromDocumentation(out.getDocumentation()), processDef, route, target);
+// setGatewayConditions(type, gateway, out.getConditionExpression(), transition, route, target);
+// }
+// }
+// }
+//
+// private void createIncomingRouteTransitions(ActivityType route, ProcessDefinitionType processDef, Gate type, GateDirection direction, Gateway gateway, FlowElementsContainer container, List<SequenceFlow> incomings, List<SequenceFlow> outgoings) {
+//
+// for (SequenceFlow in : incomings) {
+// ActivityType source = findSequenceSourceActivity(in, container);
+// if (source == null) {
+// FlowNode sourceNode = in.getSourceRef();
+// if (sourceNode instanceof Gateway) {
+// Gateway sourceGate = (Gateway)sourceNode;
+// if (!isGatewayTransformedToRoute(sourceGate)) {
+// backwardCreateMissingTransitions(type, sourceGate, route, processDef, in, container);
+// }
+// }
+// } else {
+// TransitionType transition = Sequence2Stardust.createTransition(in.getId(), in.getName(), DocumentationTool.getDescriptionFromDocumentation(in.getDocumentation()), processDef, source, route);
+// setGatewayConditions(type, gateway, in.getConditionExpression(), transition, source, route);
+// }
+// }
+// }
+//
+//
+// private void backwardCreateMissingTransitions(Gate type, Gateway gateway, ActivityType target, ProcessDefinitionType processDef, SequenceFlow flowToTarget, FlowElementsContainer container) {
+//
+// if (isMixed(gateway)) return;
+//
+// if (isFork(gateway)) {
+// if (null != query.findTransition(flowToTarget.getId(), container)) return;
+// FlowNode sourceNode = getFirstIncomingSource(gateway);
+// if (sourceNode != null && sourceNode instanceof Activity) {
+// ActivityType source = query.findActivity(sourceNode, container);
+// if (source == null) return;
+// TransitionType transition = Sequence2Stardust.createTransition(flowToTarget.getId(), flowToTarget.getName(), DocumentationTool.getDescriptionFromDocumentation(flowToTarget.getDocumentation()), processDef, source, target);
+// setGatewayConditions(type, gateway, flowToTarget.getConditionExpression(), transition, source, target);
+// }
+// } else {
+// for (SequenceFlow in : gateway.getIncoming()) {
+// if (null == query.findTransition(in.getId(), container)) {
+// FlowNode sourceNode = in.getSourceRef();
+// if (sourceNode != null && sourceNode instanceof Activity) {
+// ActivityType source = query.findActivity(sourceNode, container);
+// if (source == null) continue;
+// TransitionType transition = Sequence2Stardust.createTransition(in.getId(), flowToTarget.getName(), DocumentationTool.getDescriptionFromDocumentation(in.getDocumentation()), processDef, source, target);
+// setGatewayConditions(type, gateway, in.getConditionExpression(), transition, source, target);
+// }
+//
+// }
+// }
+// }
+// }
+//
+// private FlowNode getFirstIncomingSource(Gateway gateway) {
+// for (SequenceFlow in : gateway.getIncoming()) {
+// if (in != null) return in.getSourceRef();
+// }
+// return null;
+// }
+//
+// private boolean isGatewayTransformedToRoute(Gateway sourceGate) {
+// if (isMixed(sourceGate)) return true;
+// if (hasBpmnGateSource(sourceGate, sourceGate.getIncoming())) return true;
+// return false;
+// }
+//
+// private ActivityType findSequenceTargetActivity(SequenceFlow flow, FlowElementsContainer container) {
+// FlowNode targetNode = flow.getTargetRef();
+// return query.findActivity(targetNode, container);
+// }
+//
+// private ActivityType findSequenceSourceActivity(SequenceFlow flow, FlowElementsContainer container) {
+// FlowNode sourceNode = flow.getSourceRef();
+// return query.findActivity(sourceNode, container);
+// }
+//
+// private boolean isFork(Gateway gateway) {
+// return gateway.getOutgoing() != null & gateway.getOutgoing().size() > 1;
+// }
+//
+// private boolean isJoin(Gateway gateway) {
+// return gateway.getIncoming() != null && gateway.getIncoming().size() > 1;
+// }
+//
+// private boolean isMixed(Gateway gateway) {
+// if (isJoin(gateway) && isFork(gateway)) {
+//// failures.add(Bpmn2CarnotXPDL.FAIL_ELEMENT_UNSUPPORTED_FEATURE + " n:n exclusive gateway - target model incomplete.");
+// return true;
+// }
+// return false;
+// }
+//
+// private boolean hasBpmnGateSource(Gateway gateway, List<SequenceFlow> incomings) {
+// for (SequenceFlow in : incomings) {
+// if (in.getSourceRef() instanceof Gateway) return true;
+// }
+// return false;
+// }
+//
+// private boolean validateGate(Gateway gateway) {
+// List<SequenceFlow> incomings = gateway.getIncoming();
+// List<SequenceFlow> outgoings = gateway.getOutgoing();
+//
+// if (incomings == null || outgoings == null) return false;
+// if (incomings.size() == 0 || outgoings.size() == 0) return false;
+//
+// return true;
+// }
+//
+// private boolean validateContainer(FlowElementsContainer container) {
+// ProcessDefinitionType processDef = query.findProcessDefinition(container.getId());
+// if (processDef ==null) {
+// failures.add(Bpmn2StardustXPDL.FAIL_NO_PROCESS_DEF + "(Id: " + container.getId() + ")");
+// return false;
+// }
+//
+// return true;
+// }
+//
+// private void addJoin(Gate gate, JoinSplitType joinsplit, Gateway gateway,
+// ProcessDefinitionType processDef, FlowElementsContainer container, List<SequenceFlow> incomings,
+// List<SequenceFlow> outgoings) {
+//
+// ActivityType targetActivity = query.findActivity(outgoings.get(0).getTargetRef(), container);
+// if (targetActivity != null) targetActivity.setJoin(joinsplit);
+// for (SequenceFlow incoming : incomings) {
+// if (incoming.getSourceRef() instanceof Activity || incoming.getSourceRef() instanceof Gateway) {
+// ActivityType sourceActivity = query.findActivity(incoming.getSourceRef(), container);
+// if (sourceActivity == null) continue;
+// addGatewayTransition(gate, gateway, incoming.getConditionExpression(), incoming.getId(), incoming.getId(), DocumentationTool.getDescriptionFromDocumentation(gateway.getDocumentation()), sourceActivity, targetActivity, container, processDef);
+// } else {
+// failures.add(Bpmn2StardustXPDL.FAIL_ELEMENT_UNSUPPORTED_FEATURE + " exclusive gateway source other than activity - target model incomplete.");
+// continue;
+// }
+// }
+// }
+//
+// private void addFork(Gate gate, JoinSplitType splitType, Gateway gateway, ProcessDefinitionType processDef, FlowElementsContainer container, List<SequenceFlow> incomings, List<SequenceFlow> outgoings) {
+// ActivityType sourceActivity = query.findActivity(incomings.get(0).getSourceRef(), container);
+// if (sourceActivity != null) sourceActivity.setSplit(splitType);
+// for (SequenceFlow outgoing : outgoings) {
+// if (outgoing.getTargetRef() instanceof Activity || outgoing.getTargetRef() instanceof Gateway) {
+// ActivityType targetActivity = query.findActivity(outgoing.getTargetRef(), container);
+// if (targetActivity == null) continue;
+// String gatewayDoc = DocumentationTool.getDescriptionFromDocumentation(gateway.getDocumentation());
+// addGatewayTransition(gate, gateway, outgoing.getConditionExpression(), outgoing.getName(), outgoing.getId(), gatewayDoc, sourceActivity, targetActivity, container, processDef);
+// } else {
+// failures.add(Bpmn2StardustXPDL.FAIL_ELEMENT_UNSUPPORTED_FEATURE + " exclusive gateway target other than activity or gateway - target model incomplete.");
+// continue;
+// }
+// }
+// }
+//
+// private void addGatewayTransition(Gate gate, Gateway gateway, Expression expression, String name, String Id, String documentation, ActivityType sourceActivity, ActivityType targetActivity, FlowElementsContainer container, ProcessDefinitionType processDef) {
+// logger.info("addGatewayTransition from " + sourceActivity.getName() + " to " + targetActivity.getName());
+// if (processDef != null) {
+// if (sourceActivity != null && targetActivity != null) {
+// TransitionType transition = Sequence2Stardust.createTransition(Id, name, documentation, processDef, sourceActivity, targetActivity);
+// setGatewayConditions(gate, gateway, expression, transition, sourceActivity, targetActivity);
+// processDef.getTransition().add(transition);
+// } else {
+// failures.add("No valid source and target for gateway sequence: " + Id);
+// }
+// } else {
+// failures.add(Bpmn2StardustXPDL.FAIL_NO_PROCESS_DEF + "(Id: " + container.getId() + ")");
+// }
+// }
+//
+// private void setGatewayConditions(Gate gate, Gateway gateway, Expression expression, TransitionType transition, ActivityType sourceActivity, ActivityType targetActivity) {
+// String expressionVal = "";
+// FormalExpression formal = null;
+// if (expression != null)
+// if (expression instanceof FormalExpression) {
+// formal = (FormalExpression) expression;
+// } else {
+// expressionVal = DocumentationTool.getInformalExpressionValue(expression);
+// }
+//
+// if (isGatewayDefaultSequence(gate, gateway, targetActivity)) {
+// logger.debug("transition: " + transition.getId() + " setSequenceOtherwiseCondition");
+// Sequence2Stardust.setSequenceOtherwiseCondition(transition);
+// } else if (gate.equals(Gate.PARALLEL)) {
+// logger.debug("transition: " + transition.getId() + " setSequenceTrueCondition");
+// Sequence2Stardust.setSequenceTrueCondition(transition);
+// } else if (!expressionVal.equals("")) {
+// logger.debug("transition: " + transition.getId() + " setSequenceInformalCondition: " + expressionVal);
+// Sequence2Stardust.setSequenceInformalCondition(transition, expressionVal);
+// } else if (formal != null) {
+// logger.debug("transition: " + transition.getId() + " setSequenceFormalCondition ");
+// Sequence2Stardust.setSequenceFormalCondition(transition, formal, failures);
+// } else {
+// logger.debug("transition: " + transition.getId() + " setSequenceTrueCondition");
+// Sequence2Stardust.setSequenceTrueCondition(transition);
+// }
+//
+// }
+//
+// private boolean isGatewayDefaultSequence(Gate gate, Gateway gateway, ActivityType targetActivity) {
+// return gate.equals(Gate.EXCLUSIVE)
+// && ((ExclusiveGateway)gateway).getDefault() != null
+// && ((ExclusiveGateway)gateway).getDefault().getTargetRef().getId().equals(targetActivity.getId());
+// }
+//
+//}
diff --git a/model/org.eclipse.stardust.model.bpmn2.transform/src/main/java/org/eclipse/stardust/model/bpmn2/transform/xpdl/elements/Sequence2Stardust.java b/model/org.eclipse.stardust.model.bpmn2.transform/src/main/java/org/eclipse/stardust/model/bpmn2/transform/xpdl/elements/Sequence2Stardust.java
new file mode 100644
index 0000000..38b9381
--- /dev/null
+++ b/model/org.eclipse.stardust.model.bpmn2.transform/src/main/java/org/eclipse/stardust/model/bpmn2/transform/xpdl/elements/Sequence2Stardust.java
@@ -0,0 +1,84 @@
+/*******************************************************************************
+ * Copyright (c) 2012 ITpearls AG and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * ITpearls - initial API and implementation and/or initial documentation
+ *******************************************************************************/
+package org.eclipse.stardust.model.bpmn2.transform.xpdl.elements;
+
+import static org.eclipse.stardust.model.xpdl.builder.BpmModelBuilder.newTransition;
+
+import java.util.List;
+
+import org.eclipse.bpmn2.FormalExpression;
+import org.eclipse.stardust.model.bpmn2.transform.xpdl.Bpmn2StardustXPDL;
+import org.eclipse.stardust.model.xpdl.carnot.ActivityType;
+import org.eclipse.stardust.model.xpdl.carnot.CarnotWorkflowModelFactory;
+import org.eclipse.stardust.model.xpdl.carnot.ProcessDefinitionType;
+import org.eclipse.stardust.model.xpdl.carnot.TransitionType;
+import org.eclipse.stardust.model.xpdl.carnot.XmlTextNode;
+import org.eclipse.stardust.model.xpdl.carnot.util.ModelUtils;
+
+/**
+ * @author Simon Nikles
+ *
+ */
+public class Sequence2Stardust {
+
+ public static final String CONDITION_KEY = "CONDITION";
+ public static final String OTHERWISE_KEY = "OTHERWISE";
+ public static final String EXPRESSION_LANGUAGE_JAVA = "http://www.sun.com/java";
+
+ public static TransitionType createTransition(String id, String name, String documentation, ProcessDefinitionType process, ActivityType sourceActivity, ActivityType targetActivity) {
+ TransitionType transition =
+ newTransition()
+ .forProcess(process)
+ .betweenActivities(sourceActivity, targetActivity)
+ .withIdAndName(id, name)
+ .withDescription(documentation)
+ .build();
+ return transition;
+ }
+
+ public static void setSequenceOtherwiseCondition(TransitionType transition) {
+ transition.setCondition(OTHERWISE_KEY);
+ }
+
+ public static void setSequenceTrueCondition(TransitionType transition) {
+ transition.setCondition(CONDITION_KEY);
+ XmlTextNode expression = CarnotWorkflowModelFactory.eINSTANCE.createXmlTextNode();
+ ModelUtils.setCDataString(expression.getMixed(), "true", true);
+ transition.setExpression(expression);
+ }
+
+ public static void setSequenceInformalCondition(TransitionType transition, String string) {
+// DescriptionType descrType = transition.getDescription();
+// String val = descrType.getMixed().getValue(CarnotWorkflowModelPackage.DESCRIPTION_TYPE__MIXED).toString();
+// descrType.getMixed().setValue(CarnotWorkflowModelPackage.DESCRIPTION_TYPE__MIXED, val + " " + string);
+// transition.setDescription(descrType);
+ transition.setCondition(CONDITION_KEY);
+ XmlTextNode expression = CarnotWorkflowModelFactory.eINSTANCE.createXmlTextNode();
+ ModelUtils.setCDataString(expression.getMixed(), string, true);
+ transition.setExpression(expression);
+
+ }
+
+ public static void setSequenceFormalCondition(TransitionType transition, FormalExpression formalExpression, List<String> failures) {
+ if (formalExpression.getLanguage().equals(EXPRESSION_LANGUAGE_JAVA)) {
+ transition.setCondition(CONDITION_KEY);
+ XmlTextNode expression = CarnotWorkflowModelFactory.eINSTANCE.createXmlTextNode();
+ ModelUtils.setCDataString(expression.getMixed(), formalExpression.getBody(), true);
+ transition.setExpression(expression);
+ } else {
+ String expr = formalExpression.getLanguage()
+ + " \n" + formalExpression.getBody();
+ setSequenceInformalCondition(transition, expr);
+ failures.add(Bpmn2StardustXPDL.FAIL_ELEMENT_UNSUPPORTED_FEATURE + "(Sequence - " + transition.getId() + " - Expression language (" + formalExpression.getLanguage() + ") not supported.");
+ }
+ }
+
+}
diff --git a/model/org.eclipse.stardust.model.bpmn2.transform/src/main/java/org/eclipse/stardust/model/bpmn2/transform/xpdl/helper/BpmnModelQuery.java b/model/org.eclipse.stardust.model.bpmn2.transform/src/main/java/org/eclipse/stardust/model/bpmn2/transform/xpdl/helper/BpmnModelQuery.java
new file mode 100644
index 0000000..a6862bb
--- /dev/null
+++ b/model/org.eclipse.stardust.model.bpmn2.transform/src/main/java/org/eclipse/stardust/model/bpmn2/transform/xpdl/helper/BpmnModelQuery.java
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * Copyright (c) 2012 ITpearls AG and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * ITpearls - initial API and implementation and/or initial documentation
+ *******************************************************************************/
+package org.eclipse.stardust.model.bpmn2.transform.xpdl.helper;
+
+import org.eclipse.bpmn2.CatchEvent;
+import org.eclipse.bpmn2.EventDefinition;
+
+/**
+ * @author Simon Nikles
+ *
+ */
+public class BpmnModelQuery {
+
+ public BpmnModelQuery() {
+
+ }
+
+ public int countEventDefinitions(CatchEvent event) {
+ if (event.getEventDefinitions() != null) return event.getEventDefinitions().size();
+ return 0;
+ }
+
+ public EventDefinition getFirstEventDefinition(CatchEvent event) {
+ if (countEventDefinitions(event) > 0) {
+ return event.getEventDefinitions().get(0);
+ }
+ return null;
+ }
+}
diff --git a/model/org.eclipse.stardust.model.bpmn2.transform/src/main/java/org/eclipse/stardust/model/bpmn2/transform/xpdl/helper/BpmnTimerCycle.java b/model/org.eclipse.stardust.model.bpmn2.transform/src/main/java/org/eclipse/stardust/model/bpmn2/transform/xpdl/helper/BpmnTimerCycle.java
new file mode 100644
index 0000000..b282852
--- /dev/null
+++ b/model/org.eclipse.stardust.model.bpmn2.transform/src/main/java/org/eclipse/stardust/model/bpmn2/transform/xpdl/helper/BpmnTimerCycle.java
@@ -0,0 +1,91 @@
+package org.eclipse.stardust.model.bpmn2.transform.xpdl.helper;
+
+import java.util.Date;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import javax.xml.datatype.DatatypeFactory;
+import javax.xml.datatype.Duration;
+
+public class BpmnTimerCycle {
+ // REGEX_RECURRENCE: Start of the String with "R", optional signs and a slash ("/")
+ private final String REGEX_RECURRENCE = "\\A[R][^/]*/";
+ // REGEX_STARTDATE (after replace REGEX_RECURRENCE from input-string): anything until the next slash
+ private final String REGEX_STARTDATE = ".+/";
+ private final Pattern PATTERN_RECURRENCE = Pattern.compile(REGEX_RECURRENCE);
+ private final Pattern PATTERN_STARTDATE = Pattern.compile(REGEX_STARTDATE);
+
+ private int recurrences;
+ private Duration cycleDuration;
+ private Date startDate;
+
+ public static BpmnTimerCycle getCycle(String lexicalRepresentation) {
+ return new BpmnTimerCycle(lexicalRepresentation);
+ }
+
+ public Duration getCycleDuration() {
+ return cycleDuration;
+ }
+
+ public Date getStartDate() {
+ return startDate;
+ }
+
+ public int getRecurrences() {
+ return recurrences;
+ }
+
+ private BpmnTimerCycle(String lexicalRepresentation) {
+ parseLexicalRepresentation(lexicalRepresentation);
+ }
+
+ private void parseLexicalRepresentation(String lexicalRepresentation) {
+ String timeCycle = lexicalRepresentation;
+ String recurrenceValue = "";
+ String startDateValue = "";
+ String durationValue = "";
+
+ Matcher recurrenceMatcher = PATTERN_RECURRENCE.matcher(timeCycle);
+ if (recurrenceMatcher.find()) {
+ recurrenceValue = recurrenceMatcher.group().replaceAll("/", "").replaceAll("R", "");
+ timeCycle = timeCycle.replaceFirst(REGEX_RECURRENCE, "");
+ }
+
+ Matcher startDateMatcher = PATTERN_STARTDATE.matcher(timeCycle);
+ if (startDateMatcher.find()) {
+ startDateValue = startDateMatcher.group().replaceAll("/", "");
+ timeCycle = timeCycle.replaceFirst(REGEX_STARTDATE, "");
+ }
+
+ durationValue = timeCycle;
+
+ recurrences = castRecurrences(recurrenceValue);
+ cycleDuration = castDuration(durationValue);
+ startDate = castStartDate(startDateValue);
+ }
+
+ private int castRecurrences(String recurrenceValue) {
+ int rec = -1;
+ try {
+ rec = Integer.valueOf(recurrenceValue);
+ } catch (Exception e) {}
+ return rec;
+ }
+
+ private Duration castDuration(String durationValue) {
+ Duration dur = null;
+ try {
+ dur = DatatypeFactory.newInstance().newDuration(durationValue);
+ } catch (Exception e) { }
+ return dur;
+ }
+
+ private Date castStartDate(String startDateValue) {
+ Date d = null;
+ try {
+ d = DatatypeFactory.newInstance().newXMLGregorianCalendar(startDateValue).toGregorianCalendar().getTime();
+ } catch (Exception e) { }
+ return d;
+ }
+
+}
diff --git a/model/org.eclipse.stardust.model.bpmn2.transform/src/main/java/org/eclipse/stardust/model/bpmn2/transform/xpdl/helper/CarnotModelQuery.java b/model/org.eclipse.stardust.model.bpmn2.transform/src/main/java/org/eclipse/stardust/model/bpmn2/transform/xpdl/helper/CarnotModelQuery.java
new file mode 100644
index 0000000..d70e4e6
--- /dev/null
+++ b/model/org.eclipse.stardust.model.bpmn2.transform/src/main/java/org/eclipse/stardust/model/bpmn2/transform/xpdl/helper/CarnotModelQuery.java
@@ -0,0 +1,107 @@
+/*******************************************************************************
+ * Copyright (c) 2012 ITpearls AG and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * ITpearls - initial API and implementation and/or initial documentation
+ *******************************************************************************/
+package org.eclipse.stardust.model.bpmn2.transform.xpdl.helper;
+
+import org.eclipse.bpmn2.FlowElementsContainer;
+import org.eclipse.bpmn2.FlowNode;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.stardust.model.xpdl.carnot.ActivityType;
+import org.eclipse.stardust.model.xpdl.carnot.IModelParticipant;
+import org.eclipse.stardust.model.xpdl.carnot.ModelType;
+import org.eclipse.stardust.model.xpdl.carnot.OrganizationType;
+import org.eclipse.stardust.model.xpdl.carnot.ProcessDefinitionType;
+import org.eclipse.stardust.model.xpdl.carnot.RoleType;
+import org.eclipse.stardust.model.xpdl.carnot.TransitionType;
+import org.eclipse.stardust.model.xpdl.carnot.TriggerType;
+
+/**
+ * @author Simon Nikles
+ *
+ */
+public class CarnotModelQuery {
+
+ private ModelType carnotModel;
+
+ public CarnotModelQuery(ModelType carnotModel) {
+ this.carnotModel = carnotModel;
+ }
+
+ public ActivityType findActivity(FlowNode node, FlowElementsContainer container) {
+ String nodeId = node != null ? node.getId() : null;
+ ProcessDefinitionType processDef = findProcessDefinition(container.getId());
+ if (processDef != null && nodeId != null) {
+ return findActivity(processDef, nodeId);
+ }
+ return null;
+ }
+
+ public IModelParticipant findResourceType(String id) {
+ EList<RoleType> roles = carnotModel.getRole();
+ EList<OrganizationType> orgs = carnotModel.getOrganization();
+ for (RoleType role : roles) {
+ if (role.getId().equals(id)) return role;
+ }
+ for (OrganizationType org : orgs) {
+ if (org.getId().equals(id)) return org;
+ }
+ return null;
+ }
+
+ public ProcessDefinitionType findProcessDefinition(String id) {
+ return findProcessDefinition(carnotModel, id);
+ }
+
+ public TransitionType findTransition(String id, FlowElementsContainer container) {
+ ProcessDefinitionType processDef = findProcessDefinition(container.getId());
+ return findTransition(processDef, id);
+ }
+
+ public static IModelParticipant findParticipant(ModelType model, String id) {
+ for (RoleType role : model.getRole()) {
+ if (role.getId().equals(id)) return role;
+ }
+ for (OrganizationType org : model.getOrganization()) {
+ if (org.getId().equals(id)) return org;
+ }
+ return null;
+ }
+
+ public static TriggerType findTrigger(ProcessDefinitionType processDef, String id) {
+ for (TriggerType trigger : processDef.getTrigger()) {
+ if (trigger.getId().equals(id)) return trigger;
+ }
+ return null;
+ }
+
+ public static ActivityType findActivity(ProcessDefinitionType processDef, String id) {
+ for (ActivityType activity : processDef.getActivity()) {
+ if (activity.getId().equals(id)) return activity;
+ }
+ return null;
+ }
+
+ public static ProcessDefinitionType findProcessDefinition(ModelType model, String id) {
+ for (ProcessDefinitionType processDef : model.getProcessDefinition()) {
+ if (processDef.getId().equals(id)) return processDef;
+ }
+ return null;
+ }
+
+ public static TransitionType findTransition(ProcessDefinitionType processDef, String id) {
+ for (TransitionType transition : processDef.getTransition()) {
+ if (transition.getId().equals(id)) return transition;
+ }
+ return null;
+ }
+
+
+
+}
diff --git a/model/org.eclipse.stardust.model.bpmn2.transform/src/main/java/org/eclipse/stardust/model/bpmn2/transform/xpdl/helper/DocumentationTool.java b/model/org.eclipse.stardust.model.bpmn2.transform/src/main/java/org/eclipse/stardust/model/bpmn2/transform/xpdl/helper/DocumentationTool.java
new file mode 100644
index 0000000..dc4388d
--- /dev/null
+++ b/model/org.eclipse.stardust.model.bpmn2.transform/src/main/java/org/eclipse/stardust/model/bpmn2/transform/xpdl/helper/DocumentationTool.java
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * Copyright (c) 2012 ITpearls AG and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * ITpearls - initial API and implementation and/or initial documentation
+ *******************************************************************************/
+package org.eclipse.stardust.model.bpmn2.transform.xpdl.helper;
+
+import java.util.List;
+
+import org.eclipse.bpmn2.Documentation;
+import org.eclipse.bpmn2.Expression;
+
+/**
+ * @author Simon Nikles
+ *
+ */
+public class DocumentationTool {
+
+ public static String getDescriptionFromDocumentation(List<Documentation> documentation) {
+ String description = "";
+ for (Documentation doc : documentation) {
+ description = description.concat(doc.getText());
+ }
+ return description;
+ }
+
+ public static String getInformalExpressionValue(Expression expression) {
+ String description = "";
+ if (expression != null) {
+ List<Documentation> documentation = expression.getDocumentation();
+ if (documentation != null) {
+ for (Documentation doc : documentation) {
+ description = description.concat(doc.getText());
+ }
+ }
+ }
+ return description;
+ }
+}
diff --git a/model/org.eclipse.stardust.model.bpmn2.transform/src/test/java/org/eclipse/stardust/test/model/transformation/bpmn/Bpmn2CarnotXPDLTest.java b/model/org.eclipse.stardust.model.bpmn2.transform/src/test/java/org/eclipse/stardust/test/model/transformation/bpmn/Bpmn2CarnotXPDLTest.java
index a6afcf0..fd6b9f9 100644
--- a/model/org.eclipse.stardust.model.bpmn2.transform/src/test/java/org/eclipse/stardust/test/model/transformation/bpmn/Bpmn2CarnotXPDLTest.java
+++ b/model/org.eclipse.stardust.model.bpmn2.transform/src/test/java/org/eclipse/stardust/test/model/transformation/bpmn/Bpmn2CarnotXPDLTest.java
@@ -14,6 +14,9 @@ import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.net.URL;
+import java.text.DateFormat;
+import java.util.Calendar;
+import java.util.Date;
import junit.framework.Test;
import junit.framework.TestCase;
@@ -25,7 +28,8 @@ import org.eclipse.stardust.engine.api.model.PredefinedConstants;
import org.eclipse.stardust.engine.core.model.beans.XMLConstants;
import org.eclipse.stardust.model.bpmn2.input.BPMNModelImporter;
import org.eclipse.stardust.model.bpmn2.transform.TransformationControl;
-import org.eclipse.stardust.model.bpmn2.transform.carnot.DialectCarnotXPDL;
+import org.eclipse.stardust.model.bpmn2.transform.xpdl.DialectStardustXPDL;
+import org.eclipse.stardust.model.bpmn2.transform.xpdl.helper.CarnotModelQuery;
import org.eclipse.stardust.model.xpdl.carnot.ActivityImplementationType;
import org.eclipse.stardust.model.xpdl.carnot.ActivityType;
import org.eclipse.stardust.model.xpdl.carnot.IModelParticipant;
@@ -36,17 +40,21 @@ import org.eclipse.stardust.model.xpdl.carnot.ProcessDefinitionType;
import org.eclipse.stardust.model.xpdl.carnot.RoleType;
import org.eclipse.stardust.model.xpdl.carnot.TransitionType;
import org.eclipse.stardust.model.xpdl.carnot.TriggerType;
+import org.eclipse.stardust.model.xpdl.carnot.util.AttributeUtil;
+/**
+ * @author Simon Nikles
+ *
+ */
public class Bpmn2CarnotXPDLTest extends TestCase {
private static final String BPMN_MODEL_DIR = "models/bpmn/";
private static final String OUTPUT_DIR = "models/output/";
private static final String TEST_ID_START_EVENT = "TestModelStartEventId";
- private static final String TEST_ID_POOL_P1 = "TestModelPool1";
- private static final String TEST_ID_POOL_P2 = "TestModelPool2";
- private static final String TEST_ID_LANE_L1 = "TestModelLane1";
- private static final String TEST_ID_LANE_L2 = "TestModelLane2";
+ private static final String TEST_ID_START_EVENT_TIMER_DATE = "TestModelTimerStartEventTime";
+ private static final String TEST_ID_START_EVENT_TIMER_CYCLE_STOP = "TestModelStartEventCycleStop";
+
private static final String TEST_ID_TASK_A = "TestModelTaskA";
private static final String TEST_ID_TASK_B = "TestModelTaskB";
private static final String TEST_ID_TASK_C = "TestModelTaskC";
@@ -55,8 +63,13 @@ public class Bpmn2CarnotXPDLTest extends TestCase {
private static final String TEST_ID_SEQUENCE_A_TO_B = "TestModelSequenceAtoB";
private static final String TEST_ID_CONDITIONAL_SEQUENCE = "TestModelConditionalSequenceFlow1";
private static final String TEST_ID_DEFAULT_SEQUENCE = "TestModelDefaultSequenceFlow";
- private static final String TEST_ID_XOR_SPLIT_GATEWAY = "TestModelXORSplitGateway";
- private static final String TEST_ID_XOR_JOIN_GATEWAY = "TestModelXORJoinGateway";
+
+ private static final String TEST_ID_XOR_MIXED_GATEWAY = "TestModelXORMixedGateway";
+ private static final String TEST_ID_SEQUENCE_B2GATE = "SeqB2Gate";
+ private static final String TEST_ID_SEQUENCE_C2GATE = "SeqC2Gate";
+ private static final String TEST_ID_SEQUENCE_GATE2D = "SeqGate2D";
+ private static final String TEST_ID_SEQUENCE_GATE2E = "SeqGate2E";
+
private static final String TEST_ID_SUBPROCESS = "TestModelSubProcess";
private static final String TEST_ID_MAIN_PROCESS = "TestModelMainProcess";
private static final String TEST_ID_PARTNER_ENTITY_ORG_A = "TestOrganisationA";
@@ -68,7 +81,15 @@ public class Bpmn2CarnotXPDLTest extends TestCase {
return suite;
}
+ public void testSimpleSequence() throws FileNotFoundException, IOException {
+ final String modelFile = "c:/temp/simple-sequence.bpmn";
+ final String fileOutput = "c:/temp/simple-sequence.xpdl";
+ Bpmn2Resource bpmnModel = BPMNModelImporter.importModel(modelFile);
+ Definitions definitions = BPMNModelImporter.getDefinitions(bpmnModel);
+ ModelType result = transformModel(definitions, fileOutput);
+ }
+
public void testStartEventNone() {
final String modelFile = BPMN_MODEL_DIR + "StartEventNone.bpmn";
final String fileOutput = getResourceFilePath(OUTPUT_DIR) + "testStartEventNone.xpdl";
@@ -78,26 +99,26 @@ public class Bpmn2CarnotXPDLTest extends TestCase {
assertNotNull(process);
assertNotNull(result);
- TriggerType trigger = findTrigger(process, TEST_ID_START_EVENT);
+ TriggerType trigger = CarnotModelQuery.findTrigger(process, TEST_ID_START_EVENT);
assertNotNull(trigger);
assertEquals(PredefinedConstants.MANUAL_TRIGGER, trigger.getType().getId());
}
public void testStartEventMessage() {
// TODO JMS_TRIGGER type is not available
- /*
- final String modelFile = BPMN_MODEL_DIR + "StartEventMessage.bpmn";
- final String fileOutput = getResourceFilePath(OUTPUT_DIR) + "testStartEventMessage.xpdl";
-
- ModelType result = transformModel(loadBpmnModel(modelFile), fileOutput);
- ProcessDefinitionType process = result.getProcessDefinition().get(0);
-
- assertNotNull(process);
- assertNotNull(result);
- TriggerType trigger = findTrigger(process, TEST_ID_START_EVENT);
- assertNotNull(trigger);
- assertEquals(PredefinedConstants.JMS_TRIGGER, trigger.getType().getId());
- */
+
+// final String modelFile = BPMN_MODEL_DIR + "StartEventMessage.bpmn";
+// final String fileOutput = getResourceFilePath(OUTPUT_DIR) + "testStartEventMessage.xpdl";
+//
+// ModelType result = transformModel(loadBpmnModel(modelFile), fileOutput);
+// ProcessDefinitionType process = result.getProcessDefinition().get(0);
+//
+// assertNotNull(process);
+// assertNotNull(result);
+// TriggerType trigger = CarnotModelQuery.findTrigger(process, TEST_ID_START_EVENT);
+// assertNotNull(trigger);
+// assertEquals(PredefinedConstants.JMS_TRIGGER, trigger.getType().getId());
+
}
public void testStartEventTimer() {
@@ -109,7 +130,7 @@ public class Bpmn2CarnotXPDLTest extends TestCase {
assertNotNull(process);
assertNotNull(result);
- TriggerType trigger = findTrigger(process, TEST_ID_START_EVENT);
+ TriggerType trigger = CarnotModelQuery.findTrigger(process, TEST_ID_START_EVENT);
assertNotNull(trigger);
assertEquals(PredefinedConstants.TIMER_TRIGGER, trigger.getType().getId());
}
@@ -123,7 +144,7 @@ public class Bpmn2CarnotXPDLTest extends TestCase {
assertNotNull(process);
assertNotNull(result);
- ActivityType activity = findActivity(process, TEST_ID_TASK_A);
+ ActivityType activity = CarnotModelQuery.findActivity(process, TEST_ID_TASK_A);
assertNotNull(activity);
assertEquals(ActivityImplementationType.MANUAL_LITERAL, activity.getImplementation());
}
@@ -137,9 +158,9 @@ public class Bpmn2CarnotXPDLTest extends TestCase {
assertNotNull(process);
assertNotNull(result);
- IModelParticipant orgParticipant = findParticipant(result, TEST_ID_PARTNER_ENTITY_ORG_A);
- IModelParticipant resourceRole = findParticipant(result, TEST_ID_RESOURCE_ROLE_A);
- ActivityType taskA = findActivity(process, TEST_ID_TASK_A);
+ IModelParticipant orgParticipant = CarnotModelQuery.findParticipant(result, TEST_ID_PARTNER_ENTITY_ORG_A);
+ IModelParticipant resourceRole = CarnotModelQuery.findParticipant(result, TEST_ID_RESOURCE_ROLE_A);
+ ActivityType taskA = CarnotModelQuery.findActivity(process, TEST_ID_TASK_A);
assertNotNull(orgParticipant);
assertNotNull(resourceRole);
assertNotNull(taskA);
@@ -170,7 +191,7 @@ public class Bpmn2CarnotXPDLTest extends TestCase {
}
public void testSequenceActivityToActivity(ActivityType taskA, ActivityType taskB, ProcessDefinitionType processDef) {
- TransitionType sequenceFlow = findTransition(processDef, TEST_ID_SEQUENCE_A_TO_B);
+ TransitionType sequenceFlow = CarnotModelQuery.findTransition(processDef, TEST_ID_SEQUENCE_A_TO_B);
assertNotNull(sequenceFlow);
assertNotNull(sequenceFlow.getFrom());
assertNotNull(sequenceFlow.getTo());
@@ -187,14 +208,14 @@ public class Bpmn2CarnotXPDLTest extends TestCase {
// A -> B, C or D -> E
// A has condition, D is default path
- ActivityType taskA = findActivity(process, TEST_ID_TASK_A);
- ActivityType taskB = findActivity(process, TEST_ID_TASK_B);
- ActivityType taskC = findActivity(process, TEST_ID_TASK_C);
- ActivityType taskD = findActivity(process, TEST_ID_TASK_D);
- ActivityType taskE = findActivity(process, TEST_ID_TASK_E);
+ ActivityType taskA = CarnotModelQuery.findActivity(process, TEST_ID_TASK_A);
+ ActivityType taskB = CarnotModelQuery.findActivity(process, TEST_ID_TASK_B);
+ ActivityType taskC = CarnotModelQuery.findActivity(process, TEST_ID_TASK_C);
+ ActivityType taskD = CarnotModelQuery.findActivity(process, TEST_ID_TASK_D);
+ ActivityType taskE = CarnotModelQuery.findActivity(process, TEST_ID_TASK_E);
- TransitionType transitionAB = findTransition(process, TEST_ID_CONDITIONAL_SEQUENCE);
- TransitionType defaultTransitionAD = findTransition(process, TEST_ID_DEFAULT_SEQUENCE);
+ TransitionType transitionAB = CarnotModelQuery.findTransition(process, TEST_ID_CONDITIONAL_SEQUENCE);
+ TransitionType defaultTransitionAD = CarnotModelQuery.findTransition(process, TEST_ID_DEFAULT_SEQUENCE);
assertNotNull(taskA);
assertNotNull(taskB);
@@ -213,21 +234,209 @@ public class Bpmn2CarnotXPDLTest extends TestCase {
System.out.println("sequence condition AB " + transitionAB.getCondition());
System.out.println("sequence condition AD " + defaultTransitionAD.getCondition());
- assertEquals(testCondition, transitionAB.getCondition());
+ //assertEquals(testCondition, transitionAB.getCondition());
+ assertEquals(XMLConstants.CONDITION_VALUE, transitionAB.getCondition());
+ assertEquals(testCondition, transitionAB.getExpression().getMixed().getValue(0));
assertEquals(XMLConstants.CONDITION_OTHERWISE_VALUE, defaultTransitionAD.getCondition());
}
+ public void testParallelGatewayOneSplitOneMerge() {
+ final String modelFile = BPMN_MODEL_DIR + "ParallelGatewaysSingle.bpmn";
+ final String fileOutput = getResourceFilePath(OUTPUT_DIR) + "testParallelGatewaysSingle.xpdl";
+
+ ModelType result = transformModel(loadBpmnModel(modelFile), fileOutput);
+ ProcessDefinitionType process = result.getProcessDefinition().get(0);
+
+ // A -> B, C and D -> E
+ ActivityType taskA = CarnotModelQuery.findActivity(process, TEST_ID_TASK_A);
+ ActivityType taskB = CarnotModelQuery.findActivity(process, TEST_ID_TASK_B);
+ ActivityType taskC = CarnotModelQuery.findActivity(process, TEST_ID_TASK_C);
+ ActivityType taskD = CarnotModelQuery.findActivity(process, TEST_ID_TASK_D);
+ ActivityType taskE = CarnotModelQuery.findActivity(process, TEST_ID_TASK_E);
+
+ assertNotNull(taskA);
+ assertNotNull(taskB);
+ assertNotNull(taskC);
+ assertNotNull(taskD);
+ assertNotNull(taskE);
+
+ assertTrue(taskA.getOutTransitions().size()==3);
+ assertTrue(taskE.getInTransitions().size()==3);
+
+ assertEquals(JoinSplitType.AND_LITERAL, taskA.getSplit());
+ assertEquals(JoinSplitType.AND_LITERAL, taskE.getJoin());
+
+ for (TransitionType trans : taskA.getOutTransitions()) {
+ assertEquals("CONDITION", trans.getCondition());
+ assertEquals("true", trans.getExpression().getMixed().getValue(0));
+ }
+ }
+
+ public void testMixedGateway() {
+ // Gateway with two incoming and two outgoing sequence-flows
+ // expected in stardust:
+ // - two 'gateways'
+ // - one Route Activity (representing the Gateway)
+ // -- having XOR Join and XOR Split
+ // - four transitions
+ // -- b->Route, c->Route, Route->d (with condition), Route->e (with condition)
+
+ final String modelFile = BPMN_MODEL_DIR + "MixedGateway.bpmn";
+ final String fileOutput = getResourceFilePath(OUTPUT_DIR) + "testMixedGateway.xpdl";
+
+ final String expr4D = "expr4D";
+ final String expr4E = "expr4E";
+
+ ModelType result = transformModel(loadBpmnModel(modelFile), fileOutput);
+ ProcessDefinitionType process = result.getProcessDefinition().get(0);
+
+ ActivityType taskA = CarnotModelQuery.findActivity(process, TEST_ID_TASK_A);
+ ActivityType taskB = CarnotModelQuery.findActivity(process, TEST_ID_TASK_B);
+ ActivityType taskC = CarnotModelQuery.findActivity(process, TEST_ID_TASK_C);
+ ActivityType taskD = CarnotModelQuery.findActivity(process, TEST_ID_TASK_D);
+ ActivityType taskE = CarnotModelQuery.findActivity(process, TEST_ID_TASK_E);
+ ActivityType route = CarnotModelQuery.findActivity(process, TEST_ID_XOR_MIXED_GATEWAY);
+
+ assertNotNull(taskA);
+ assertNotNull(taskB);
+ assertNotNull(taskC);
+ assertNotNull(taskD);
+ assertNotNull(taskE);
+ assertNotNull(route);
+
+ assertEquals(JoinSplitType.NONE_LITERAL, taskB.getSplit());
+ assertEquals(JoinSplitType.NONE_LITERAL, taskC.getSplit());
+ assertEquals(JoinSplitType.NONE_LITERAL, taskD.getJoin());
+ assertEquals(JoinSplitType.NONE_LITERAL, taskE.getJoin());
+
+ assertEquals(JoinSplitType.XOR_LITERAL, route.getJoin());
+ assertEquals(JoinSplitType.XOR_LITERAL, route.getSplit());
+
+ TransitionType transitionB2G = CarnotModelQuery.findTransition(process, TEST_ID_SEQUENCE_B2GATE);
+ TransitionType transitionC2G = CarnotModelQuery.findTransition(process, TEST_ID_SEQUENCE_C2GATE);
+ TransitionType transitionG2D = CarnotModelQuery.findTransition(process, TEST_ID_SEQUENCE_GATE2D);
+ TransitionType transitionG2E = CarnotModelQuery.findTransition(process, TEST_ID_SEQUENCE_GATE2E);
+
+ assertNotNull(transitionB2G);
+ assertNotNull(transitionC2G);
+ assertNotNull(transitionG2D);
+ assertNotNull(transitionG2E);
+
+ assertEquals(taskB, transitionB2G.getFrom());
+ assertEquals(taskC, transitionC2G.getFrom());
+ assertEquals(route, transitionB2G.getTo());
+ assertEquals(route, transitionC2G.getTo());
+ assertEquals(route, transitionG2D.getFrom());
+ assertEquals(route, transitionG2E.getFrom());
+ assertEquals(taskD, transitionG2D.getTo());
+ assertEquals(taskE, transitionG2E.getTo());
+
+ assertEquals(expr4D, transitionG2D.getExpression().getMixed().getValue(0));
+ assertEquals(expr4E, transitionG2E.getExpression().getMixed().getValue(0));
+
+ }
+
+ public void testSequentialWithMixedGateway() {
+ // Sequence of Gateways (two diverging and one mixed)
+ // expected in stardust:
+ // - first gate as split on task a
+ // - second gate as route with split
+ // - third gate as route with join and split
+
+ final String modelFile = BPMN_MODEL_DIR + "SequentialMixedGateway.bpmn";
+ final String fileOutput = getResourceFilePath(OUTPUT_DIR) + "testSequentialMixedGateway.xpdl";
+ // ids
+ final String TEST_ID_GATE_B = "TestModelGateB";
+ final String TEST_ID_SEQUENCE_GA2GB = "TestModelSequenceGA2GB";
+ final String TEST_ID_SEQUENCE_GA2MIXED = "TestModelSequenceGA2MixedGate";
+ final String TEST_ID_SEQUENCE_GB2B = "TestModelSequenceGB2B";
+ final String TEST_ID_SEQUENCE_GB2MIXED = "TestModelSequenceGB2MixedGate";
+ final String TEST_ID_SEQUENCE_MIXED2C = "TestModelSequenceMixedGate2C";
+ final String TEST_ID_SEQUENCE_MIXED2D = "TestModelSequenceMixedGate2D";
+
+ final String x1 = "test='X=1'";
+ final String x2 = "test='X=2'";
+ final String y1 = "test='Y=1'";
+ final String y2 = "test='Y=2'";
+ final String z1 = "test='Z=1'";
+ final String z2 = "test='Z=2'";
+
+ ModelType result = transformModel(loadBpmnModel(modelFile), fileOutput);
+ ProcessDefinitionType process = result.getProcessDefinition().get(0);
+
+ ActivityType taskA = CarnotModelQuery.findActivity(process, TEST_ID_TASK_A);
+ ActivityType taskB = CarnotModelQuery.findActivity(process, TEST_ID_TASK_B);
+ ActivityType taskC = CarnotModelQuery.findActivity(process, TEST_ID_TASK_C);
+ ActivityType taskD = CarnotModelQuery.findActivity(process, TEST_ID_TASK_D);
+
+ ActivityType routeA = CarnotModelQuery.findActivity(process, TEST_ID_GATE_B);
+ ActivityType routeB = CarnotModelQuery.findActivity(process, TEST_ID_XOR_MIXED_GATEWAY);
+
+ TransitionType transitionA2RouteA = CarnotModelQuery.findTransition(process, TEST_ID_SEQUENCE_GA2GB); //x1
+ TransitionType transitionA2RouteB = CarnotModelQuery.findTransition(process, TEST_ID_SEQUENCE_GA2MIXED); //x2
+ TransitionType transitionRouteA2B = CarnotModelQuery.findTransition(process, TEST_ID_SEQUENCE_GB2B); //y1
+ TransitionType transitionRouteA2RouteB = CarnotModelQuery.findTransition(process, TEST_ID_SEQUENCE_GB2MIXED); //y2
+ TransitionType transitionRouteB2C = CarnotModelQuery.findTransition(process, TEST_ID_SEQUENCE_MIXED2C); //z1
+ TransitionType transitionRouteB2D = CarnotModelQuery.findTransition(process, TEST_ID_SEQUENCE_MIXED2D); //z2
+
+ // Elements found?
+ assertNotNull(taskA);
+ assertNotNull(taskB);
+ assertNotNull(taskC);
+ assertNotNull(taskD);
+ assertNotNull(routeA);
+ assertNotNull(routeB);
+ assertNotNull(transitionA2RouteA);
+ assertNotNull(transitionA2RouteB);
+ assertNotNull(transitionRouteA2B);
+ assertNotNull(transitionRouteA2RouteB);
+ assertNotNull(transitionRouteB2C);
+ assertNotNull(transitionRouteB2D);
+
+ // Join- and Split config
+ assertEquals(JoinSplitType.XOR_LITERAL, taskA.getSplit());
+ assertEquals(JoinSplitType.NONE_LITERAL, taskA.getJoin());
+ assertEquals(JoinSplitType.XOR_LITERAL, routeA.getSplit());
+ assertEquals(JoinSplitType.NONE_LITERAL, routeA.getJoin());
+ assertEquals(JoinSplitType.XOR_LITERAL, routeB.getSplit());
+ assertEquals(JoinSplitType.XOR_LITERAL, routeB.getJoin());
+
+ // Transition source/target
+ assertEquals(taskA, transitionA2RouteA.getFrom());
+ assertEquals(taskA, transitionA2RouteB.getFrom());
+ assertEquals(routeA, transitionRouteA2B.getFrom());
+ assertEquals(routeA, transitionRouteA2RouteB.getFrom());
+ assertEquals(routeB, transitionRouteB2C.getFrom());
+ assertEquals(routeB, transitionRouteB2D.getFrom());
+
+ assertEquals(routeA, transitionA2RouteA.getTo());
+ assertEquals(routeB, transitionA2RouteB.getTo());
+ assertEquals(taskB, transitionRouteA2B.getTo());
+ assertEquals(routeB, transitionRouteA2RouteB.getTo());
+ assertEquals(taskC, transitionRouteB2C.getTo());
+ assertEquals(taskD, transitionRouteB2D.getTo());
+
+ // Transition conditions
+ assertEquals(x1, transitionA2RouteA.getExpression().getMixed().getValue(0));
+ assertEquals(x2, transitionA2RouteB.getExpression().getMixed().getValue(0));
+ assertEquals(y1, transitionRouteA2B.getExpression().getMixed().getValue(0));
+ assertEquals(y2, transitionRouteA2RouteB.getExpression().getMixed().getValue(0));
+ assertEquals(z1, transitionRouteB2C.getExpression().getMixed().getValue(0));
+ assertEquals(z2, transitionRouteB2D.getExpression().getMixed().getValue(0));
+
+ }
+
public void testCollapsedSubprocess() {
final String modelFile = BPMN_MODEL_DIR + "CollapsedSubprocess.bpmn";
final String fileOutput = getResourceFilePath(OUTPUT_DIR) + "testCollapsedSubprocess.xpdl";
ModelType result = transformModel(loadBpmnModel(modelFile), fileOutput);
- ProcessDefinitionType mainprocess = findProcessDefinition(result, TEST_ID_MAIN_PROCESS);
- ProcessDefinitionType subprocess = findProcessDefinition(result, TEST_ID_SUBPROCESS);
+ ProcessDefinitionType mainprocess = CarnotModelQuery.findProcessDefinition(result, TEST_ID_MAIN_PROCESS);
+ ProcessDefinitionType subprocess = CarnotModelQuery.findProcessDefinition(result, TEST_ID_SUBPROCESS);
- ActivityType taskA = findActivity(subprocess, TEST_ID_TASK_A);
- ActivityType subprocessActivity = findActivity(mainprocess, TEST_ID_SUBPROCESS);
+ ActivityType taskA = CarnotModelQuery.findActivity(subprocess, TEST_ID_TASK_A);
+ ActivityType subprocessActivity = CarnotModelQuery.findActivity(mainprocess, TEST_ID_SUBPROCESS);
assertNotNull(mainprocess);
assertNotNull(subprocessActivity);
@@ -240,7 +449,7 @@ public class Bpmn2CarnotXPDLTest extends TestCase {
}
private ModelType transformModel(Definitions definitions, String fileOutput) {
- TransformationControl transf = TransformationControl.getInstance(new DialectCarnotXPDL());
+ TransformationControl transf = TransformationControl.getInstance(new DialectStardustXPDL());
transf.transformToTarget(definitions, fileOutput);
return (ModelType)transf.getTargetModel();
}
@@ -271,50 +480,63 @@ public class Bpmn2CarnotXPDLTest extends TestCase {
File f = new File(path);
if (!f.exists()) f.mkdir();
}
-
- private static ProcessDefinitionType findProcessInModel(ModelType model, String processId) {
- for (ProcessDefinitionType processDef : model.getProcessDefinition()) {
- if (processDef.getId().equals(processId)) return processDef;
- }
- return null;
- }
-
- private ProcessDefinitionType findProcessDefinition(ModelType model, String id) {
- for (ProcessDefinitionType processDef : model.getProcessDefinition()) {
- if (processDef.getId().equals(id)) return processDef;
- }
- return null;
- }
-
- private ActivityType findActivity(ProcessDefinitionType processDef, String id) {
- for (ActivityType activity : processDef.getActivity()) {
- if (activity.getId().equals(id)) return activity;
- }
- return null;
- }
-
- private TransitionType findTransition(ProcessDefinitionType processDef, String id) {
- for (TransitionType transition : processDef.getTransition()) {
- if (transition.getId().equals(id)) return transition;
- }
- return null;
- }
-
- private TriggerType findTrigger(ProcessDefinitionType processDef, String id) {
- for (TriggerType trigger : processDef.getTrigger()) {
- if (trigger.getId().equals(id)) return trigger;
- }
- return null;
- }
-
- private IModelParticipant findParticipant(ModelType model, String id) {
- for (RoleType role : model.getRole()) {
- if (role.getId().equals(id)) return role;
- }
- for (OrganizationType org : model.getOrganization()) {
- if (org.getId().equals(id)) return org;
- }
- return null;
- }
+// public void testMixedGateway() {
+// // Gateway with two incoming and two outgoing sequence-flows
+// // Version without additional Route (=>multiplied conditions, difficult to read)
+//
+// final String modelFile = BPMN_MODEL_DIR + "MixedGateway.bpmn";
+// final String fileOutput = getResourceFilePath(OUTPUT_DIR) + "testMixedGateway.xpdl";
+//
+// final String exprBD = "expr4D";
+// final String exprBE = "expr4E";
+// final String exprCD = "expr4D";
+// final String exprCE = "expr4E";
+//
+// ModelType result = transformModel(loadBpmnModel(modelFile), fileOutput);
+// ProcessDefinitionType process = result.getProcessDefinition().get(0);
+//
+// ActivityType taskA = findActivity(process, TEST_ID_TASK_A);
+// ActivityType taskB = findActivity(process, TEST_ID_TASK_B);
+// ActivityType taskC = findActivity(process, TEST_ID_TASK_C);
+// ActivityType taskD = findActivity(process, TEST_ID_TASK_D);
+// ActivityType taskE = findActivity(process, TEST_ID_TASK_E);
+//
+// assertNotNull(taskA);
+// assertNotNull(taskB);
+// assertNotNull(taskC);
+// assertNotNull(taskD);
+// assertNotNull(taskE);
+//
+// assertEquals(JoinSplitType.XOR, taskB.getSplit());
+// assertEquals(JoinSplitType.XOR, taskC.getSplit());
+//
+// assertEquals(JoinSplitType.XOR, taskD.getJoin());
+// assertEquals(JoinSplitType.XOR, taskE.getJoin());
+//
+// EList<TransitionType> bOut = taskB.getOutTransitions();
+// EList<TransitionType> cOut = taskC.getOutTransitions();
+//
+// for (TransitionType trans : bOut) {
+// ActivityType target = trans.getTo();
+// if (target.equals(taskD)) {
+// assertEquals(exprBD, trans.getExpression().getMixed().getValue(0));
+// } else if (target.equals(taskE)) {
+// assertEquals(exprBE, trans.getExpression().getMixed().getValue(0));
+// } else {
+// fail("Invalid or unexpected Transition Target " + target);
+// }
+// }
+//
+// for (TransitionType trans : cOut) {
+// ActivityType target = trans.getTo();
+// if (target.equals(taskD)) {
+// assertEquals(exprCD, trans.getExpression().getMixed().getValue(0));
+// } else if (target.equals(taskE)) {
+// assertEquals(exprCE, trans.getExpression().getMixed().getValue(0));
+// } else {
+// fail("Invalid or unexpected Transition Target " + target);
+// }
+// }
+// }
}
diff --git a/model/org.eclipse.stardust.model.bpmn2.transform/src/test/resources/models/bpmn/MixedGateway.bpmn b/model/org.eclipse.stardust.model.bpmn2.transform/src/test/resources/models/bpmn/MixedGateway.bpmn
new file mode 100644
index 0000000..e92dcd5
--- /dev/null
+++ b/model/org.eclipse.stardust.model.bpmn2.transform/src/test/resources/models/bpmn/MixedGateway.bpmn
@@ -0,0 +1,312 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--Created by Process Manager 6 for Microsoft Visio (http://www.itp-commerce.com)-->
+<definitions targetNamespace="http://www.itp-commerce.com" xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:itp="http://www.itp-commerce.com/BPMN2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL schemas/BPMN20.xsd" exporter="Process Manager 6 for Microsoft Visio" exporterVersion="5.2769.13758 " itp:name="Mein Diagramm" itp:version="1.0" itp:author="simon nikles" itp:creationDate="04.09.2012 14:52:08" itp:modificationDate="04.09.2012 17:52:28" itp:createdWithVersion="5.2769.13758 " itp:conformanceSubClass="Full" id="_807ecb64-bfeb-4bef-aa57-10a0ee8d179c" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC">
+ <process id="_8ff41dc1-1858-47a4-b44c-9ee9afffe7f6" name="Hauptprozess" processType="None">
+ <extensionElements>
+ <itp:systemDefinedAttributes>
+ <attribute name="Hyperlinks" type="String" value="0 Hyperlinks" />
+ <attribute name="ExternalId" type="String" />
+ <attribute name="KPICost" type="Float" value="1" format="Currency;Fr.;;KPI;2" />
+ <attribute name="KPIDuration" type="Float" value="1" format="Duration;;;KPI;3">
+ <attribute name="KPIActiveTime" type="Float" value="1" format="Duration;;;KPI;3" />
+ <attribute name="KPIWaitTime" type="Float" value="0" format="Duration;;;KPI;3" />
+ </attribute>
+ </itp:systemDefinedAttributes>
+ <itp:localization>
+ <itp:label lang="unspecified" text="Hauptprozess" default="True" />
+ </itp:localization>
+ </extensionElements>
+ <task id="TestModelTaskA" name="a">
+ <extensionElements>
+ <itp:systemDefinedAttributes>
+ <attribute name="Hyperlinks" type="String" value="0 Hyperlinks" />
+ <attribute name="ExternalId" type="String" />
+ <attribute name="KPICost" type="Float" value="1" format="Currency;Fr.;;KPI;2" />
+ <attribute name="KPIDuration" type="Float" value="1" format="Duration;;;KPI;3">
+ <attribute name="KPIActiveTime" type="Float" value="1" format="Duration;;;KPI;3" />
+ <attribute name="KPIWaitTime" type="Float" value="0" format="Duration;;;KPI;3" />
+ </attribute>
+ </itp:systemDefinedAttributes>
+ <itp:localization>
+ <itp:label lang="unspecified" text="a" default="True" />
+ </itp:localization>
+ </extensionElements>
+ </task>
+ <task id="TestModelTaskD" name="d">
+ <extensionElements>
+ <itp:systemDefinedAttributes>
+ <attribute name="Hyperlinks" type="String" value="0 Hyperlinks" />
+ <attribute name="ExternalId" type="String" />
+ <attribute name="KPICost" type="Float" value="1" format="Currency;Fr.;;KPI;2" />
+ <attribute name="KPIDuration" type="Float" value="1" format="Duration;;;KPI;3">
+ <attribute name="KPIActiveTime" type="Float" value="1" format="Duration;;;KPI;3" />
+ <attribute name="KPIWaitTime" type="Float" value="0" format="Duration;;;KPI;3" />
+ </attribute>
+ </itp:systemDefinedAttributes>
+ <itp:localization>
+ <itp:label lang="unspecified" text="d" default="True" />
+ </itp:localization>
+ </extensionElements>
+ </task>
+ <task id="TestModelTaskE" name="e">
+ <extensionElements>
+ <itp:systemDefinedAttributes>
+ <attribute name="Hyperlinks" type="String" value="0 Hyperlinks" />
+ <attribute name="ExternalId" type="String" />
+ <attribute name="KPICost" type="Float" value="1" format="Currency;Fr.;;KPI;2" />
+ <attribute name="KPIDuration" type="Float" value="1" format="Duration;;;KPI;3">
+ <attribute name="KPIActiveTime" type="Float" value="1" format="Duration;;;KPI;3" />
+ <attribute name="KPIWaitTime" type="Float" value="0" format="Duration;;;KPI;3" />
+ </attribute>
+ </itp:systemDefinedAttributes>
+ <itp:localization>
+ <itp:label lang="unspecified" text="e" default="True" />
+ </itp:localization>
+ </extensionElements>
+ </task>
+ <task id="TestModelTaskB" name="b">
+ <extensionElements>
+ <itp:systemDefinedAttributes>
+ <attribute name="Hyperlinks" type="String" value="0 Hyperlinks" />
+ <attribute name="ExternalId" type="String" />
+ <attribute name="KPICost" type="Float" value="1" format="Currency;Fr.;;KPI;2" />
+ <attribute name="KPIDuration" type="Float" value="1" format="Duration;;;KPI;3">
+ <attribute name="KPIActiveTime" type="Float" value="1" format="Duration;;;KPI;3" />
+ <attribute name="KPIWaitTime" type="Float" value="0" format="Duration;;;KPI;3" />
+ </attribute>
+ </itp:systemDefinedAttributes>
+ <itp:localization>
+ <itp:label lang="unspecified" text="b" default="True" />
+ </itp:localization>
+ </extensionElements>
+ </task>
+ <task id="TestModelTaskC" name="c">
+ <extensionElements>
+ <itp:systemDefinedAttributes>
+ <attribute name="Hyperlinks" type="String" value="0 Hyperlinks" />
+ <attribute name="ExternalId" type="String" />
+ <attribute name="KPICost" type="Float" value="1" format="Currency;Fr.;;KPI;2" />
+ <attribute name="KPIDuration" type="Float" value="1" format="Duration;;;KPI;3">
+ <attribute name="KPIActiveTime" type="Float" value="1" format="Duration;;;KPI;3" />
+ <attribute name="KPIWaitTime" type="Float" value="0" format="Duration;;;KPI;3" />
+ </attribute>
+ </itp:systemDefinedAttributes>
+ <itp:localization>
+ <itp:label lang="unspecified" text="c" default="True" />
+ </itp:localization>
+ </extensionElements>
+ </task>
+ <exclusiveGateway id="_ccf81644-4bc3-4ff4-82d6-b0504fe743c7" gatewayDirection="Diverging">
+ <extensionElements>
+ <itp:systemDefinedAttributes>
+ <attribute name="Hyperlinks" type="String" value="0 Hyperlinks" />
+ <attribute name="ExternalId" type="String" />
+ </itp:systemDefinedAttributes>
+ <itp:localization>
+ <itp:label lang="unspecified" text="" default="True" />
+ </itp:localization>
+ </extensionElements>
+ </exclusiveGateway>
+ <exclusiveGateway id="TestModelXORMixedGateway" name="MixedXOrGate" gatewayDirection="Mixed">
+ <extensionElements>
+ <itp:systemDefinedAttributes>
+ <attribute name="Hyperlinks" type="String" value="0 Hyperlinks" />
+ <attribute name="ExternalId" type="String" />
+ </itp:systemDefinedAttributes>
+ <itp:localization>
+ <itp:label lang="unspecified" text="MixedXOrGate" default="True" />
+ </itp:localization>
+ </extensionElements>
+ </exclusiveGateway>
+ <sequenceFlow id="_c38e96e2-cb27-4929-8eec-d402f22b4247" sourceRef="TestModelTaskA" targetRef="_ccf81644-4bc3-4ff4-82d6-b0504fe743c7">
+ <extensionElements>
+ <itp:systemDefinedAttributes>
+ <attribute name="Hyperlinks" type="String" value="0 Hyperlinks" />
+ <attribute name="ExternalId" type="String" />
+ </itp:systemDefinedAttributes>
+ <itp:localization>
+ <itp:label lang="unspecified" text="" default="True" />
+ </itp:localization>
+ </extensionElements>
+ </sequenceFlow>
+ <sequenceFlow id="_632d38c5-eb94-49ad-9072-06fedb2d1d95" sourceRef="_ccf81644-4bc3-4ff4-82d6-b0504fe743c7" targetRef="TestModelTaskB">
+ <extensionElements>
+ <itp:systemDefinedAttributes>
+ <attribute name="Hyperlinks" type="String" value="0 Hyperlinks" />
+ <attribute name="ExternalId" type="String" />
+ </itp:systemDefinedAttributes>
+ <itp:localization>
+ <itp:label lang="unspecified" text="" default="True" />
+ </itp:localization>
+ </extensionElements>
+ <conditionExpression>_undefined</conditionExpression>
+ </sequenceFlow>
+ <sequenceFlow id="_96702002-b73c-4539-b5d7-86953d4fd5e6" sourceRef="_ccf81644-4bc3-4ff4-82d6-b0504fe743c7" targetRef="TestModelTaskC">
+ <extensionElements>
+ <itp:systemDefinedAttributes>
+ <attribute name="Hyperlinks" type="String" value="0 Hyperlinks" />
+ <attribute name="ExternalId" type="String" />
+ </itp:systemDefinedAttributes>
+ <itp:localization>
+ <itp:label lang="unspecified" text="" default="True" />
+ </itp:localization>
+ </extensionElements>
+ <conditionExpression>_undefined</conditionExpression>
+ </sequenceFlow>
+ <sequenceFlow id="SeqB2Gate" sourceRef="TestModelTaskB" targetRef="TestModelXORMixedGateway">
+ <extensionElements>
+ <itp:systemDefinedAttributes>
+ <attribute name="Hyperlinks" type="String" value="0 Hyperlinks" />
+ <attribute name="ExternalId" type="String" />
+ </itp:systemDefinedAttributes>
+ <itp:localization>
+ <itp:label lang="unspecified" text="" default="True" />
+ </itp:localization>
+ </extensionElements>
+ </sequenceFlow>
+ <sequenceFlow id="SeqC2Gate" sourceRef="TestModelTaskC" targetRef="TestModelXORMixedGateway">
+ <extensionElements>
+ <itp:systemDefinedAttributes>
+ <attribute name="Hyperlinks" type="String" value="0 Hyperlinks" />
+ <attribute name="ExternalId" type="String" />
+ </itp:systemDefinedAttributes>
+ <itp:localization>
+ <itp:label lang="unspecified" text="" default="True" />
+ </itp:localization>
+ </extensionElements>
+ </sequenceFlow>
+ <sequenceFlow id="SeqGate2D" sourceRef="TestModelXORMixedGateway" targetRef="TestModelTaskD">
+ <extensionElements>
+ <itp:systemDefinedAttributes>
+ <attribute name="Hyperlinks" type="String" value="0 Hyperlinks" />
+ <attribute name="ExternalId" type="String" />
+ </itp:systemDefinedAttributes>
+ <itp:localization>
+ <itp:label lang="unspecified" text="" default="True" />
+ </itp:localization>
+ </extensionElements>
+ <conditionExpression><documentation>expr4D</documentation></conditionExpression>
+ </sequenceFlow>
+ <sequenceFlow id="SeqGate2E" sourceRef="TestModelXORMixedGateway" targetRef="TestModelTaskE">
+ <extensionElements>
+ <itp:systemDefinedAttributes>
+ <attribute name="Hyperlinks" type="String" value="0 Hyperlinks" />
+ <attribute name="ExternalId" type="String" />
+ </itp:systemDefinedAttributes>
+ <itp:localization>
+ <itp:label lang="unspecified" text="" default="True" />
+ </itp:localization>
+ </extensionElements>
+ <conditionExpression><documentation>expr4E</documentation></conditionExpression>
+ </sequenceFlow>
+ </process>
+ <bpmndi:BPMNDiagram name="Mein Diagramm (1)" resolution="72">
+ <bpmndi:BPMNPlane id="_1" bpmnElement="_8ff41dc1-1858-47a4-b44c-9ee9afffe7f6">
+ <bpmndi:BPMNShape id="_F1FAD697-F6F4-4B1E-9B90-E19BFEF80C5F" bpmnElement="TestModelTaskA" itp:label="a" itp:elementType="task">
+ <dc:Bounds x="56.6929133858268" y="128.976377952756" width="85.0393700787402" height="42.5196850393701" />
+ <bpmndi:BPMNLabel labelStyle="_7fb93dbe-fc2e-45b9-8f50-cfca58f27242">
+ <dc:Bounds x="93.24" y="143.475590551181" width="12.24" height="13.68" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_A745151C-6C52-40E1-95DA-0F07DC3AB248" bpmnElement="TestModelTaskD" itp:label="d" itp:elementType="task">
+ <dc:Bounds x="487.55905511811" y="91.7716535433071" width="85.0393700787402" height="42.5196850393701" />
+ <bpmndi:BPMNLabel labelStyle="_7fb93dbe-fc2e-45b9-8f50-cfca58f27242">
+ <dc:Bounds x="523.8" y="106.035590551181" width="12.24" height="13.68" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_AD73B9DF-B4A7-489F-8FBE-A28CFCC3D34B" bpmnElement="TestModelTaskE" itp:label="e" itp:elementType="task">
+ <dc:Bounds x="490.393700787402" y="177.165354330709" width="85.0393700787402" height="42.5196850393701" />
+ <bpmndi:BPMNLabel labelStyle="_7fb93dbe-fc2e-45b9-8f50-cfca58f27242">
+ <dc:Bounds x="526.68" y="191.715590551181" width="12.24" height="13.68" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_0C765416-D33A-4888-9370-DD6CDAA62567" bpmnElement="TestModelTaskB" itp:label="b" itp:elementType="task">
+ <dc:Bounds x="257.952755905512" y="85.0393700787402" width="85.0393700787402" height="42.5196850393701" />
+ <bpmndi:BPMNLabel labelStyle="_7fb93dbe-fc2e-45b9-8f50-cfca58f27242">
+ <dc:Bounds x="294.12" y="99.5555905511812" width="12.24" height="13.68" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_CCE827E0-1117-45C8-8CDE-64967B1E4E24" bpmnElement="TestModelTaskC" itp:label="c" itp:elementType="task">
+ <dc:Bounds x="257.952755905512" y="184.251968503937" width="85.0393700787402" height="42.5196850393701" />
+ <bpmndi:BPMNLabel labelStyle="_7fb93dbe-fc2e-45b9-8f50-cfca58f27242">
+ <dc:Bounds x="294.48" y="198.915590551181" width="11.52" height="13.68" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_5C351D48-E174-4837-B5C2-111914337267" bpmnElement="_ccf81644-4bc3-4ff4-82d6-b0504fe743c7" isMarkerVisible="false" itp:label="(unbenannt)" itp:elementType="exclusiveGateway">
+ <dc:Bounds x="177.165354330709" y="134.291338582677" width="42.5196850393701" height="31.8897637795276" />
+ <bpmndi:BPMNLabel labelStyle="_d82b818e-1f45-42b5-be05-8a472e8e0475">
+ <dc:Bounds x="198.72" y="168.675590551181" width="0" height="9.36" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_2F92C855-4E6E-420F-B821-13A14BEB6013" bpmnElement="TestModelXORMixedGateway" isMarkerVisible="false" itp:label="MixedXOrGate" itp:elementType="exclusiveGateway">
+ <dc:Bounds x="403.937007874016" y="134.291338582677" width="42.5196850393701" height="31.8897637795276" />
+ <bpmndi:BPMNLabel labelStyle="_d82b818e-1f45-42b5-be05-8a472e8e0475">
+ <dc:Bounds x="397.8" y="168.675590551181" width="55.44" height="9.36" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="_B9F0BBD8-FAF8-4BD3-9311-1BA0EB3C5EB6" bpmnElement="_c38e96e2-cb27-4929-8eec-d402f22b4247" itp:label="(unbenannt)" itp:elementType="sequenceFlow">
+ <di:waypoint x="141.732283464567" y="150.236220472441" />
+ <di:waypoint x="177.165354330709" y="150.236220472441" />
+ <bpmndi:BPMNLabel labelStyle="_d82b818e-1f45-42b5-be05-8a472e8e0475">
+ <dc:Bounds x="155.88" y="134.475590551181" width="7.92" height="17.28" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="_B2104DA8-3715-4C02-9B9E-DCC6D482E9C9" bpmnElement="_632d38c5-eb94-49ad-9072-06fedb2d1d95" itp:label="(unbenannt)" itp:elementType="sequenceFlow">
+ <di:waypoint x="198.425196850394" y="134.291338582677" />
+ <di:waypoint x="198.425196850394" y="106.299212598425" />
+ <di:waypoint x="257.952755905512" y="106.299212598425" />
+ <bpmndi:BPMNLabel labelStyle="_d82b818e-1f45-42b5-be05-8a472e8e0475">
+ <dc:Bounds x="213.48" y="97.7555905511812" width="7.92" height="17.28" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="_4A5E9927-12E7-4870-B364-9B5D96918D5A" bpmnElement="_96702002-b73c-4539-b5d7-86953d4fd5e6" itp:label="(unbenannt)" itp:elementType="sequenceFlow">
+ <di:waypoint x="198.425196850394" y="166.181102362205" />
+ <di:waypoint x="198.425196850394" y="205.511811023622" />
+ <di:waypoint x="257.952755905512" y="205.511811023622" />
+ <bpmndi:BPMNLabel labelStyle="_d82b818e-1f45-42b5-be05-8a472e8e0475">
+ <dc:Bounds x="207.72" y="197.115590551181" width="7.92" height="17.28" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="_149EF615-2780-4B4D-AD5B-FE88AFD449ED" bpmnElement="SeqB2Gate" itp:label="(unbenannt)" itp:elementType="sequenceFlow">
+ <di:waypoint x="342.992125984252" y="106.299212598425" />
+ <di:waypoint x="353.622047244095" y="106.299212598425" />
+ <di:waypoint x="353.622047244095" y="150.236220472441" />
+ <di:waypoint x="403.937007874016" y="150.236220472441" />
+ <bpmndi:BPMNLabel labelStyle="_d82b818e-1f45-42b5-be05-8a472e8e0475">
+ <dc:Bounds x="353.16" y="139.515590551181" width="7.92" height="17.28" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="_D26B9676-AEA9-4DAE-B5B0-2E9DF60058D6" bpmnElement="SeqC2Gate" itp:label="(unbenannt)" itp:elementType="sequenceFlow">
+ <di:waypoint x="342.992125984252" y="205.511811023622" />
+ <di:waypoint x="353.622047244095" y="205.511811023622" />
+ <di:waypoint x="353.622047244095" y="150.236220472441" />
+ <di:waypoint x="403.937007874016" y="150.236220472441" />
+ <bpmndi:BPMNLabel labelStyle="_d82b818e-1f45-42b5-be05-8a472e8e0475">
+ <dc:Bounds x="349.56" y="147.435590551181" width="7.92" height="17.28" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="_C333C22D-53A5-4D41-BA27-E25823C19C2A" bpmnElement="SeqGate2D" itp:label="(unbenannt)" itp:elementType="sequenceFlow">
+ <di:waypoint x="425.196850393701" y="134.291338582677" />
+ <di:waypoint x="425.196850393701" y="113.031496062992" />
+ <di:waypoint x="487.55905511811" y="113.031496062992" />
+ <bpmndi:BPMNLabel labelStyle="_d82b818e-1f45-42b5-be05-8a472e8e0475">
+ <dc:Bounds x="444.6" y="104.235590551181" width="7.92" height="17.28" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="_D2748E32-A4D2-4CD3-A82A-26DBC16ABCD2" bpmnElement="SeqGate2E" itp:label="(unbenannt)" itp:elementType="sequenceFlow">
+ <di:waypoint x="425.196850393701" y="166.181102362205" />
+ <di:waypoint x="425.196850393701" y="198.425196850394" />
+ <di:waypoint x="490.393700787402" y="198.425196850394" />
+ <bpmndi:BPMNLabel labelStyle="_d82b818e-1f45-42b5-be05-8a472e8e0475">
+ <dc:Bounds x="441" y="189.915590551181" width="7.92" height="17.28" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ <bpmndi:BPMNLabelStyle id="_7fb93dbe-fc2e-45b9-8f50-cfca58f27242">
+ <dc:Font name="Arial" size="10" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" />
+ </bpmndi:BPMNLabelStyle>
+ <bpmndi:BPMNLabelStyle id="_d82b818e-1f45-42b5-be05-8a472e8e0475">
+ <dc:Font name="Arial" size="8" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" />
+ </bpmndi:BPMNLabelStyle>
+ </bpmndi:BPMNDiagram>
+</definitions> \ No newline at end of file
diff --git a/model/org.eclipse.stardust.model.bpmn2.transform/src/test/resources/models/bpmn/ParallelGatewaysSingle.bpmn b/model/org.eclipse.stardust.model.bpmn2.transform/src/test/resources/models/bpmn/ParallelGatewaysSingle.bpmn
new file mode 100644
index 0000000..0f5b893
--- /dev/null
+++ b/model/org.eclipse.stardust.model.bpmn2.transform/src/test/resources/models/bpmn/ParallelGatewaysSingle.bpmn
@@ -0,0 +1,322 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--Created by Process Manager 6 for Microsoft Visio (http://www.itp-commerce.com)-->
+<definitions targetNamespace="http://www.itp-commerce.com" xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:itp="http://www.itp-commerce.com/BPMN2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL schemas/BPMN20.xsd" exporter="Process Manager 6 for Microsoft Visio" exporterVersion="5.2769.13758 " itp:name="Mein Diagramm" itp:version="1.0" itp:author="simon nikles" itp:creationDate="27.06.2012 18:05:19" itp:modificationDate="03.09.2012 14:17:36" itp:createdWithVersion="5.2769.13758 SR7" itp:conformanceSubClass="Full" id="_3e3f9919-88b7-4628-ab18-e5ca675dbc64" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC">
+ <process id="_902e51a3-1856-4744-9bbd-3c71a36329af" name="Hauptprozess" processType="None">
+ <extensionElements>
+ <itp:systemDefinedAttributes>
+ <attribute name="Hyperlinks" type="String" value="0 Hyperlinks" />
+ <attribute name="ExternalId" type="String" />
+ <attribute name="NamespaceDeclarations" type="String" value="xmlns:itp=http://www.itp-commerce.com/BPMN2.0|;|xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance|;|xmlns:bpmndi=http://www.omg.org/spec/BPMN/20100524/DI|;|xmlns:di=http://www.omg.org/spec/DD/20100524/DI|;|xmlns:dc=http://www.omg.org/spec/DD/20100524/DC|;|" />
+ </itp:systemDefinedAttributes>
+ <itp:localization>
+ <itp:label lang="unspecified" text="Hauptprozess" default="True" />
+ </itp:localization>
+ </extensionElements>
+ <userTask id="TestModelTaskA" name="a" implementation="unspecified">
+ <extensionElements>
+ <itp:systemDefinedAttributes>
+ <attribute name="Hyperlinks" type="String" value="0 Hyperlinks" />
+ <attribute name="ExternalId" type="String" />
+ <attribute name="KPICost" type="Float" value="1" format="Currency;Fr.;;KPI;2" />
+ <attribute name="KPIDuration" type="Float" value="1" format="Duration;;;KPI;3">
+ <attribute name="KPIActiveTime" type="Float" value="1" format="Duration;;;KPI;3" />
+ <attribute name="KPIWaitTime" type="Float" value="0" format="Duration;;;KPI;3" />
+ </attribute>
+ </itp:systemDefinedAttributes>
+ <itp:localization>
+ <itp:label lang="unspecified" text="a" default="True" />
+ </itp:localization>
+ </extensionElements>
+ </userTask>
+ <userTask id="TestModelTaskB" name="b" implementation="unspecified">
+ <extensionElements>
+ <itp:systemDefinedAttributes>
+ <attribute name="Hyperlinks" type="String" value="0 Hyperlinks" />
+ <attribute name="ExternalId" type="String" />
+ <attribute name="KPICost" type="Float" value="1" format="Currency;Fr.;;KPI;2" />
+ <attribute name="KPIDuration" type="Float" value="1" format="Duration;;;KPI;3">
+ <attribute name="KPIActiveTime" type="Float" value="1" format="Duration;;;KPI;3" />
+ <attribute name="KPIWaitTime" type="Float" value="0" format="Duration;;;KPI;3" />
+ </attribute>
+ </itp:systemDefinedAttributes>
+ <itp:localization>
+ <itp:label lang="unspecified" text="b" default="True" />
+ </itp:localization>
+ </extensionElements>
+ </userTask>
+ <userTask id="TestModelTaskC" name="c" implementation="unspecified">
+ <extensionElements>
+ <itp:systemDefinedAttributes>
+ <attribute name="Hyperlinks" type="String" value="0 Hyperlinks" />
+ <attribute name="ExternalId" type="String" />
+ <attribute name="KPICost" type="Float" value="1" format="Currency;Fr.;;KPI;2" />
+ <attribute name="KPIDuration" type="Float" value="1" format="Duration;;;KPI;3">
+ <attribute name="KPIActiveTime" type="Float" value="1" format="Duration;;;KPI;3" />
+ <attribute name="KPIWaitTime" type="Float" value="0" format="Duration;;;KPI;3" />
+ </attribute>
+ </itp:systemDefinedAttributes>
+ <itp:localization>
+ <itp:label lang="unspecified" text="c" default="True" />
+ </itp:localization>
+ </extensionElements>
+ </userTask>
+ <userTask id="TestModelTaskD" name="d" implementation="unspecified">
+ <extensionElements>
+ <itp:systemDefinedAttributes>
+ <attribute name="Hyperlinks" type="String" value="0 Hyperlinks" />
+ <attribute name="ExternalId" type="String" />
+ <attribute name="KPICost" type="Float" value="1" format="Currency;Fr.;;KPI;2" />
+ <attribute name="KPIDuration" type="Float" value="1" format="Duration;;;KPI;3">
+ <attribute name="KPIActiveTime" type="Float" value="1" format="Duration;;;KPI;3" />
+ <attribute name="KPIWaitTime" type="Float" value="0" format="Duration;;;KPI;3" />
+ </attribute>
+ </itp:systemDefinedAttributes>
+ <itp:localization>
+ <itp:label lang="unspecified" text="d" default="True" />
+ </itp:localization>
+ </extensionElements>
+ </userTask>
+ <userTask id="TestModelTaskE" name="e" implementation="unspecified">
+ <extensionElements>
+ <itp:systemDefinedAttributes>
+ <attribute name="Hyperlinks" type="String" value="0 Hyperlinks" />
+ <attribute name="ExternalId" type="String" />
+ <attribute name="KPICost" type="Float" value="1" format="Currency;Fr.;;KPI;2" />
+ <attribute name="KPIDuration" type="Float" value="1" format="Duration;;;KPI;3">
+ <attribute name="KPIActiveTime" type="Float" value="1" format="Duration;;;KPI;3" />
+ <attribute name="KPIWaitTime" type="Float" value="0" format="Duration;;;KPI;3" />
+ </attribute>
+ </itp:systemDefinedAttributes>
+ <itp:localization>
+ <itp:label lang="unspecified" text="e" default="True" />
+ </itp:localization>
+ </extensionElements>
+ </userTask>
+ <sequenceFlow id="_cb8558bb-fc7f-48d9-89fe-d2df6e37bbd2" sourceRef="TestModelTaskA" targetRef="_4ace9b8b-afd3-428c-9926-2a0318285663">
+ <extensionElements>
+ <itp:systemDefinedAttributes>
+ <attribute name="Hyperlinks" type="String" value="0 Hyperlinks" />
+ <attribute name="ExternalId" type="String" />
+ </itp:systemDefinedAttributes>
+ <itp:localization>
+ <itp:label lang="unspecified" text="" default="True" />
+ </itp:localization>
+ </extensionElements>
+ </sequenceFlow>
+ <sequenceFlow id="TestModelConditionalSequenceFlow1" sourceRef="_4ace9b8b-afd3-428c-9926-2a0318285663" targetRef="TestModelTaskB">
+ <extensionElements>
+ <itp:systemDefinedAttributes>
+ <attribute name="Hyperlinks" type="String" value="0 Hyperlinks" />
+ <attribute name="ExternalId" type="String" />
+ </itp:systemDefinedAttributes>
+ <itp:localization>
+ <itp:label lang="unspecified" text="" default="True" />
+ </itp:localization>
+ </extensionElements>
+ </sequenceFlow>
+ <sequenceFlow id="_b6a578ba-d556-4867-ab1d-31d05a33a35e" sourceRef="_4ace9b8b-afd3-428c-9926-2a0318285663" targetRef="TestModelTaskC">
+ <extensionElements>
+ <itp:systemDefinedAttributes>
+ <attribute name="Hyperlinks" type="String" value="0 Hyperlinks" />
+ <attribute name="ExternalId" type="String" />
+ </itp:systemDefinedAttributes>
+ <itp:localization>
+ <itp:label lang="unspecified" text="" default="True" />
+ </itp:localization>
+ </extensionElements>
+ </sequenceFlow>
+ <sequenceFlow id="_1d76ccef-d45f-4802-98d3-0aa0e978c554" sourceRef="_4ace9b8b-afd3-428c-9926-2a0318285663" targetRef="TestModelTaskD">
+ <extensionElements>
+ <itp:systemDefinedAttributes>
+ <attribute name="Hyperlinks" type="String" value="0 Hyperlinks" />
+ <attribute name="ExternalId" type="String" />
+ </itp:systemDefinedAttributes>
+ <itp:localization>
+ <itp:label lang="unspecified" text="" default="True" />
+ </itp:localization>
+ </extensionElements>
+ <conditionExpression>_undefined</conditionExpression>
+ </sequenceFlow>
+ <sequenceFlow id="_fb92c3da-c942-4350-bc9f-1b87e5f70023" sourceRef="TestModelTaskB" targetRef="_19969e5c-c41c-49de-af79-529e94cb4446">
+ <extensionElements>
+ <itp:systemDefinedAttributes>
+ <attribute name="Hyperlinks" type="String" value="0 Hyperlinks" />
+ <attribute name="ExternalId" type="String" />
+ </itp:systemDefinedAttributes>
+ <itp:localization>
+ <itp:label lang="unspecified" text="" default="True" />
+ </itp:localization>
+ </extensionElements>
+ </sequenceFlow>
+ <sequenceFlow id="_64cf5e6a-18c6-4689-ba93-2865f67c16d6" sourceRef="TestModelTaskC" targetRef="_19969e5c-c41c-49de-af79-529e94cb4446">
+ <extensionElements>
+ <itp:systemDefinedAttributes>
+ <attribute name="Hyperlinks" type="String" value="0 Hyperlinks" />
+ <attribute name="ExternalId" type="String" />
+ </itp:systemDefinedAttributes>
+ <itp:localization>
+ <itp:label lang="unspecified" text="" default="True" />
+ </itp:localization>
+ </extensionElements>
+ </sequenceFlow>
+ <sequenceFlow id="_5af8c969-22a2-485a-8356-8af176a7b3d2" sourceRef="TestModelTaskD" targetRef="_19969e5c-c41c-49de-af79-529e94cb4446">
+ <extensionElements>
+ <itp:systemDefinedAttributes>
+ <attribute name="Hyperlinks" type="String" value="0 Hyperlinks" />
+ <attribute name="ExternalId" type="String" />
+ </itp:systemDefinedAttributes>
+ <itp:localization>
+ <itp:label lang="unspecified" text="" default="True" />
+ </itp:localization>
+ </extensionElements>
+ </sequenceFlow>
+ <sequenceFlow id="_53472ed0-6bda-4cc3-8119-feb7e93b0ddb" sourceRef="_19969e5c-c41c-49de-af79-529e94cb4446" targetRef="TestModelTaskE">
+ <extensionElements>
+ <itp:systemDefinedAttributes>
+ <attribute name="Hyperlinks" type="String" value="0 Hyperlinks" />
+ <attribute name="ExternalId" type="String" />
+ </itp:systemDefinedAttributes>
+ <itp:localization>
+ <itp:label lang="unspecified" text="" default="True" />
+ </itp:localization>
+ </extensionElements>
+ </sequenceFlow>
+ <parallelGateway id="_4ace9b8b-afd3-428c-9926-2a0318285663" name="SplitAndGate" gatewayDirection="Diverging">
+ <extensionElements>
+ <itp:systemDefinedAttributes>
+ <attribute name="Hyperlinks" type="String" value="0 Hyperlinks" />
+ <attribute name="ExternalId" type="String" />
+ <attribute name="ImportedElementId" type="String" value="TestModelXORSplitGateway" />
+ </itp:systemDefinedAttributes>
+ <itp:localization>
+ <itp:label lang="unspecified" text="SplitAndGate" default="True" />
+ </itp:localization>
+ </extensionElements>
+ </parallelGateway>
+ <parallelGateway id="_19969e5c-c41c-49de-af79-529e94cb4446" name="JoinAndGate" gatewayDirection="Converging">
+ <extensionElements>
+ <itp:systemDefinedAttributes>
+ <attribute name="Hyperlinks" type="String" value="0 Hyperlinks" />
+ <attribute name="ExternalId" type="String" />
+ <attribute name="ImportedElementId" type="String" value="TestModelXORJoinGateway" />
+ </itp:systemDefinedAttributes>
+ <itp:localization>
+ <itp:label lang="unspecified" text="JoinAndGate" default="True" />
+ </itp:localization>
+ </extensionElements>
+ </parallelGateway>
+ </process>
+ <bpmndi:BPMNDiagram name="Mein Diagramm (1)" resolution="72">
+ <bpmndi:BPMNPlane id="_1" bpmnElement="_902e51a3-1856-4744-9bbd-3c71a36329af">
+ <bpmndi:BPMNShape id="_FCAEE655-A419-48B3-AB3D-47FC55D10999" bpmnElement="TestModelTaskA" itp:label="a" itp:elementType="userTask">
+ <dc:Bounds x="79.3700787401575" y="153.070866141732" width="85.0393700787402" height="42.5196850393701" />
+ <bpmndi:BPMNLabel labelStyle="_7dbbfa07-db75-43a9-aea5-fa71aaf27781">
+ <dc:Bounds x="115.56" y="167.235590551181" width="12.24" height="13.68" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_20CC3EA9-202C-4480-9AE6-5D702F4FD711" bpmnElement="TestModelTaskB" itp:label="b" itp:elementType="userTask">
+ <dc:Bounds x="274.96062992126" y="69.4488188976379" width="85.0393700787402" height="42.5196850393701" />
+ <bpmndi:BPMNLabel labelStyle="_7dbbfa07-db75-43a9-aea5-fa71aaf27781">
+ <dc:Bounds x="311.4" y="83.7155905511812" width="12.24" height="13.68" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_3B478D40-AFF2-402B-A612-1420DDA9BF9E" bpmnElement="TestModelTaskC" itp:label="c" itp:elementType="userTask">
+ <dc:Bounds x="274.96062992126" y="153.070866141732" width="85.0393700787402" height="42.5196850393701" />
+ <bpmndi:BPMNLabel labelStyle="_7dbbfa07-db75-43a9-aea5-fa71aaf27781">
+ <dc:Bounds x="311.76" y="167.235590551181" width="11.52" height="13.68" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_DE83D3F8-2A75-48C4-A2AF-555973D3C741" bpmnElement="TestModelTaskD" itp:label="d" itp:elementType="userTask">
+ <dc:Bounds x="274.96062992126" y="236.692913385827" width="85.0393700787402" height="42.5196850393701" />
+ <bpmndi:BPMNLabel labelStyle="_7dbbfa07-db75-43a9-aea5-fa71aaf27781">
+ <dc:Bounds x="311.4" y="250.755590551181" width="12.24" height="13.68" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_7062A2C4-DC32-4607-B1A0-9237DD854E68" bpmnElement="TestModelTaskE" itp:label="e" itp:elementType="userTask">
+ <dc:Bounds x="470.551181102362" y="153.070866141732" width="85.0393700787402" height="42.5196850393701" />
+ <bpmndi:BPMNLabel labelStyle="_7dbbfa07-db75-43a9-aea5-fa71aaf27781">
+ <dc:Bounds x="507.24" y="167.235590551181" width="12.24" height="13.68" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="_276446F4-4F36-47BB-B80D-35C91F3FA6C6" bpmnElement="_cb8558bb-fc7f-48d9-89fe-d2df6e37bbd2" itp:label="(unbenannt)" itp:elementType="sequenceFlow">
+ <di:waypoint x="164.409448818898" y="174.330708661417" />
+ <di:waypoint x="185.669291338583" y="174.330708661417" />
+ <bpmndi:BPMNLabel labelStyle="_d76156c3-8e57-4001-8ec0-ea6dab3054d6">
+ <dc:Bounds x="171.72" y="158.955590551181" width="7.92" height="17.28" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="_3340346A-5215-4468-AEC0-92A0C62B835A" bpmnElement="TestModelConditionalSequenceFlow1" itp:label="(unbenannt)" itp:elementType="sequenceFlow">
+ <di:waypoint x="206.929133858268" y="158.385826771654" />
+ <di:waypoint x="206.929133858268" y="90.7086614173229" />
+ <di:waypoint x="274.96062992126" y="90.7086614173229" />
+ <di:waypoint x="274.96062992126" y="90.7086614173229" />
+ <bpmndi:BPMNLabel labelStyle="_d76156c3-8e57-4001-8ec0-ea6dab3054d6">
+ <dc:Bounds x="207.72" y="83.3555905511811" width="7.92" height="17.28" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="_3093ACB0-33CF-4143-AB2D-CE199A56F00A" bpmnElement="_b6a578ba-d556-4867-ab1d-31d05a33a35e" itp:label="(unbenannt)" itp:elementType="sequenceFlow">
+ <di:waypoint x="228.188976377953" y="174.330708661417" />
+ <di:waypoint x="274.96062992126" y="174.330708661417" />
+ <bpmndi:BPMNLabel labelStyle="_d76156c3-8e57-4001-8ec0-ea6dab3054d6">
+ <dc:Bounds x="248.76" y="158.955590551181" width="7.92" height="17.28" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="_0531E590-3D57-4D5D-9EC7-CBFA7A494674" bpmnElement="_1d76ccef-d45f-4802-98d3-0aa0e978c554" itp:label="(unbenannt)" itp:elementType="sequenceFlow">
+ <di:waypoint x="206.929133858268" y="190.275590551181" />
+ <di:waypoint x="206.929133858268" y="257.952755905512" />
+ <di:waypoint x="274.96062992126" y="257.952755905512" />
+ <bpmndi:BPMNLabel labelStyle="_d76156c3-8e57-4001-8ec0-ea6dab3054d6">
+ <dc:Bounds x="207.72" y="248.235590551181" width="7.92" height="17.28" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="_148FB686-2B7D-491D-815D-16117147376F" bpmnElement="_fb92c3da-c942-4350-bc9f-1b87e5f70023" itp:label="(unbenannt)" itp:elementType="sequenceFlow">
+ <di:waypoint x="360" y="90.7086614173229" />
+ <di:waypoint x="409.606299212598" y="90.7086614173229" />
+ <di:waypoint x="409.606299212598" y="158.385826771654" />
+ <bpmndi:BPMNLabel labelStyle="_d76156c3-8e57-4001-8ec0-ea6dab3054d6">
+ <dc:Bounds x="405.72" y="94.8755905511812" width="7.92" height="17.28" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="_9C692385-6BF8-4D2E-B623-96BBBE1A9D85" bpmnElement="_64cf5e6a-18c6-4689-ba93-2865f67c16d6" itp:label="(unbenannt)" itp:elementType="sequenceFlow">
+ <di:waypoint x="360" y="174.330708661417" />
+ <di:waypoint x="388.346456692913" y="174.330708661417" />
+ <bpmndi:BPMNLabel labelStyle="_d76156c3-8e57-4001-8ec0-ea6dab3054d6">
+ <dc:Bounds x="370.44" y="158.955590551181" width="7.92" height="17.28" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="_137C61A0-B17C-4710-A3D1-1223BF1000AB" bpmnElement="_5af8c969-22a2-485a-8356-8af176a7b3d2" itp:label="(unbenannt)" itp:elementType="sequenceFlow">
+ <di:waypoint x="360" y="257.952755905512" />
+ <di:waypoint x="409.606299212598" y="257.952755905512" />
+ <di:waypoint x="409.606299212598" y="190.275590551181" />
+ <bpmndi:BPMNLabel labelStyle="_d76156c3-8e57-4001-8ec0-ea6dab3054d6">
+ <dc:Bounds x="405.72" y="236.715590551181" width="7.92" height="17.28" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="_6DFDBA5B-9283-4E2E-A17D-37794FF9CB34" bpmnElement="_53472ed0-6bda-4cc3-8119-feb7e93b0ddb" itp:label="(unbenannt)" itp:elementType="sequenceFlow">
+ <di:waypoint x="430.866141732284" y="174.330708661417" />
+ <di:waypoint x="470.551181102362" y="174.330708661417" />
+ <bpmndi:BPMNLabel labelStyle="_d76156c3-8e57-4001-8ec0-ea6dab3054d6">
+ <dc:Bounds x="447.48" y="158.955590551181" width="7.92" height="17.28" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_D0A40657-ED85-4A65-A209-2E413F15AFA1" bpmnElement="_4ace9b8b-afd3-428c-9926-2a0318285663" itp:label="SplitAndGate" itp:elementType="parallelGateway">
+ <dc:Bounds x="185.669291338583" y="158.385826771654" width="42.5196850393701" height="31.8897637795276" />
+ <bpmndi:BPMNLabel labelStyle="_d76156c3-8e57-4001-8ec0-ea6dab3054d6">
+ <dc:Bounds x="181.8" y="193.155590551181" width="49.68" height="9.36" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_F5659D86-41E8-48FC-B8E5-6BC9C521CB8A" bpmnElement="_19969e5c-c41c-49de-af79-529e94cb4446" itp:label="JoinAndGate" itp:elementType="parallelGateway">
+ <dc:Bounds x="388.346456692913" y="158.385826771654" width="42.5196850393701" height="31.8897637795276" />
+ <bpmndi:BPMNLabel labelStyle="_d76156c3-8e57-4001-8ec0-ea6dab3054d6">
+ <dc:Bounds x="385.56" y="193.155590551181" width="48.24" height="9.36" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ </bpmndi:BPMNPlane>
+ <bpmndi:BPMNLabelStyle id="_7dbbfa07-db75-43a9-aea5-fa71aaf27781">
+ <dc:Font name="Arial" size="10" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" />
+ </bpmndi:BPMNLabelStyle>
+ <bpmndi:BPMNLabelStyle id="_d76156c3-8e57-4001-8ec0-ea6dab3054d6">
+ <dc:Font name="Arial" size="8" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" />
+ </bpmndi:BPMNLabelStyle>
+ </bpmndi:BPMNDiagram>
+</definitions> \ No newline at end of file
diff --git a/model/org.eclipse.stardust.model.bpmn2.transform/src/test/resources/models/bpmn/SequentialMixedGateway.bpmn b/model/org.eclipse.stardust.model.bpmn2.transform/src/test/resources/models/bpmn/SequentialMixedGateway.bpmn
new file mode 100644
index 0000000..bb0d4b4
--- /dev/null
+++ b/model/org.eclipse.stardust.model.bpmn2.transform/src/test/resources/models/bpmn/SequentialMixedGateway.bpmn
@@ -0,0 +1,307 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--Created by Process Manager 6 for Microsoft Visio (http://www.itp-commerce.com)-->
+<definitions targetNamespace="http://www.itp-commerce.com" xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:itp="http://www.itp-commerce.com/BPMN2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL schemas/BPMN20.xsd" exporter="Process Manager 6 for Microsoft Visio" exporterVersion="5.2769.13758 " itp:name="Mein Diagramm" itp:version="1.0" itp:author="simon nikles" itp:creationDate="04.09.2012 16:20:09" itp:modificationDate="05.09.2012 12:50:15" itp:createdWithVersion="5.2769.13758 " itp:conformanceSubClass="Full" id="_b4b327fa-1617-4e64-90b1-026dadcc097f" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC">
+ <process id="_e0eed206-75f3-4103-8962-b939793fed34" name="Hauptprozess" processType="None">
+ <extensionElements>
+ <itp:systemDefinedAttributes>
+ <attribute name="Hyperlinks" type="String" value="0 Hyperlinks" />
+ <attribute name="ExternalId" type="String" />
+ <attribute name="KPICost" type="Float" value="1" format="Currency;Fr.;;KPI;2" />
+ <attribute name="KPIDuration" type="Float" value="1" format="Duration;;;KPI;3">
+ <attribute name="KPIActiveTime" type="Float" value="1" format="Duration;;;KPI;3" />
+ <attribute name="KPIWaitTime" type="Float" value="0" format="Duration;;;KPI;3" />
+ </attribute>
+ </itp:systemDefinedAttributes>
+ <itp:localization>
+ <itp:label lang="unspecified" text="Hauptprozess" default="True" />
+ </itp:localization>
+ </extensionElements>
+ <task id="TestModelTaskA" name="a">
+ <extensionElements>
+ <itp:systemDefinedAttributes>
+ <attribute name="Hyperlinks" type="String" value="0 Hyperlinks" />
+ <attribute name="ExternalId" type="String" />
+ <attribute name="KPICost" type="Float" value="1" format="Currency;Fr.;;KPI;2" />
+ <attribute name="KPIDuration" type="Float" value="1" format="Duration;;;KPI;3">
+ <attribute name="KPIActiveTime" type="Float" value="1" format="Duration;;;KPI;3" />
+ <attribute name="KPIWaitTime" type="Float" value="0" format="Duration;;;KPI;3" />
+ </attribute>
+ </itp:systemDefinedAttributes>
+ <itp:localization>
+ <itp:label lang="unspecified" text="a" default="True" />
+ </itp:localization>
+ </extensionElements>
+ </task>
+ <task id="TestModelTaskD" name="d">
+ <extensionElements>
+ <itp:systemDefinedAttributes>
+ <attribute name="Hyperlinks" type="String" value="0 Hyperlinks" />
+ <attribute name="ExternalId" type="String" />
+ <attribute name="KPICost" type="Float" value="1" format="Currency;Fr.;;KPI;2" />
+ <attribute name="KPIDuration" type="Float" value="1" format="Duration;;;KPI;3">
+ <attribute name="KPIActiveTime" type="Float" value="1" format="Duration;;;KPI;3" />
+ <attribute name="KPIWaitTime" type="Float" value="0" format="Duration;;;KPI;3" />
+ </attribute>
+ </itp:systemDefinedAttributes>
+ <itp:localization>
+ <itp:label lang="unspecified" text="d" default="True" />
+ </itp:localization>
+ </extensionElements>
+ </task>
+ <exclusiveGateway id="TestModelGateA" name="FirstXOrGate" gatewayDirection="Diverging">
+ <extensionElements>
+ <itp:systemDefinedAttributes>
+ <attribute name="Hyperlinks" type="String" value="0 Hyperlinks" />
+ <attribute name="ExternalId" type="String" />
+ </itp:systemDefinedAttributes>
+ <itp:localization>
+ <itp:label lang="unspecified" text="FirstXOrGate" default="True" />
+ </itp:localization>
+ </extensionElements>
+ </exclusiveGateway>
+ <exclusiveGateway id="TestModelGateB" name="SecondXOrGate" gatewayDirection="Diverging">
+ <extensionElements>
+ <itp:systemDefinedAttributes>
+ <attribute name="Hyperlinks" type="String" value="0 Hyperlinks" />
+ <attribute name="ExternalId" type="String" />
+ </itp:systemDefinedAttributes>
+ <itp:localization>
+ <itp:label lang="unspecified" text="SecondXOrGate" default="True" />
+ </itp:localization>
+ </extensionElements>
+ </exclusiveGateway>
+ <task id="TestModelTaskB" name="b">
+ <extensionElements>
+ <itp:systemDefinedAttributes>
+ <attribute name="Hyperlinks" type="String" value="0 Hyperlinks" />
+ <attribute name="ExternalId" type="String" />
+ <attribute name="KPICost" type="Float" value="1" format="Currency;Fr.;;KPI;2" />
+ <attribute name="KPIDuration" type="Float" value="1" format="Duration;;;KPI;3">
+ <attribute name="KPIActiveTime" type="Float" value="1" format="Duration;;;KPI;3" />
+ <attribute name="KPIWaitTime" type="Float" value="0" format="Duration;;;KPI;3" />
+ </attribute>
+ </itp:systemDefinedAttributes>
+ <itp:localization>
+ <itp:label lang="unspecified" text="b" default="True" />
+ </itp:localization>
+ </extensionElements>
+ </task>
+ <task id="TestModelTaskC" name="c">
+ <extensionElements>
+ <itp:systemDefinedAttributes>
+ <attribute name="Hyperlinks" type="String" value="0 Hyperlinks" />
+ <attribute name="ExternalId" type="String" />
+ <attribute name="KPICost" type="Float" value="1" format="Currency;Fr.;;KPI;2" />
+ <attribute name="KPIDuration" type="Float" value="1" format="Duration;;;KPI;3">
+ <attribute name="KPIActiveTime" type="Float" value="1" format="Duration;;;KPI;3" />
+ <attribute name="KPIWaitTime" type="Float" value="0" format="Duration;;;KPI;3" />
+ </attribute>
+ </itp:systemDefinedAttributes>
+ <itp:localization>
+ <itp:label lang="unspecified" text="c" default="True" />
+ </itp:localization>
+ </extensionElements>
+ </task>
+ <sequenceFlow id="TestModelSequenceA2GA" sourceRef="TestModelTaskA" targetRef="TestModelGateA">
+ <extensionElements>
+ <itp:systemDefinedAttributes>
+ <attribute name="Hyperlinks" type="String" value="0 Hyperlinks" />
+ <attribute name="ExternalId" type="String" />
+ </itp:systemDefinedAttributes>
+ <itp:localization>
+ <itp:label lang="unspecified" text="" default="True" />
+ </itp:localization>
+ </extensionElements>
+ </sequenceFlow>
+ <sequenceFlow id="TestModelSequenceGA2MixedGate" name="X=2" sourceRef="TestModelGateA" targetRef="TestModelXORMixedGateway">
+ <extensionElements>
+ <itp:systemDefinedAttributes>
+ <attribute name="Hyperlinks" type="String" value="0 Hyperlinks" />
+ <attribute name="ExternalId" type="String" />
+ </itp:systemDefinedAttributes>
+ <itp:localization>
+ <itp:label lang="unspecified" text="X=2" default="True" />
+ </itp:localization>
+ </extensionElements>
+ <conditionExpression><documentation>test='X=2'</documentation></conditionExpression>
+ </sequenceFlow>
+ <sequenceFlow id="TestModelSequenceGA2GB" name="X=1" sourceRef="TestModelGateA" targetRef="TestModelGateB">
+ <extensionElements>
+ <itp:systemDefinedAttributes>
+ <attribute name="Hyperlinks" type="String" value="0 Hyperlinks" />
+ <attribute name="ExternalId" type="String" />
+ </itp:systemDefinedAttributes>
+ <itp:localization>
+ <itp:label lang="unspecified" text="X=1" default="True" />
+ </itp:localization>
+ </extensionElements>
+ <conditionExpression><documentation>test='X=1'</documentation></conditionExpression>
+ </sequenceFlow>
+ <sequenceFlow id="TestModelSequenceGB2B" name="Y=1" sourceRef="TestModelGateB" targetRef="TestModelTaskB">
+ <extensionElements>
+ <itp:systemDefinedAttributes>
+ <attribute name="Hyperlinks" type="String" value="0 Hyperlinks" />
+ <attribute name="ExternalId" type="String" />
+ </itp:systemDefinedAttributes>
+ <itp:localization>
+ <itp:label lang="unspecified" text="Y=1" default="True" />
+ </itp:localization>
+ </extensionElements>
+ <conditionExpression><documentation>test='Y=1'</documentation></conditionExpression>
+ </sequenceFlow>
+ <sequenceFlow id="TestModelSequenceGB2MixedGate" name="Y=2" sourceRef="TestModelGateB" targetRef="TestModelXORMixedGateway">
+ <extensionElements>
+ <itp:systemDefinedAttributes>
+ <attribute name="Hyperlinks" type="String" value="0 Hyperlinks" />
+ <attribute name="ExternalId" type="String" />
+ </itp:systemDefinedAttributes>
+ <itp:localization>
+ <itp:label lang="unspecified" text="Y=2" default="True" />
+ </itp:localization>
+ </extensionElements>
+ <conditionExpression><documentation>test='Y=2'</documentation></conditionExpression>
+ </sequenceFlow>
+ <exclusiveGateway id="TestModelXORMixedGateway" name="MixedGate" gatewayDirection="Mixed">
+ <extensionElements>
+ <itp:systemDefinedAttributes>
+ <attribute name="Hyperlinks" type="String" value="0 Hyperlinks" />
+ <attribute name="ExternalId" type="String" />
+ </itp:systemDefinedAttributes>
+ <itp:localization>
+ <itp:label lang="unspecified" text="MixedGate" default="True" />
+ </itp:localization>
+ </extensionElements>
+ </exclusiveGateway>
+ <sequenceFlow id="TestModelSequenceMixedGate2C" name="Z=1" sourceRef="TestModelXORMixedGateway" targetRef="TestModelTaskC">
+ <extensionElements>
+ <itp:systemDefinedAttributes>
+ <attribute name="Hyperlinks" type="String" value="0 Hyperlinks" />
+ <attribute name="ExternalId" type="String" />
+ </itp:systemDefinedAttributes>
+ <itp:localization>
+ <itp:label lang="unspecified" text="Z=1" default="True" />
+ </itp:localization>
+ </extensionElements>
+ <conditionExpression><documentation>test='Z=1'</documentation></conditionExpression>
+ </sequenceFlow>
+ <sequenceFlow id="TestModelSequenceMixedGate2D" name="Z=2" sourceRef="TestModelXORMixedGateway" targetRef="TestModelTaskD">
+ <extensionElements>
+ <itp:systemDefinedAttributes>
+ <attribute name="Hyperlinks" type="String" value="0 Hyperlinks" />
+ <attribute name="ExternalId" type="String" />
+ </itp:systemDefinedAttributes>
+ <itp:localization>
+ <itp:label lang="unspecified" text="Z=2" default="True" />
+ </itp:localization>
+ </extensionElements>
+ <conditionExpression><documentation>test='Z=2'</documentation></conditionExpression>
+ </sequenceFlow>
+ </process>
+ <bpmndi:BPMNDiagram name="Mein Diagramm (1)" resolution="72">
+ <bpmndi:BPMNPlane id="_1" bpmnElement="_e0eed206-75f3-4103-8962-b939793fed34">
+ <bpmndi:BPMNShape id="_5E2A9FA0-876F-4597-8360-6FEA9F4886BE" bpmnElement="TestModelTaskA" itp:label="a" itp:elementType="task">
+ <dc:Bounds x="119.055118110236" y="150.590551181102" width="85.0393700787402" height="42.5196850393701" />
+ <bpmndi:BPMNLabel labelStyle="_6ad234ce-001c-4c0c-87e4-802a4cb19b2d">
+ <dc:Bounds x="155.16" y="165.075590551181" width="12.24" height="13.68" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_EB495642-B66D-4D04-AD2D-B44220EE04C8" bpmnElement="TestModelTaskD" itp:label="d" itp:elementType="task">
+ <dc:Bounds x="566.929133858268" y="285.236220472441" width="85.0393700787402" height="42.5196850393701" />
+ <bpmndi:BPMNLabel labelStyle="_6ad234ce-001c-4c0c-87e4-802a4cb19b2d">
+ <dc:Bounds x="603" y="299.715590551181" width="12.24" height="13.68" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_E26E3847-554D-4F7B-A6D6-CF6FA366868F" bpmnElement="TestModelGateA" isMarkerVisible="false" itp:label="FirstXOrGate" itp:elementType="exclusiveGateway">
+ <dc:Bounds x="269.291338582677" y="155.905511811024" width="42.5196850393701" height="31.8897637795276" />
+ <bpmndi:BPMNLabel labelStyle="_f63a074b-bb32-45df-97dc-94b4a9c1f12c">
+ <dc:Bounds x="266.04" y="190.275590551181" width="49.68" height="9.36" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_B6C2EC3E-2EDD-4827-BD22-597F4794C818" bpmnElement="TestModelGateB" isMarkerVisible="false" itp:label="SecondXOrGate" itp:elementType="exclusiveGateway">
+ <dc:Bounds x="396.850393700787" y="155.905511811024" width="42.5196850393701" height="31.8897637795276" />
+ <bpmndi:BPMNLabel labelStyle="_f63a074b-bb32-45df-97dc-94b4a9c1f12c">
+ <dc:Bounds x="387.72" y="190.275590551181" width="61.2" height="9.36" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_9EEBA9ED-A70F-4FC3-AFC4-7948E697D476" bpmnElement="TestModelTaskB" itp:label="b" itp:elementType="task">
+ <dc:Bounds x="566.929133858268" y="106.299212598425" width="85.0393700787402" height="42.5196850393701" />
+ <bpmndi:BPMNLabel labelStyle="_6ad234ce-001c-4c0c-87e4-802a4cb19b2d">
+ <dc:Bounds x="603" y="120.435590551181" width="12.24" height="13.68" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNShape id="_D3251F4E-BABD-4EC5-AE55-721832C96DC6" bpmnElement="TestModelTaskC" itp:label="c" itp:elementType="task">
+ <dc:Bounds x="566.929133858268" y="209.055118110236" width="85.0393700787402" height="42.5196850393701" />
+ <bpmndi:BPMNLabel labelStyle="_6ad234ce-001c-4c0c-87e4-802a4cb19b2d">
+ <dc:Bounds x="603.36" y="223.395590551181" width="11.52" height="13.68" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="_806B8CFC-DE13-4B5E-96C8-B224B0CAFBEA" bpmnElement="TestModelSequenceA2GA" itp:label="(unbenannt)" itp:elementType="sequenceFlow">
+ <di:waypoint x="204.094488188976" y="171.850393700787" />
+ <di:waypoint x="269.291338582677" y="171.850393700787" />
+ <bpmndi:BPMNLabel labelStyle="_f63a074b-bb32-45df-97dc-94b4a9c1f12c">
+ <dc:Bounds x="233.64" y="156.075590551181" width="7.92" height="17.28" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="_DE508556-F269-4219-8CE4-5641026E4BF0" bpmnElement="TestModelSequenceGA2MixedGate" itp:label="X=2" itp:elementType="sequenceFlow">
+ <di:waypoint x="290.551181102362" y="187.795275590551" />
+ <di:waypoint x="290.551181102362" y="279.92125984252" />
+ <di:waypoint x="460.629921259842" y="279.92125984252" />
+ <di:waypoint x="460.629921259843" y="279.92125984252" />
+ <bpmndi:BPMNLabel labelStyle="_f63a074b-bb32-45df-97dc-94b4a9c1f12c">
+ <dc:Bounds x="323.28" y="271.275590551181" width="24.48" height="17.28" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="_59C90D80-F87C-40BA-9418-234360B2B16B" bpmnElement="TestModelSequenceGA2GB" itp:label="X=1" itp:elementType="sequenceFlow">
+ <di:waypoint x="311.811023622047" y="171.850393700787" />
+ <di:waypoint x="396.850393700787" y="171.850393700787" />
+ <bpmndi:BPMNLabel labelStyle="_f63a074b-bb32-45df-97dc-94b4a9c1f12c">
+ <dc:Bounds x="343.44" y="156.075590551181" width="24.48" height="17.28" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="_B6D9B983-B0B7-4CA1-9795-344E6989D94D" bpmnElement="TestModelSequenceGB2B" itp:label="Y=1" itp:elementType="sequenceFlow">
+ <di:waypoint x="418.110236220472" y="155.905511811024" />
+ <di:waypoint x="418.110236220472" y="127.55905511811" />
+ <di:waypoint x="566.929133858268" y="127.55905511811" />
+ <bpmndi:BPMNLabel labelStyle="_f63a074b-bb32-45df-97dc-94b4a9c1f12c">
+ <dc:Bounds x="470.88" y="118.635590551181" width="24.48" height="17.28" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="_05D60E98-D745-4FCE-8D76-B1EE0E8CA052" bpmnElement="TestModelSequenceGB2MixedGate" itp:label="Y=2" itp:elementType="sequenceFlow">
+ <di:waypoint x="418.110236220472" y="187.795275590551" />
+ <di:waypoint x="418.110236220472" y="269.291338582677" />
+ <di:waypoint x="460.629921259843" y="269.291338582677" />
+ <bpmndi:BPMNLabel labelStyle="_f63a074b-bb32-45df-97dc-94b4a9c1f12c">
+ <dc:Bounds x="406.08" y="241.755590551181" width="24.48" height="17.28" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNShape id="_CA72D667-5479-4859-AD87-EBBB79A0450B" bpmnElement="TestModelXORMixedGateway" isMarkerVisible="false" itp:label="MixedGate" itp:elementType="exclusiveGateway">
+ <dc:Bounds x="453.543307086614" y="258.661417322835" width="42.5196850393701" height="31.8897637795276" />
+ <bpmndi:BPMNLabel labelStyle="_f63a074b-bb32-45df-97dc-94b4a9c1f12c">
+ <dc:Bounds x="453.96" y="293.235590551181" width="41.04" height="9.36" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNShape>
+ <bpmndi:BPMNEdge id="_8C290B0B-00A9-41DC-AD9D-3EE8E68C6723" bpmnElement="TestModelSequenceMixedGate2C" itp:label="Z=1" itp:elementType="sequenceFlow">
+ <di:waypoint x="474.803149606299" y="258.661417322835" />
+ <di:waypoint x="474.803149606299" y="230.314960629921" />
+ <di:waypoint x="566.929133858268" y="230.314960629921" />
+ <bpmndi:BPMNLabel labelStyle="_f63a074b-bb32-45df-97dc-94b4a9c1f12c">
+ <dc:Bounds x="498.24" y="221.595590551181" width="24.48" height="17.28" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ <bpmndi:BPMNEdge id="_2C799418-D505-4A42-955C-24A5038B1EE1" bpmnElement="TestModelSequenceMixedGate2D" itp:label="Z=2" itp:elementType="sequenceFlow">
+ <di:waypoint x="474.803149606299" y="290.551181102362" />
+ <di:waypoint x="474.803149606299" y="306.496062992126" />
+ <di:waypoint x="566.929133858268" y="306.496062992126" />
+ <bpmndi:BPMNLabel labelStyle="_f63a074b-bb32-45df-97dc-94b4a9c1f12c">
+ <dc:Bounds x="504" y="297.915590551181" width="24.48" height="17.28" />
+ </bpmndi:BPMNLabel>
+ </bpmndi:BPMNEdge>
+ </bpmndi:BPMNPlane>
+ <bpmndi:BPMNLabelStyle id="_6ad234ce-001c-4c0c-87e4-802a4cb19b2d">
+ <dc:Font name="Arial" size="10" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" />
+ </bpmndi:BPMNLabelStyle>
+ <bpmndi:BPMNLabelStyle id="_f63a074b-bb32-45df-97dc-94b4a9c1f12c">
+ <dc:Font name="Arial" size="8" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" />
+ </bpmndi:BPMNLabelStyle>
+ </bpmndi:BPMNDiagram>
+</definitions> \ No newline at end of file
diff --git a/model/org.eclipse.stardust.model.bpmn2.transform/src/test/resources/models/bpmn/StartEventMessage.bpmn b/model/org.eclipse.stardust.model.bpmn2.transform/src/test/resources/models/bpmn/StartEventMessage.bpmn
index b2ba9a5..eb0e230 100644
--- a/model/org.eclipse.stardust.model.bpmn2.transform/src/test/resources/models/bpmn/StartEventMessage.bpmn
+++ b/model/org.eclipse.stardust.model.bpmn2.transform/src/test/resources/models/bpmn/StartEventMessage.bpmn
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
<!--Created by Process Modeler 5 SR7 for Microsoft Visio (http://www.itp-commerce.com)-->
<definitions targetNamespace="http://www.itp-commerce.com" xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:itp="http://www.itp-commerce.com/BPMN2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL schemas/BPMN20.xsd" exporter="Process Modeler 5 for Microsoft Visio" exporterVersion="5.2769.13758 SR7" itp:name="Mein Diagramm" itp:version="1.0" itp:author="simon nikles" itp:creationDate="28.06.2012 09:29:58" itp:modificationDate="28.06.2012 09:35:36" itp:createdWithVersion="5.2769.13758 SR7" itp:conformanceSubClass="Full" id="_9be861c8-bb4a-4f30-a848-d7f4eb178051" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC">
<process id="_a1d182de-7971-4662-9009-cab25f298bdd" name="Hauptprozess" processType="None">
diff --git a/model/org.eclipse.stardust.model.bpmn2.transform/src/test/resources/models/bpmn/StartEventNone.bpmn b/model/org.eclipse.stardust.model.bpmn2.transform/src/test/resources/models/bpmn/StartEventNone.bpmn
index 59aeb93..90ff90f 100644
--- a/model/org.eclipse.stardust.model.bpmn2.transform/src/test/resources/models/bpmn/StartEventNone.bpmn
+++ b/model/org.eclipse.stardust.model.bpmn2.transform/src/test/resources/models/bpmn/StartEventNone.bpmn
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
<!--Created by Process Modeler 5 SR7 for Microsoft Visio (http://www.itp-commerce.com)-->
<definitions targetNamespace="http://www.itp-commerce.com" xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:itp="http://www.itp-commerce.com/BPMN2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL schemas/BPMN20.xsd" exporter="Process Modeler 5 for Microsoft Visio" exporterVersion="5.2769.13758 SR7" itp:name="Mein Diagramm" itp:version="1.0" itp:author="simon nikles" itp:creationDate="28.06.2012 09:29:58" itp:modificationDate="28.06.2012 09:34:58" itp:createdWithVersion="5.2769.13758 SR7" itp:conformanceSubClass="Full" id="_9be861c8-bb4a-4f30-a848-d7f4eb178051" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC">
<process id="_a1d182de-7971-4662-9009-cab25f298bdd" name="Hauptprozess" processType="None">
diff --git a/model/org.eclipse.stardust.model.bpmn2.transform/src/test/resources/models/bpmn/UserTask.bpmn b/model/org.eclipse.stardust.model.bpmn2.transform/src/test/resources/models/bpmn/UserTask.bpmn
index bf98779..66c4f37 100644
--- a/model/org.eclipse.stardust.model.bpmn2.transform/src/test/resources/models/bpmn/UserTask.bpmn
+++ b/model/org.eclipse.stardust.model.bpmn2.transform/src/test/resources/models/bpmn/UserTask.bpmn
@@ -1,4 +1,4 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
<!--Created by Process Modeler 5 SR7 for Microsoft Visio (http://www.itp-commerce.com)-->
<definitions targetNamespace="http://www.itp-commerce.com" xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:itp="http://www.itp-commerce.com/BPMN2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL schemas/BPMN20.xsd" exporter="Process Modeler 5 for Microsoft Visio" exporterVersion="5.2769.13758 SR7" itp:name="Mein Diagramm" itp:version="1.0" itp:author="simon nikles" itp:creationDate="28.06.2012 09:29:58" itp:modificationDate="28.06.2012 13:54:38" itp:createdWithVersion="5.2769.13758 SR7" itp:conformanceSubClass="Full" id="_9be861c8-bb4a-4f30-a848-d7f4eb178051" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC">
<process id="_a1d182de-7971-4662-9009-cab25f298bdd" name="Hauptprozess" processType="None">