Histórico da Página
...
Abaixo é apresentado os modelos para utilização em cada um dos eventos:
Bloco de código | ||
---|---|---|
| ||
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"; } |
...
É possível consultar o campo Observação de uma solicitação de processo, verificando se ele foi preenchido ou não. Para isto, é necessário validar a propriedade WKUserComment no evento beforeTaskSave ou no evento beforeCancelProcess. Exemplo:
Bloco de código | ||
---|---|---|
| ||
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"; } } |
Visão Geral
Import HTML Content
Conteúdo das Ferramentas
Tarefas