Author Topic: Nested if statement [Activity diagram Code generation]  (Read 1842 times)

Yel

  • EA Novice
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
Nested if statement [Activity diagram Code generation]
« on: June 07, 2016, 12:02:35 pm »
I have made an UML Activity Diagram where there are expected nested if statements.
But when generated as c source.... it is not as what to expected.

Example: [START]→ [DECISION1]→ (YES)
                                                     → [NO]→ [DECISION2]→ (YES)
                                                                                        → [NO]→ [DECISION3]→ (YES)  ↓
                                                                                                                           → [NO]→ [END]

With that my interpretation of the output would be
if (DECISION)
{
      YES
}
else if (DECISION]
{
      YES
}
else if (DECISION3)
{
      YES

}
else
{

}

but output of code generation is not right.
Output for this sample is Decision1 Yes only.
No if statement in the code.

Please help me

KP

  • EA Administrator
  • EA Expert
  • *****
  • Posts: 2464
  • Karma: +30/-2
    • View Profile
Re: Nested if statement [Activity diagram Code generation]
« Reply #1 on: June 07, 2016, 01:32:04 pm »
It's possible that none of the resident experts on this forum have used the activity diagram code generation, in which case you may need to contact Sparx support directly to get an answer. There is a link to support at the bottom of this page.
The Sparx Team
support@sparxsystems.com

Helmut Ortmann

  • EA User
  • **
  • Posts: 909
  • Karma: +38/-1
    • View Profile
Re: Nested if statement [Activity diagram Code generation]
« Reply #2 on: June 22, 2016, 03:13:14 pm »
Hello,

it would be a good idea to publish your experiences with Code generation on the Forum or on the Community.

Sorry, I have no great experiences in code generation with Activity Diagrams. I have made a lot of specifications and used Notes/Tagged values in addition to visualize/specify details.

Personally I doubt that today there is a feasable way to generate code for a more complex problem.

It would be great to here about such things (Experiences about code generation from Activity Diagrams, best practices or so).

Helmut
Coaching, Training, Workshop (Addins: hoTools, Search&Replace, LineStyle)