Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
828 views
in Technique[技术] by (71.8m points)

uml - Activity Diagram Timed Event

I'm trying to model the following: When filling out a submission form, the system automatically saves the users progress every 5 minutes.

This is what I tried, but I don't think it's correct.

In my case the condition is asked only after the "fill submission" activity is finished. Also I don't want to indicate, that the user is starting the "fill submission" activity again.

question from:https://stackoverflow.com/questions/65864533/activity-diagram-timed-event

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

You would use an interruptible region represented by a dashed line box:

enter image description here

The timer interrupt appears independently and intrerrupts the current action. Auto save is executed and comes back with Fill form. Resuming Fill form need a bit of thought since usually you have some entry code which must not be executed in case of a continuation. That might be a bit more tricky as you would likely need a mutex for that.

UML 2.5 has a detailed description in chap. 15.6.3.2 Interruptible Activity Regions on pp. 405.


Just a word about your approach. The save is only executed when the form is closed. So if it takes longer than 5 minutes you end up in your form again which is likely not desired :-)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

57.0k users

...