Generally speaking bees only attack when they feel threatened or protecting their hives.
Apis dorsata has been described as one of the most dangerous animals of the southeastern Asian jungles due to their threatening defensive behaviors. It is considered the most defensive of all of the honey bees, even more defensive than the African honey bee (Ellis and Ellis 2009; Hall et al. 1995). Their main weapons are stingers that are up to 3 mm long and easily penetrate clothing and even the fur of a bear. Attached to the stingers are large venom glands with accompanying muscles that pump the venom into the skin, thus delivering a painful sting. Large numbers of Apis dorsata attack a perceived threat, though only a few provide the painful stings because the bees will die shortly after stinging. The other bees will buzz loudly and bite the threat to deter the threat, without risking the life of many individuals.
The best possible thing to do is to flee the area as safely and quickly as possible until you either reach some sort of shelter (car) or gained enough distance from the place of the attack that the bees are no longer a threat.
The USDA has some general guidelines as what to do when attacked with Africanized Honey Bees and this what I believe should be employed when dealing with Apis dorsata.
RUN away quickly. Do not stop to help others. However, small children and the disabled may need some assistance.
As you are running, pull your shirt up over your head to protect your face, but make sure it does not slow your progress. This will help keep the bees from targeting the sensitive areas around your head and eyes.
Continue to RUN. Do not stop running until you reach shelter, such as a vehicle or building. A few bees may follow you indoors. However, if you run to a well-lit area, the bees will tend to become confused and fly to windows. Do not jump into water! The bees will wait for you to come up for air. If you are trapped for some reason, cover up with blankets, sleeping bags, clothes, or whatever else is immediately available.
Do not swat at the bees or flail your arms. Bees are attracted to movement and crushed bees emit a smell that will attract more bees.
Once you have reached shelter or have outrun the bees, remove all stingers. When a honey bees stings, it leaves its stinger in the skin. This kills the honey bee so it can't sting again, but it also means that venom continues to enter into the wound for a short time.
Do not pull stingers out with tweezers or your fingers. This will only squeeze more venom into the wound. Instead, scrape the stinger out sideways using your fingernail, the edge of a credit card, a dull knife blade or other straight-edged object.
If you see someone being attacked by bees, encourage them to run away or seek shelter. Do not attempt to rescue them yourself. Call 911 to report a serious stinging attack. The emergency response personnel in your area have probably been trained to handle bee attacks.
If you have been stung more than 15 times, or are feeling ill, or if you have any reason to believe you may be allergic to bee stings, seek medical attention immediately. The average person can safely tolerate 10 stings per pound of body weight. This means that although 500 stings can kill a child, the average adult could withstand more than 1100 stings. - USDA
Be prudent when coming to the aid of someone who is the victim of bee attacks:
(Apis dorsata) attacks are also escalated by pheromones. When a bee stings, it not only injects toxins into the victim, it also releases alarm pheromones. When these chemical signals are given off near a hive or swarm, they can trigger other bees to come to their colony mate's defense, often attacking until the victim flees or is killed.
When one person comes to another victim's aid, the bees will sometimes turn on the newcomer, according to the U.S. Department of Agriculture. In this way, bee attacks can escalate and spread.
According to Thomas Seeley, an apiologist at Cornell University who studies swarm intelligence, the species involved in the attack was most likely the giant honey bee, Apis dorsata, which is common in Thailand. "It has been described as the most ferocious stinging insect on earth, but it attacks only when disturbed. In Thailand, I've seen these bees fly down and attack boys who had thrown rocks at their nests. Perhaps something like this provoked the bees to attack," Seeley told Life's Little Mysteries. - Giant Bee Swarm Attacks Dozens of Buddhist Monks