source: publico/ILPortal/trunk/Extensions/InstallWorkflows.py @ 2547

Última Alteração nesse arquivo desde 2547 foi 2547, incluída por paulovieira, 13 anos atrás

correção na busca de conteudo das casas

File size: 2.9 KB
Linha 
1# -*- coding: utf-8 -*-
2#
3# File: ILPortal.py
4#
5# Copyright (c) 2006 by Interlegis
6# Generator: ArchGenXML Version 1.5.0 svn/devel
7#            http://plone.org/products/archgenxml
8#
9# GNU General Public License (GPL)
10#
11# This program is free software; you can redistribute it and/or
12# modify it under the terms of the GNU General Public License
13# as published by the Free Software Foundation; either version 2
14# of the License, or (at your option) any later version.
15#
16# This program is distributed in the hope that it will be useful,
17# but WITHOUT ANY WARRANTY; without even the implied warranty of
18# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19# GNU General Public License for more details.
20#
21# You should have received a copy of the GNU General Public License
22# along with this program; if not, write to the Free Software
23# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
24# 02110-1301, USA.
25#
26
27__author__ = """STC Interlegis <admin-stc@interlegis.gov.br>"""
28__docformat__ = 'plaintext'
29
30
31from Products.CMFCore.utils import getToolByName
32from Products.ExternalMethod.ExternalMethod import ExternalMethod
33
34##code-section module-header #fill in your manual code here
35##/code-section module-header
36
37def installWorkflows(self, package, out):
38    """Install the custom workflows for this product."""
39
40    productname = 'ILPortal'
41    workflowTool = getToolByName(self, 'portal_workflow')
42
43    ourProductWorkflow = ExternalMethod('temp', 'temp',
44                         productname+'.'+'solicitacao_folder_workflow',
45                         'createsolicitacao_folder_workflow')
46    workflow = ourProductWorkflow(self, 'solicitacao_folder_workflow')
47    workflowTool._setObject('solicitacao_folder_workflow', workflow)
48    workflowTool.setChainForPortalTypes(['SolicitacaoFolder'], workflow.getId())
49
50    ourProductWorkflow = ExternalMethod('temp', 'temp',
51                         productname+'.'+'solicitacao_workflow',
52                         'createsolicitacao_workflow')
53    workflow = ourProductWorkflow(self, 'solicitacao_workflow')
54    workflowTool._setObject('solicitacao_workflow', workflow)
55    workflowTool.setChainForPortalTypes(['Solicitacao'], workflow.getId())
56
57    ##code-section after-workflow-install #fill in your manual code here
58    ourProductWorkflow = ExternalMethod('temp', 'temp',
59                         productname+'.'+'portal_workflow',
60                         'createPortal_workflow')
61    workflow = ourProductWorkflow(self, 'ilportal_workflow')
62    workflowTool._setObject('ilportal_workflow', workflow)
63    ##/code-section after-workflow-install
64
65    return workflowTool
66
67def uninstallWorkflows(self, package, out):
68    """Deinstall the workflows.
69
70    This code doesn't really do anything, but you can place custom
71    code here in the protected section.
72    """
73
74    ##code-section workflow-uninstall #fill in your manual code here
75    ##/code-section workflow-uninstall
76
77    pass
Note: Veja TracBrowser para ajuda no uso do navegador do trac.
 

The contents and data of this website are published under license:
Creative Commons 4.0 Brasil - Atribuir Fonte - Compartilhar Igual.