Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [henshin-dev] Henshin-rules and BPMN2-Models

Am 29.10.2012 14:39, schrieb Christian Krause:
Hi Jens,

it could be a reference to the container object. If you want to create
or delete an object, you should always explicitly add /delete it to/from
its container object. In your case, this should be an instance of Process.

Yes, this is the thing.
I did some additional research, there is an additional issue:

In contrast to UML, where diagram and model information are split into to separate files (.uml and .umldi), in BPMN both are put into one file. I attached a simple BPMN-Model (and -Diagram) where I want to delete a task with the specific name "Ignore".

I already asked the BPMN2 Modeler-people if it is possible to re-create diagram information from the model (as TOPCASED is able to do this for UML-models), but I don't have an answer yet.

So I guess to not leave dangling edges behind, in detail the graphical elements in the diagram-part, I also have to model the deletion of the diagram-elements. I created a Henshin-rule to do that, but it cannot be applied.

What I see may be a problem is the type of edges in the rule. I don't know what edge-types to choose, because some elements are just nested and not referenced via attributes.

For example the connection BPMNDiagram and BPMNPlane:
These two elements are just nested in the .bpmn2-file, whie <henshin offers me two edge types:
rootElement:DiagramElement
plane:BPMNPlane

Jens

Attachment: bpmnrule.png
Description: PNG image

<?xml version="1.0" encoding="UTF-8"?>
<bpmn2:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xmlns:bpmn2="http://www.omg.org/spec/BPMN/20100524/MODEL"; xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI"; xmlns:dc="http://www.omg.org/spec/DD/20100524/DC"; xmlns:di="http://www.omg.org/spec/DD/20100524/DI"; xmlns:tns="http://www.jboss.org/drools"; xsi:schemaLocation="http://www.omg.org/spec/BPMN/20100524/MODEL BPMN20.xsd" id="Definitions_1" expressionLanguage="http://www.mvel.org/2.0"; targetNamespace="http://www.jboss.org/drools"; typeLanguage="http://www.java.com/javaTypes";>
  <bpmn2:process id="test" tns:version="1" tns:packageName="defaultPackage" name="Default Process">
    <bpmn2:startEvent id="StartEvent_1">
      <bpmn2:outgoing>SequenceFlow_1</bpmn2:outgoing>
      <bpmn2:outgoing>SequenceFlow_3</bpmn2:outgoing>
    </bpmn2:startEvent>
    <bpmn2:sequenceFlow id="SequenceFlow_1" tns:priority="1" sourceRef="StartEvent_1" targetRef="Task_1"/>
    <bpmn2:endEvent id="EndEvent_1">
      <bpmn2:incoming>SequenceFlow_2</bpmn2:incoming>
      <bpmn2:incoming>SequenceFlow_4</bpmn2:incoming>
    </bpmn2:endEvent>
    <bpmn2:task id="Task_1" name="Enter Password">
      <bpmn2:incoming>SequenceFlow_1</bpmn2:incoming>
      <bpmn2:outgoing>SequenceFlow_2</bpmn2:outgoing>
    </bpmn2:task>
    <bpmn2:sequenceFlow id="SequenceFlow_2" tns:priority="1" name="" sourceRef="Task_1" targetRef="EndEvent_1"/>
    <bpmn2:task id="Task_2" name="Ignore">
      <bpmn2:incoming>SequenceFlow_3</bpmn2:incoming>
      <bpmn2:outgoing>SequenceFlow_4</bpmn2:outgoing>
    </bpmn2:task>
    <bpmn2:sequenceFlow id="SequenceFlow_3" tns:priority="1" name="" sourceRef="StartEvent_1" targetRef="Task_2"/>
    <bpmn2:sequenceFlow id="SequenceFlow_4" tns:priority="1" name="" sourceRef="Task_2" targetRef="EndEvent_1"/>
  </bpmn2:process>
  <bpmndi:BPMNDiagram id="BPMNDiagram_1" name="Default Process Diagram">
    <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="test">
      <bpmndi:BPMNShape id="BPMNShape_1" bpmnElement="StartEvent_1">
        <dc:Bounds height="36.0" width="36.0" x="100.0" y="100.0"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="BPMNShape_2" bpmnElement="EndEvent_1">
        <dc:Bounds height="36.0" width="36.0" x="500.0" y="100.0"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_1" bpmnElement="SequenceFlow_1" sourceElement="BPMNShape_1" targetElement="BPMNShape_Task_1">
        <di:waypoint xsi:type="dc:Point" x="136.0" y="118.0"/>
        <di:waypoint xsi:type="dc:Point" x="260.0" y="85.0"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNShape id="BPMNShape_Task_1" bpmnElement="Task_1">
        <dc:Bounds height="50.0" width="110.0" x="260.0" y="60.0"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_2" bpmnElement="SequenceFlow_2" sourceElement="BPMNShape_Task_1" targetElement="BPMNShape_2">
        <di:waypoint xsi:type="dc:Point" x="370.0" y="85.0"/>
        <di:waypoint xsi:type="dc:Point" x="500.0" y="118.0"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNShape id="BPMNShape_Task_2" bpmnElement="Task_2">
        <dc:Bounds height="50.0" width="110.0" x="260.0" y="135.0"/>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_3" bpmnElement="SequenceFlow_3" sourceElement="BPMNShape_1" targetElement="BPMNShape_Task_2">
        <di:waypoint xsi:type="dc:Point" x="136.0" y="118.0"/>
        <di:waypoint xsi:type="dc:Point" x="260.0" y="160.0"/>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="BPMNEdge_SequenceFlow_4" bpmnElement="SequenceFlow_4" sourceElement="BPMNShape_Task_2" targetElement="BPMNShape_2">
        <di:waypoint xsi:type="dc:Point" x="370.0" y="160.0"/>
        <di:waypoint xsi:type="dc:Point" x="500.0" y="118.0"/>
      </bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</bpmn2:definitions>

Back to the top