用序列图绘制调用流程会导致歧义
我想画一个序列图,
A -> B.run()
B.run() -> B.m1()
B.m1() -> B.m2()
到目前为止我已经想出了这些。
http://i51.tinypic.com/eja5bl.jpg http://i52.tinypic.com/1449s3.jpg
但在这里我不能明确提及B.m2() 被 B.m1() 调用 相反,它看起来像 B.run() 串行调用 B.m1() 和 B.m2() 。
------------- 编辑 ----------------
这是我目前绘制的http://i55.tinypic.com/21276kk.jpg
SpiritAdapter -> SpiritEngine::run(spirit:string, method:string, args[])
SpiritEngine::run(spirit:string, method:string, args[]) -> SpiritEngine::executeLogic(spirit:string, method:string, args[])
SpiritEngine::executeLogic(spirit:string, method:string, args[]) -> SpiritEngine::spirit(spirit:string, method:string, args[])
SpiritEngine::spirit(spirit:string, method:string, args[]) -> new SpiritAbstractor
SpiritEngine::executeLogic(spirit:string, method:string, args[]) -> SpiritAbstractor::method(args)
SpiritEngine::run(spirit:string, method:string, args[]) -> SpiritEngine::storeXDO()
I want to draw a Sequence Diagram Where
A -> B.run()
B.run() -> B.m1()
B.m1() -> B.m2()
So far I've come up with these.
http://i51.tinypic.com/eja5bl.jpg
http://i52.tinypic.com/1449s3.jpg
But Here I cannot mention it clearly that B.m2() is called by B.m1()
Rather it looks like B.run() Calls both B.m1() and B.m2() serially.
------------- EDIT ----------------
This is What I Currently have drawn http://i55.tinypic.com/21276kk.jpg
Well Is my Current Diagram Okay ??
What I want is this. (Call Flow)
SpiritAdapter -> SpiritEngine::run(spirit:string, method:string, args[])
SpiritEngine::run(spirit:string, method:string, args[]) -> SpiritEngine::executeLogic(spirit:string, method:string, args[])
SpiritEngine::executeLogic(spirit:string, method:string, args[]) -> SpiritEngine::spirit(spirit:string, method:string, args[])
SpiritEngine::spirit(spirit:string, method:string, args[]) -> new SpiritAbstractor
SpiritEngine::executeLogic(spirit:string, method:string, args[]) -> SpiritAbstractor::method(args)
SpiritEngine::run(spirit:string, method:string, args[]) -> SpiritEngine::storeXDO()
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您可以在 B.m2() 上添加一个小条,然后放置一个自指向箭头,例如。
自传消息与递归调用
You can add a small bar over B.m2() and then place a self pointing arrow, for example.
Self message vs recursive call
uml 规范允许直观地显示嵌套调用:被调用的生命线应该覆盖在调用的生命线上。请参阅 此示例中的 certainAvailableReport() 调用。
当然,您的工具是否支持它是另一回事......
The uml spec allows for a nested call to be shown visually: the called lifeline should be overlaid on the calling lifeline. See e.g. determineAvailableReport() call in this example.
Whether your tool supports it of course is another matter...
假设 ObjectA 有 3 个方法,分别称为 MessageOne()、MessageTwo() 和 MessageThree()。
它们之间的关系如下所示。
使用 Enterprise Architect 如下图所示,如果您选择 MessageThree() 调用,您将获得提高激活级别的选项。
一旦您选择该选项(通过单击->箭头),您将获得满足调用堆栈序列图的精确图(如下所示)。
Lets say ObjectA has 3 methods called MessageOne(), MessageTwo() and MessageThree().
And the relation between them are shown below
Using Enterprise Architect as shown in the image below if you select MessageThree() call you will get an option to raise the activation level.
Once you choose that option(By clicking on -> arrow) you will get the exact diagram(Shown below) which satisfy sequence diagram of call stack.