Conditional Statement in Data Flow Diagram?

Adan picture Adan · Feb 20, 2012 · Viewed 12.4k times · Source

Is it allowed to create a conditional statement in DFD? Is there a need to show validation and conditional statements when making a DFD or its just the flow of data?

Like for example, when creating a DFD for a login page in a web-based application, am I going to show if the user is valid or not?

Answer

Martin Drautzburg picture Martin Drautzburg · Apr 29, 2013

In general DFDs do not show conditionals as such, neither do they show the location where a process is executed or the sequence of operations. You need to see DFDs like functions, which return something based on their input parameters.

A login screen would then most likely be a process which reads user credentials and returns a user-id or nothing in case the user is invalid. You may see two outgoing flows in cases you want to do something special in case the user is invalid. Or it may return a reason why a user is invalid (unknown user, wrong password, account expired). Clarifying these things is the purpose of DFD modelling, so the answers depend on your project.

In general one must resist the temptation to add too much detail to DFDs.