Árvore de páginas

Versões comparadas

Chave

  • Esta linha foi adicionada.
  • Esta linha foi removida.
  • A formatação mudou.

...

Bloco de código
languagejs
linenumberstrue
function beforeStateEntry(sequenceId) {
	var activity = getValue("WKNumState");
	if (activity == 0 || activity == 1) {
		//Outra condição.
		throw "TRATAMENTO DE EXCEÇÃO";
	}
}

function beforeTaskSave(colleagueId, nextSequenceId, userList) {
	var activity = getValue("WKNumState");
	if (activity != 0 && activity != 1) {
		//Outra condição
		throw "TRATAMENTO DE EXCEÇÃO";
	}
}

function beforeCancelProcess(colleagueId, processId) {
	//Condição.
	throw "TRATAMENTO DE EXCEÇÃO";
}

...

Bloco de código
languagejs
linenumberstrue
function beforeTaskSave(colleagueId, nextSequenceId, userList) {
	if (getValue("WKUserComment") == null || getValue("WKUserComment") == "") {
		throw "A observação deve ser preenchida";
	}	
}

function beforeCancelProcess(colleagueId, processId) {
	if (getValue("WKUserComment") == null || getValue("WKUserComment") == "") {
		throw "A observação deve ser preenchida";
	}	
}