20

i am not able to discover how to use the alt/combined fragment correctly in starUML,as in there is no way that i am able to provide the condition after the alt fragment appears.can any1 just list down the procedure as to how to do it or a link to some good tutorial.

arinjita paul
  • 201
  • 1
  • 2
  • 4

5 Answers5

27

If you are using StarUML 2 (Beta), you can go through these simple steps:

  1. Add Combined fragment to your sequence diagram:

Initial View after adding combined fragment

  1. If you try to add operand(alt partition) through context menu, you'll see that there's no option to add new operand:

No option to add operand in starUML 2 Beta

3.To achieve this, you can simple copy the already defined operand and paste it under Combined Fragment:

Copying Operand in starUML 2 Beta

Pasting operand in starUML 2 Beta

  1. After that, simply add condition clauses in "guard" property of operands and adjust operand heights:

Alt implemented in sequence diagram

Haider7
  • 409
  • 4
  • 3
  • You can double click on the combined fragment and there will be one button, after clicking it you can add one operand. No need to manually copy and paste. – Hustlion Jun 12 '17 at 06:46
  • Just a note: In my version 3.1.1, they provides the option to add new operand in your step 2. – Rainning Dec 26 '19 at 01:07
11

I had just found the steps as following. Please refer how to set "alt combinedFragment at starUML due to I have no 10 reputation to post image.

1.create a sequence diagram.

2.add a CombinedFragment1 into diagram.

3.change the "seq CombinedFragment1 " to "alt CombinedFragment1 "

4.select the "Interaction Operand"

5.left-click at the "atl CombinedFragment1 ",you will found the one "InteractionOperand1" added into the "alt CombinedFragment1 ".

6.add the 2nd "InteractionOperand", same with step 4,step5, there will a parting line like the following.

7.set the InteractionOperand's Guard data,my is "isInit",you will found it at the alt frame.

8.add the 2nd Guard data,same with the step7.

9.move the diagram to the proper location.

while,I still have something unknown, for example, how to make the frame located at the top front and add a relationship with the "B method". Wish it helpful to u.

Jue
  • 111
  • 1
  • 3
  • 1
    In short, we have to drag the Interaction Operand from the tool box and drop it onto Combined Fragment, instead of using right-click submenu feature that only adds the element logically but not visually. –  Jan 24 '14 at 01:17
6

Add an Interaction Operand to a Combined Fragment. When you select the Interaction Operand you should see in the Properties Inspector a 'Guard' field. You can type your condition just there.

jszpilewski
  • 1,584
  • 1
  • 20
  • 17
5

Many thanks for your posts.

By the way, I noticed when adding a Combined Fragment from the left Pane,

enter image description here

that the alt keyword could be displayed as shown below,

enter image description here

after selecting the interactionOperator from the right pane,

enter image description here

NB: other useful keywords such as the "loop" one are also available from the above list

user5427065
  • 61
  • 1
  • 2
3
  • When you add a 'Combined Fragment' double click on the name on the diagram
  • Then you get a small icon with 3 horizontal lines to the left of the name
  • When you click on that you can get as much interaction operands as you wish