OTTAWA -- Members of Parliament have finally come up with a process for dealing with sexual harassment complaints between MPs.

The code of conduct, proposed by the Commons committee on procedural and House affairs, comes months after Parliament Hill was rocked by complaints of sexual harassment levelled by two female New Democrat MPs against two Liberal colleagues.

In the absence of a process to deal with such complaints, Liberal Leader Justin Trudeau suspended Scott Andrews and Massimo Pacetti from his caucus last November.

The pair were left in limbo for months, their reputations in tatters, while the Liberals and NDP wrangled over how the matter should be resolved.

Eventually, Trudeau hired an outside expert in harassment to investigate the complaints.

On the basis of her report, which was never made public, Pacetti and Andrews both voluntarily quit the Liberal caucus permanently in March, rather than wait to get the boot.

The proposed new process would give MPs in future a road map to follow to avoid a similar ad hoc mess arising.

It would go into effect in the next session of Parliament after the Oct. 19 election and it would apply only to allegations of non-criminal sexual harassment between MPs. Any potentially criminal offences are to be referred to the police.

The proposal includes a pledge to be signed by each MP, committing to create a "work environment free of sexual harassment" and to follow the code of conduct.

The code defines harassment broadly as "unwanted conduct of a sexual nature that detrimentally affects the work environment."

The process for dealing with harassment allegations would be strictly confidential and complainant-driven, aimed at making victims feel safe in coming forward and ending only when they're satisfied.

As a first step, the chief human resources officer for the House of Commons or a party whip would be the first person to receive a complaint. Mediation would be offered at all stages in the process.

Should mediation fail and a formal complaint be filed, the human resources officer would, with the consent of the complainant, initiate an investigation, which could include retaining the services of an outside expert.

In cases where a complaint is substantiated, or where the complaint is found to be frivolous and vexatious, the aggrieved party could demand further disciplinary action.

If the pertinent party whip did not mete out discipline to the satisfaction of the complainant, the matter could then be referred to the procedure and House affairs committee and, if need be, the House of Commons itself.

However, a complainant who chose that final recourse would necessarily sacrifice confidentiality.