Former vice president Walter F. Mondale confirmed his front-runner status by convincingly winning a presidential straw poll at the Massachusetts Democratic Convention today, while Sen. Alan Cranston (Calif.) won some political respect for his long-shot candidacy.

Also, in a demonstration that may have longer-range implications than this non-binding ballot exercise, the AFL-CIO showed itself able to hold its members in line behind its policy of non-commitment. This is vital to its hopes of uniting the federation to endorse a presidential candidate in December, before the first 1984 primaries and caucuses.

Mondale won 29.3 percent--1,013 votes--of the delegates here. The AFL-CIO delegates' vote for "Jobs" rather than for one of the candidates finished second with 25.6 percent (884 votes), with political observers agreeing that a sizable majority of the labor delegates are pro-Mondale.

Cranston, who invested considerable campaign time, money and staff work here in recent weeks, finished third with 16.9 percent (582 votes). Sen. John Glenn (Ohio) was fourth with 15.3 percent (528 votes) and Sen. Gary Hart (Colo.) came in fifth with 10.5 percent (362 votes).

"No preference" received 1.4 percent (50 votes), Sen. Ernest F. Hollings (D-S.C.) got 0.5 percent (17 votes) and former Florida governor Reubin Askew received 0.3 percent (12 votes).

Mondale did what a front-runner had to do in a vote that precedes the Massachusetts presidential primary by a full year. He won despite being deprived of his largest block of supporters--labor.

And Cranston did what a long shot has to do, working tirelessly and spending grandly--about $25,000, his aides said--to make the point that his candidacy should get serious consideration. He has been rated in the low single digits in national polls of Democrats' presidential preferences, and must overcome the fact that he is 68 and looks it.

Cranston said that today's result "demonstrates I am one of the top two or three candidates."

Glenn's strategists, who were the only ones to run a professional telephone bank to round up delegate support, took comfort from the fact that this convention is far more liberal than Massachusetts Democrats as a whole. In 1976, Sen. Henry M. Jackson (Wash.) won the presidential primary here, with George C. Wallace finishing third and Jimmy Carter fourth.

Hart aides comforted themselves by emphasizing that Cranston spent far more time and effort than they did.

"For the money invested, we did well," said Kathy Bushkin, adding that Hart spent no more than $7,000 here. " . . . I think Cranston helped himself in the short term. But we were more interested in building a base for the long term."

State AFL-CIO President Arthur Osborn was euphoric after the vote. He said that most of the 662 AFL-CIO delegates held firm on the "Jobs" vote and were joined by teachers and nuclear-freeze advocates.

"We have accomplished everything we set out to do, and we have not injured any candidate," he said. He added that when the Democratic candidates "fly across this great land of ours from now on, their copilot is going to be 'Jobs.' "

The convention was officially an "issues convention," but it inevitably was dominated by the straw vote. The balloting followed the candidates' addresses to the convention.

Mondale also won the oratorical honors--but the speechmaking talents of the others have improved markedly since the first forensics last year.

Mondale, his face florid and voice rising, pumped his fist in the air as he challenged President Reagan on a series of issues and worked to convince delegates that he is better than his lackluster performance indicated at the state Jefferson-Jackson Day dinner in Boston a month ago.

He captured the attention of an inattentive crowd and brought them to applause with his theatrically geared one-liners, before eventually losing momentum as his speech went on too long.

"Mr. President," he said, addressing his remarks to Ronald Reagan, "there are laws that force you to clean up toxic waste--and you refuse to enforce them."

Cranston pressed the central issue of his campaign--a freeze and reduction of nuclear arms, which is very popular with the convention delegates.

Glenn, whose speechmaking style has taken a grandiloquent leap forward in past months, hammered Reagan on unemployment.

"If the president really believes his program is working, let him talk to an American who isn't," he said.

Hart took a sardonic tack as he purported to make a case for the man who was not there--Reagan. The reason the president says America needs so many missiles, he explained, is that "our good missiles are more productive than their evil missiles."

Mondale spent much of the afternoon before the vote in a trailer adjacent to the convention floor, trying to convert labor delegates. In the morning, at a caucus of the AFL-CIO delegates, he made only an oblique appeal.

"I know you'll do what's right, and I'll love you either way," he said. "But if a couple of you happen to vote for Walter Mondale, I won't hold it against you."

Earlier, appearing at a black and Hispanic caucus, Mondale said, "I submit there's no candidate running for president who's got a better civil rights record . . . who has been there when it counted, when it was tough . . . than Walter Mondale."