a collection of tools to work with BPMN
Visit Read the Docs for the full documentation, including overviews and several examples.
A collection of tools to work with BPMN
License: MIT License
a collection of tools to work with BPMN
Visit Read the Docs for the full documentation, including overviews and several examples.
Describe the bug
I am trying to add the exclusive gateway in lane of department 2 but is added outside the pool. I have added the code for the same
To Reproduce
Code
from bpmn_tools.flow import Process, Flow, Lane
from bpmn_tools.flow import End,UserTask, ScriptTask, MessageFlow,SendTask,Task,ExclusiveGateway
from bpmn_tools.collaboration import Collaboration, Participant
from bpmn_tools.notation import Definitions
from bpmn_tools.diagrams import Diagram, Plane
from bpmn_tools.layout import simple
from bpmn_tools.util import model2xml
a=SendTask('A')
b=ScriptTask('B')
decision=ExclusiveGateway("Decision")
c=SendTask('C')
d=Task('D')
e=Task('E')
f=End('F')
lane1=Lane('Department 1')
lane2=Lane('Department 2')
lane1.append(a).append(c).append(d).append(e)
lane2.append(b).append(decision).append(f)
flow1=Flow(source=a,target=b)
flow2=Flow(source=b,target=decision)
flow3=Flow(source=decision,target=c,name='Yes')
flow4=Flow(source=decision,target=f,name='No')
flow5=Flow(source=c,target=d)
flow6=Flow(source=d,target=e)
process1=Process().append(lane1).append(lane2).append(flow1).append(flow2).append(flow3).append(flow4).append(flow5).append(flow6)
collaboration=Collaboration(id='Colaboration').extend([
Participant('Corporation ',process1,id="p1")
Participant('Employee',id='p2')
])
definitions = Definitions(id="definitions").extend([
process1,
collaboration
])
definitions.append(
Diagram(
id="diagram",
plane=Plane(id="plane", element=collaboration)
)
)
simple.layout(definitions)
print(model2xml(definitions))
Expected behavior
I have attached the diagram below .First one is the diagram produced using bpmn-tools and second one is the expected diagram prepared using graphical editor
Screenshots
Message flows arrows are not being correctly generated between empty and non-empty process.
To Reproduce
Code:
from` bpmn_tools.flow import Process, Flow, Lane,LaneSet
from bpmn_tools.flow import End,Start, ScriptTask, SendTask,Task,ExclusiveGateway,IntermediateCatch,IntermediateThrow,BoundaryEvent, MessageEventDefinition
from bpmn_tools.collaboration import Collaboration, Participant
from bpmn_tools.notation import Definitions
from bpmn_tools.diagrams import Diagram, Plane
from bpmn_tools.layout import simple
from bpmn_tools.util import model2xml
#creating activities gateways
a=SendTask('A')
b=ScriptTask('B')
decision=ExclusiveGateway("Decision")
decision2=ExclusiveGateway("Decision2")
decision3=ExclusiveGateway("Decision3")
c=SendTask('C')
d=Task('D')
e=Task('E')
f=End('F')
g=Task('G')
h=Task('H')
i=End('I')
#creating events
message1=MessageEventDefinition(id="message1")
message2=MessageEventDefinition(id="message2")
message3=MessageEventDefinition(id="message3")
a1=Start(id="event1",definition=message1,name="a1")
a2=IntermediateThrow(id="event2",definition=message2,name="a2")
a3=IntermediateThrow(id="event3",definition=message3,name="a3")
#creating lanes
lane1=Lane('Department 1')
lane2=Lane('Department 2')
#appending activities gateways and events to the lanes
lane1.append(a1).append(a).append(c).append(d).append(e).append(decision2).append(h).append(g).append(a3).append(i)
lane2.append(b).append(decision).append(a2).append(decision3).append(f)
#creating edges
flow0=Flow(source=a1,target=a)
flow1=Flow(source=a,target=b)
flow2=Flow(source=b,target=decision)
flow3=Flow(source=decision,target=c,name='Yes')
flow4=Flow(source=decision,target=a2,name='No')
flow5=Flow(source=c,target=d)
flow6=Flow(source=d,target=e)
flow7=Flow(source=e,target=decision2)
flow8=Flow(source=decision2,target=g,name='Yes')
flow9=Flow(source=decision2,target=h,name='No')
flow10=Flow(source=g,target=a3)
flow11=Flow(source=decision3,target=f)
flow12=Flow(source=h,target=decision3)
#intermediate events flow
flow13=Flow(source=a2,target=decision3)
flow14=Flow(source=a3,target=i)
#appending lanes flows and activities to the process
process1=Process().append(lane1).append(lane2).append(flow0).append(flow1).append(flow2).append(flow3).append(flow4).append(flow5).append(flow6).append(flow7).append(flow8).append(flow9).append(flow10).append(flow11).append(flow12).append(flow13).append(flow14)
process2=Process()
collaboration=Collaboration(id='Colaboration').extend([
Participant('Corporation ',process1,id="p1"),
Participant('External StakeHolder',process2,id="p2")
#,MessageFlow(source=process2, target=a1),
#MessageFlow(source=d, target=process2),
#MessageFlow(source=a2, target=process2)
])
definitions = Definitions(id="definitions").extend([
process1,
collaboration,
])
definitions.append(
Diagram( id="diagram", plane=Plane(id="plane", element=collaboration) )
)
simple.layout(definitions)
print(model2xml(definitions))`
Describe the bug
I am trying to add task type instead of simple tag in Branch inside a process .Code instead of producing correct diagram is producing bug
Code
Code using BPMN to produce the bug
from bpmn_tools.builder.process import Process, Task, Branch, BranchKind, If
from bpmn_tools import flow
from bpmn_tools.flow import UserTask
from bpmn_tools.colors import Green, Blue, Red, Orange
from bpmn_tools.util import model2xml
process=Process([
Task(name='Help'),
Branch([Task(name='Branch one a'),Task(name='Branch one b')],kind=BranchKind.AND),
Branch([Task(name='Branch nested before'),Branch([UserTask(name='Inside nested branch')],kind=BranchKind.XOR),Task(name='Branch nested after')],kind=BranchKind.OR)
],name='Some random process',starts=True,ends=True)
model=process.render()
definations=model2xml(model)
Expected behavior
I am expecting this diagram
Original behavior
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.