| 1 | = Tutorial de Desenvolvimento de um Processo Simples = |
| 2 | [[WikiInclude(WF/tableofcontents)]] |
| 3 | == Codificar os Templates == |
| 4 | Ainda na interface de edição de código, clique na aba 'templates'. Para cada template insira o código abaixo. Pode-se copiar e colar o código. |
| 5 | |
| 6 | '''templates/Avaliar.tpl''' |
| 7 | |
| 8 | {{{ |
| 9 | |
| 10 | {include file="info_solicitacao.tpl"} |
| 11 | |
| 12 | <br> |
| 13 | <input type="submit" name="action" value="Aprovar" /> |
| 14 | <input type="submit" name="action" value="Rejeitar" /> |
| 15 | |
| 16 | }}} |
| 17 | |
| 18 | '''templates/Compor_Solicitao.tpl''' |
| 19 | |
| 20 | {{{ |
| 21 | |
| 22 | <table> |
| 23 | <tr> |
| 24 | <td><label>Título</label></td> |
| 25 | <td><input type="text" name="titulo" value="{$titulo}" /></td> |
| 26 | </tr> |
| 27 | <tr> |
| 28 | <td><label>Descrição</label></td> |
| 29 | <td><textarea name="descricao">{$descricao}</textarea></td> |
| 30 | </tr> |
| 31 | </table> |
| 32 | |
| 33 | <input type="submit" name="action" value="Enviar" /> |
| 34 | |
| 35 | }}} |
| 36 | |
| 37 | '''templates/Executar.tpl''' |
| 38 | |
| 39 | {{{ |
| 40 | |
| 41 | {include file="info_solicitacao.tpl"} |
| 42 | |
| 43 | <br/> |
| 44 | |
| 45 | <strong>Procedimento Executado:</strong><br/> |
| 46 | <textarea name="procedimento" cols="50" rows="7"></textarea><br/> |
| 47 | <input type="submit" name="action" value="Finalizar" /> |
| 48 | |
| 49 | }}} |
| 50 | |
| 51 | '''templates/Informar_Resultado.tpl''' |
| 52 | |
| 53 | {{{ |
| 54 | |
| 55 | {include file="info_solicitacao.tpl"} |
| 56 | <br/> |
| 57 | <table> |
| 58 | <tr> |
| 59 | <td><strong>Mensagem</strong></td> |
| 60 | <td>{$mensagem|nl2br}</td> |
| 61 | <tr> |
| 62 | </table> |
| 63 | |
| 64 | <input type="submit" name="action" value="Encerrar" /> |
| 65 | |
| 66 | }}} |
| 67 | |
| 68 | '''templates/info_solicitacao.tpl''' |
| 69 | |
| 70 | Por padrão, o Workflow cria um arquivo tpl para cada atividade interativa do processo. O arquivo info_solicitacao.tpl não corresponde a uma atividade, mas sim a um trecho de código que será incluído em outros arquivos tpl. Por isso, não estará na lista de arquivos já existentes, e deverá ser criado da seguinte maneira: |
| 71 | |
| 72 | 1 - Clique no botão 'Novo template'; |
| 73 | |
| 74 | 2 - Escolha a opção 'em_branco.tpl'; |
| 75 | |
| 76 | 3 - Informe o nome do arquivo e clique em OK |
| 77 | |
| 78 | 4 - Inclua o código abaixo |
| 79 | |
| 80 | {{{ |
| 81 | |
| 82 | <table> |
| 83 | <tr> |
| 84 | <td><strong>Solicitante</strong></td> |
| 85 | <td>{$solicitante_desc}</td> |
| 86 | </tr> |
| 87 | <tr> |
| 88 | <td><strong>Data</strong></td> |
| 89 | <td>{$data}</td> |
| 90 | </tr> |
| 91 | <tr> |
| 92 | <td><strong>Título</strong></td> |
| 93 | <td>{$titulo}</td> |
| 94 | </tr> |
| 95 | <tr> |
| 96 | <td><strong>Descrição</strong></td> |
| 97 | <td>{$descricao|nl2br}</td> |
| 98 | </tr> |
| 99 | </table> |
| 100 | |
| 101 | }}} |
| 102 | ---- |
| 103 | {{{ |
| 104 | #!html |
| 105 | <a href="http://www.expressolivre.org/dev/wiki/WF/Tutorialdedesenvolvimentodeumprocessosimples">1. Introdução</a><br> |
| 106 | <a href="http://www.expressolivre.org/dev/wiki/WF/tutorialespecificacao">2. Especificação</a><br> |
| 107 | <a href="http://www.expressolivre.org/dev/wiki/WF/tutorialprojeto">3. Projeto</a><br> |
| 108 | <a href="http://www.expressolivre.org/dev/wiki/WF/tutorialfluxo">3.1. Criar o Fluxo</a><br> |
| 109 | <a href="http://www.expressolivre.org/dev/wiki/WF/tutorialprocesso">3.2. Criar o Processo</a><br> |
| 110 | <a href="http://www.expressolivre.org/dev/wiki/WF/tutorialativtrans">3.3. Criar as Atividades / Transições / Perfis</a><br> |
| 111 | <a href="http://www.expressolivre.org/dev/wiki/WF/tutorialperfis">3.4. Mapear os Perfis</a><br> |
| 112 | <a href="http://www.expressolivre.org/dev/wiki/WF/tutorialimplementação">4. Implementação</a><br> |
| 113 | <a href="http://www.expressolivre.org/dev/wiki/WF/tutorialatividades">4.1. Codificar as Atividades</a><br> |
| 114 | <a href="http://www.expressolivre.org/dev/wiki/WF/tutorialtemplates">4.2. Codificar os Templates</a><br> |
| 115 | <a href="http://www.expressolivre.org/dev/wiki/WF/tutorialincludes">4.3. Codificar os Includes</a><br> |
| 116 | <a href="http://www.expressolivre.org/dev/wiki/WF/tutorialfinalizacao">5. Finalização</a> |
| 117 | }}} |