BPMNEngine icon indicating copy to clipboard operation
BPMNEngine copied to clipboard

It seems that boundary event dont implement?

Open cjmld5 opened this issue 2 years ago • 12 comments

when testing i found some boundary events like timerEventDefinition/signalEventDefinition/messageEventDefinition and so on ,but it seems dont have a implement? and this boundary above when drawing a gif seems draws a blank hole in the "*.gif" some part of gif/png below : image

cjmld5 avatar Mar 03 '22 07:03 cjmld5

Can you supply me with the bpmn definition that generated this image error.

As for the boundary events that would include timer/signal/message definitions, they are implemented as they are technically a SubType for an Event (They are contained within a start, intermediatecatch, intermediatethrow and end events). All of these are implemented, including an extension in the InterMeditaCatch/Throw Event that contains a timerEventDefinition.

Within the timerEventDefinition if you include a exts:DateString element inside the bpmn:extensionselement and either define an attribute called Code or the Text inside that element, you can create a Timespan to delay the process. Below is an example:

bpmn:timerEventDefinition bpmn:extensionElements <exts:DateString Code="${departureDate} -30 day" /> </bpmn:extensionElements> </bpmn:timerEventDefinition>

This will delay that step by the DateTime process variable of departureDate less 30 days. The DateString processes itself similar to the PHP dateString, supporting things like now, +/- x (days,minutes,seconds), last, next, tomorrow, etc. Refer to the class Org.Reddragonit.BpmEngine.DateString to see more details.

roger-castaldo avatar Mar 03 '22 15:03 roger-castaldo

Thanks a lot and yes that i designed this bpm in camunda modeler and in the B User Service service task of the bpm,I put a time boundary event and write some code to test。And cause of github`s file type limit ,I can only put this xml document below。some part of xml element is camunda customized,and we can only focus on bpmn:boundaryEvent, is it right? Here is the bpm :

<?xml version="1.0" encoding="UTF-8"?>
<bpmn:definitions xmlns:bpmn="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:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:modeler="http://camunda.org/schema/modeler/1.0" id="Definitions_088t2i9" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="4.12.0" modeler:executionPlatform="Camunda Platform" modeler:executionPlatformVersion="7.15.0">
  <bpmn:process id="Process_1d00j3f" isExecutable="true">
    <bpmn:startEvent id="Start">
      <bpmn:outgoing>Flow_1uemsys</bpmn:outgoing>
    </bpmn:startEvent>
    <bpmn:userTask id="Dispatch" name="A">
      <bpmn:extensionElements>
        <camunda:executionListener class="com.sh3h.bpmn.listener.dispatchStart" event="start" />
        <camunda:properties>
          <camunda:property name="CandidateManager" value="1" />
        </camunda:properties>
      </bpmn:extensionElements>
      <bpmn:incoming>Flow_1uemsys</bpmn:incoming>
      <bpmn:outgoing>Flow_18x4boc</bpmn:outgoing>
    </bpmn:userTask>
    <bpmn:userTask id="Dispose" name="C">
      <bpmn:incoming>Flow_196pcfb</bpmn:incoming>
      <bpmn:outgoing>Flow_0nlx2ax</bpmn:outgoing>
    </bpmn:userTask>
    <bpmn:endEvent id="End">
      <bpmn:incoming>Flow_0nlx2ax</bpmn:incoming>
    </bpmn:endEvent>
    <bpmn:userTask id="Accept" name="B">
      <bpmn:incoming>Flow_18x4boc</bpmn:incoming>
      <bpmn:outgoing>Flow_196pcfb</bpmn:outgoing>
    </bpmn:userTask>
    <bpmn:serviceTask id="Activity_12hqcy4" name="CD">
      <bpmn:incoming>Flow_0r2crex</bpmn:incoming>
    </bpmn:serviceTask>
    <bpmn:boundaryEvent id="CustomTimeEvent" name="CustomTimeEvent" attachedToRef="Accept">
      <bpmn:outgoing>Flow_0r2crex</bpmn:outgoing>
      <bpmn:timerEventDefinition id="TimerEventDefinition_0w6otis">
        <bpmn:timeDuration xsi:type="bpmn:tFormalExpression">PT5S</bpmn:timeDuration>
      </bpmn:timerEventDefinition>
    </bpmn:boundaryEvent>
    <bpmn:sequenceFlow id="Flow_1uemsys" sourceRef="Start" targetRef="Dispatch" />
    <bpmn:sequenceFlow id="Flow_18x4boc" sourceRef="Dispatch" targetRef="Accept" />
    <bpmn:sequenceFlow id="Flow_196pcfb" sourceRef="Accept" targetRef="Dispose" />
    <bpmn:sequenceFlow id="Flow_0r2crex" sourceRef="CustomTimeEvent" targetRef="Activity_12hqcy4" />
    <bpmn:sequenceFlow id="Flow_0nlx2ax" sourceRef="Dispose" targetRef="End" />
  </bpmn:process>
  <bpmndi:BPMNDiagram id="BPMNDiagram_1">
    <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_1d00j3f">
      <bpmndi:BPMNEdge id="Flow_1uemsys_di" bpmnElement="Flow_1uemsys">
        <di:waypoint x="188" y="120" />
        <di:waypoint x="223" y="120" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_18x4boc_di" bpmnElement="Flow_18x4boc">
        <di:waypoint x="323" y="120" />
        <di:waypoint x="363" y="120" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_196pcfb_di" bpmnElement="Flow_196pcfb">
        <di:waypoint x="463" y="120" />
        <di:waypoint x="503" y="120" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_0r2crex_di" bpmnElement="Flow_0r2crex">
        <di:waypoint x="463" y="178" />
        <di:waypoint x="463" y="243" />
        <di:waypoint x="533" y="243" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_0nlx2ax_di" bpmnElement="Flow_0nlx2ax">
        <di:waypoint x="603" y="120" />
        <di:waypoint x="702" y="120" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNShape id="Start_di" bpmnElement="Start">
        <dc:Bounds x="152" y="102" width="36" height="36" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Dispatch_di" bpmnElement="Dispatch">
        <dc:Bounds x="223" y="80" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Dispose_di" bpmnElement="Dispose">
        <dc:Bounds x="503" y="80" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Accept_di" bpmnElement="Accept">
        <dc:Bounds x="363" y="80" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Activity_12hqcy4_di" bpmnElement="Activity_12hqcy4">
        <dc:Bounds x="533" y="203" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="End_di" bpmnElement="End">
        <dc:Bounds x="702" y="102" width="36" height="36" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="CustomTimeEvent_di" bpmnElement="CustomTimeEvent">
        <dc:Bounds x="445" y="142" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="491" y="146" width="88" height="27" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</bpmn:definitions>

cjmld5 avatar Mar 04 '22 03:03 cjmld5

and the generated png below like this: image and the designed bpm preview: image

cjmld5 avatar Mar 04 '22 03:03 cjmld5

Can you supply me with the bpmn definition that generated this image error.

As for the boundary events that would include timer/signal/message definitions, they are implemented as they are technically a SubType for an Event (They are contained within a start, intermediatecatch, intermediatethrow and end events). All of these are implemented, including an extension in the InterMeditaCatch/Throw Event that contains a timerEventDefinition.

Within the timerEventDefinition if you include a exts:DateString element inside the bpmn:extensionselement and either define an attribute called Code or the Text inside that element, you can create a Timespan to delay the process. Below is an example:

bpmn:timerEventDefinition bpmn:extensionElements <exts:DateString Code="${departureDate} -30 day" /> </bpmn:extensionElements> </bpmn:timerEventDefinition>

This will delay that step by the DateTime process variable of departureDate less 30 days. The DateString processes itself similar to the PHP dateString, supporting things like now, +/- x (days,minutes,seconds), last, next, tomorrow, etc. Refer to the class Org.Reddragonit.BpmEngine.DateString to see more details.

and is it that i should change the <bpmn:boundaryEvent id="CustomTimeEvent" name="CustomTimeEvent" attachedToRef="Accept"> bpmn:outgoingFlow_0r2crex</bpmn:outgoing> <bpmn:timerEventDefinition id="TimerEventDefinition_0w6otis"> <bpmn:timeDuration xsi:type="bpmn:tFormalExpression">PT5S</bpmn:timeDuration> </bpmn:timerEventDefinition> </bpmn:boundaryEvent> to bpmn:exts? And assume i have a bussiness logic like user register to send check email every hour if not check,should i have to Implement or use a job to achrive this timeEventDuration?

cjmld5 avatar Mar 04 '22 03:03 cjmld5

After doing some code analysis, I have determined that that component is not implemented. In order to implement it properly, its going to take some time, approx 50-60 man hours. Its also going to have me implement additional components to better handle message style events (including errors), and possibly create some breaking changes for the current delegate version. This is going to be tagged in the branch 2.0 and will take some time before implementation and testing is complete. That being said, until these features have been fully implemented and tested I cannot answer the other question with respect to process design.

roger-castaldo avatar Mar 07 '22 16:03 roger-castaldo

After doing some code analysis, I have determined that that component is not implemented. In order to implement it properly, its going to take some time, approx 50-60 man hours. Its also going to have me implement additional components to better handle message style events (including errors), and possibly create some breaking changes for the current delegate version. This is going to be tagged in the branch 2.0 and will take some time before implementation and testing is complete. That being said, until these features have been fully implemented and tested I cannot answer the other question with respect to process design.

Here i see the branch 2.0 history commits,thanks for your apply and your efforts. And should i have to close this issue or waiting for to cpmplete?

cjmld5 avatar Mar 11 '22 01:03 cjmld5

Please leave this issue open as I am still implementing the branch and will close it once the branch is completed and tested.

roger-castaldo avatar Mar 12 '22 21:03 roger-castaldo

2.0 has been implemented to the point where beta testing needs to occur. I will be deploying it as an in test nuget package sometime over the next few days. I have also updated the wiki to reflect the usage of 2.0 which includes some new concepts for how to handle a process and process instance in order to create some cleaner and more seperated code

roger-castaldo avatar Mar 28 '22 20:03 roger-castaldo

2.0 has been implemented to the point where beta testing needs to occur. I will be deploying it as an in test nuget package sometime over the next few days. I have also updated the wiki to reflect the usage of 2.0 which includes some new concepts for how to handle a process and process instance in order to create some cleaner and more seperated code

thanks for your efforts! and where can we see the wiki?

cjmld5 avatar Apr 25 '22 08:04 cjmld5

https://github.com/roger-castaldo/BPMEngine/wiki

roger-castaldo avatar Apr 25 '22 18:04 roger-castaldo

https://github.com/roger-castaldo/BPMEngine/wiki

yes it is! but i can not find the newly updated wiki to see the usage of 2.0, is that something misunderstand with me?

cjmld5 avatar Apr 27 '22 01:04 cjmld5

That wiki is the 2.0 usage, I orer wrote the original wiki with the new one using the 2.0 version, I know it was kind of dumb on my part to do that as 2.0 isn't the official version of it yet but I honestly was hoping my testing would be further along to deploy it as the official version than it is.

roger-castaldo avatar Apr 27 '22 15:04 roger-castaldo