The rules for an attack are the following:
Whether you're attacking with a melee weapon, firing a ranged weapon or make an attack roll as part of a spell, an attack has a simple structure.
Choose a goal. Choose a target within the range of your attack: a creature, an object or a location.
Determine modifiers. The DM determines if the objective is covered and if it has an advantage or disadvantage against the objective. In addition, spells, special abilities and other effects may apply penalties or bonuses to your attack roll.
Resolve the attack. You roll the attack. In a stroke, you roll damage, unless the particular attack has rules that specify otherwise. Some attacks cause special effects in addition to or instead of damage.
If there is ever any doubt about whether something you are doing counts as an attack, the rule is simple: If you are making an attack roll, you are making an attack.
As you can see, if something involves an attack roll, it is an attack. Choose a target for the attack, determine the relevant modifiers for the attack roll and resolve the attack (making the attack roll, seeing if it hits, and damages and resolves any other effect).
the explosive explosion Cantrip consists of at least one attack roll, of course, but at level 5 and above, it consists of several attack rolls:
A bolt of crackling energy strikes a creature within reach. Perform a remote spell attack against the target. In one hit, the target suffers 1d10 of force damage.
The spell creates more than one beam when you reach higher levels: two beams at level 5, three beams at level 11 and four beams at level 17. You can direct the beams towards the same or different targets. Make a separate attack roll for each ray.
Obviously, at level 1-4, it is clearly an attack. Now the question is: at level 5 and above, is it considered an attack or multiple attacks?
By default, anything that consists of multiple attack rolls consists of multiple attacks. This is clear when observing the rules for an attack mentioned above; It is a sequence of pointing at something, determining your modifiers and making and solving the attack roll.
Unless otherwise indicated, anything involving multiple attack rolls, including explosive explosion for higher level characters: generally, you must go through this process, step by step, for each attack. Rule designer Jeremy Crawford seems to support this claim in your response to a related tweet in an unofficial June 2015 tweet:
Eldritch Blast: Are attacks resolved in parallel or in sequence? Do you have to choose all the objectives first before shooting?
Multiple attacks on the same turn are not simultaneous, unless a characteristic or spell indicates otherwise.
Clearly, every beam of explosive explosion go through the steps of "making an attack" from the beginning, one after another; choose a target for each ray, determine modifiers (although this will surely be the same for each ray unless something grants advantage / disadvantage in a single attack) and resolves each attack separately.
Crawford also unofficially addressed this claim in Your answer to another tweet asking exactly about this in September 2014:
Was it intended for Eldritch Blast to be considered an attack with multiple attack rolls and, therefore, activate Hax only once?
The hex is fired every time you hit the spellbound target, so the explosive explosion can fire it on every hit.
the hex the spell (PHB, p. 251) says:
Until the spell ends, you deal 1d6 additional necrotic damage to the target every time you hit him with an attack.
As Crawford says, hex Makes every attack of yours that hits inflicts additional damage. On higher levels, explosive explosion It consists of multiple beams, each with a separate attack roll. Yes, as Crawford says, explosive explosion triggers the additional damage of hex on every hit, then, of necessity, every beam of explosive explosion it must be a separate attack (as part of the same spell).
Finally we can compare explosive explosion to a different feature that is considered as "an attack" despite having multiple attack rolls, according to the Compendium of wise tips: the Whirlwind attack characteristic of the Ranger Hunter.
Can a ranger move between the attack rolls of the Whirlwind attack function?
No. Whirlwind Attack is unusual, since it is a single attack with multiple attack rolls. In most other cases, an attack has an attack roll. The rule about moving between attacks (PH, 190) allows you to move between weapon attacks, not between attack rolls of an exceptional feature like Whirlwind Attack.
So, if Whirlwind Attack consists of multiple attack rolls, why is it considered a "single attack", and what makes it exceptional or different from other things with multiple attack rolls?
To answer that, we must look at the description of the function. The Whirlwind attack option of the Hunter Ranger for its multiple attack feature says:
You can use your action to do a melee attack against any number of creatures within 5 feet of you, with a separate attack roll for each target.
Note that the other option for the multiple attack function, Volley, appears to be similarly worded:
You can use your action to do a ranged attack against any number of creatures within 10 feet of a point that you can see within the range of your weapon. You must have ammunition for each objective, as usual, and you make a separate attack roll for each target.
Whirlpool attack, like explosive explosion, consists of a separate attack roll for each target. However, the key difference seems to be that the feature itself says that you make a "melee attack" (singular) against multiple creatures, rather than "melee attacks" (plural).
The same is true for Volley, except that it says "a ranged attack" (still singular); Although not mentioned in the SAC ruling, Crawford confirmed that it is also considered a single attack in This unofficial September 2014 tweet.
It is definitely a bit strange of writing, but it is the only exceptional feature. The distinction cannot depend on what remains undeclared; there are no secret rules. Therefore, what marks Whirlwind Attack and Volley as "a single attack" should be the fact that they tell you to make an "attack (melee / ranged)", despite targeting several creatures.
Otherwise, each spell that consisted of multiple attack rolls, such as scorching rayor ray of chaos if the energy jumps, or any single-objective attack as part of a spell that then uses the metamagic option, the Sorcerer's Twin Spell, it could also be considered "a single attack" … which would make Whirlwind Attack (and Volley) very United Nationsexceptional.