[Zope3-checkins] CVS: Zope3/lib/python/Zope/App/Workflow - IWorkflowHistoryStorage.py:1.1.2.1 IWorkflowNode.py:1.1.2.1 IWorkflowProcessDefinition.py:1.1.2.1 IWorkflowProcessInstanceStorage.py:1.1.2.1 IWorkflowTransition.py:1.1.2.1 IWorkflowWorkitemStorage.py:1.1.2.1 IWorkflowWorklistHandler.py:1.1.2.1 IWorkflowProcessInstance.py:1.2.24.1 IWorkflowWorkitem.py:1.2.24.1 IWorkflowActivityInfo.py:NONE IWorkflowEngine.py:NONE IWorkflowEvents.py:NONE WorkflowActivityInfo.py:NONE WorkflowEvents.py:NONE

Vincenzo Di Somma e.disomma@icube.it
Tue, 3 Dec 2002 10:35:49 -0500


Update of /cvs-repository/Zope3/lib/python/Zope/App/Workflow
In directory cvs.zope.org:/tmp/cvs-serv9118

Modified Files:
      Tag: sprintathon-wf-branch
	IWorkflowProcessInstance.py IWorkflowWorkitem.py 
Added Files:
      Tag: sprintathon-wf-branch
	IWorkflowHistoryStorage.py IWorkflowNode.py 
	IWorkflowProcessDefinition.py 
	IWorkflowProcessInstanceStorage.py IWorkflowTransition.py 
	IWorkflowWorkitemStorage.py IWorkflowWorklistHandler.py 
Removed Files:
      Tag: sprintathon-wf-branch
	IWorkflowActivityInfo.py IWorkflowEngine.py IWorkflowEvents.py 
	WorkflowActivityInfo.py WorkflowEvents.py 
Log Message:
added new interfaces IWorkflowHistoryStorage.py IWorkflowNode.py IWorkflowProcessDefinition.py IWorkflowProcessInstance.py IWorkflowProcessInstanceStorage.py IWorkflowTransition.py IWorkflowWorkitem.py IWorkflowWorkitemStorage.py IWorkflowWorklistHandler.py during the sprintathon

=== Added File Zope3/lib/python/Zope/App/Workflow/IWorkflowHistoryStorage.py ===
##############################################################################
#
# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
# All Rights Reserved.
# 
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
# 
##############################################################################
"""
Interface for History Storage
$Id: IWorkflowHistoryStorage.py,v 1.1.2.1 2002/12/03 15:35:47 vds Exp $
"""

from Interface import Interface


class IWorkflowHistoryStorage(Interface):
    """
    Base interface for History Storage.
    """

    def loadHistoryRecord(wi_id):
        """Load a History Record
        """

    def storeWorkitem(wi_id):
        """Store a History Record
        """


=== Added File Zope3/lib/python/Zope/App/Workflow/IWorkflowNode.py ===
##############################################################################
#
# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
# All Rights Reserved.
# 
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
# 
##############################################################################

"""Interfaces for Workflow Node.

$Id: IWorkflowNode.py,v 1.1.2.1 2002/12/03 15:35:47 vds Exp $
"""

from Interface import Interface

class IWorkflowNode(Interface):
    """Interface for Workflow Node.

    """

    processDefinition = Attribute("ref to PD the activity belongs to")
    name = Attribute("a Activity Name")

    def getProcessDefinition():
        """Get the process definition
        """




=== Added File Zope3/lib/python/Zope/App/Workflow/IWorkflowProcessDefinition.py ===
##############################################################################
#
# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
# All Rights Reserved.
# 
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
# 
##############################################################################

"""Interfaces for Workflow Process Definition.

$Id: IWorkflowProcessDefinition.py,v 1.1.2.1 2002/12/03 15:35:47 vds Exp $
"""

from Interface import Interface

class IWorkflowProcessDefinition(Interface):
    """Interface for workflow process definition.

    """

    workflow_implementation_type = Attribute("""The name of the workflow type""")

    workflow_relevant_data_definition = Attribute("""The definition of workflow \
    relevant data of type [{name:'', data_tpye:''}]""")
    # relevant data declaration may be sequence of objects instead of a dictionary

    nodes = Attribute("""The sequence of nodes""")
    transitions = Attribute("""The sequence of transitions""")


    def addNode(id): #we need a name that will satisfy WfMC and State WF
        """Add a node to the Process Definition
        """

    def addTransition(id):
        """Add a transition to the Process Definition
        """

    def deleteNode(node_id): #we need a name that will satisfy WfMC and State WF
        """Delete a node from the Process Definition
        """

    def deleteTransition(transition_id):
        """Delete a transition from the Process Definition
        """

    def getNodeNames(filter):
        """Return a sequence of node names
        """

    def getTransitionNames(filter):
        """Return a sequence of transition names
        """

    def getNode(node_id):
        """Return the node object
        """

    def getTransition(transition_id):
        """Return the transition object
        """

    def getWorkflowType():
        """Return the type of workflow
        """


=== Added File Zope3/lib/python/Zope/App/Workflow/IWorkflowProcessInstanceStorage.py ===
##############################################################################
#
# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
# All Rights Reserved.
# 
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
# 
##############################################################################
"""
Interface for Process Instance Storage
$Id: IWorkflowProcessInstanceStorage.py,v 1.1.2.1 2002/12/03 15:35:47 vds Exp $
"""

from Interface import Interface


class IWorkflowProcessInstanceStorage(Interface):
    """
    Base interface for Process Instance Storage.
    """

    def loadProcessInstance(pi_id):
        """Load a Process Instance
        """

    def storeProcessInstance(pi_id):
        """store a Process Instance
        """


=== Added File Zope3/lib/python/Zope/App/Workflow/IWorkflowTransition.py ===
##############################################################################
#
# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
# All Rights Reserved.
# 
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
# 
##############################################################################

"""Interfaces for Workflow Transition.

$Id: IWorkflowTransition.py,v 1.1.2.1 2002/12/03 15:35:47 vds Exp $
"""

from Interface import Interface

class IWorkflowTransition(Interface):
    """Interface for Workflow Transition.

    """

    name = Attribute("name of Transition")
    originating_node = Attribute("""The originating node""")
    destination_node = Attribute("""The destination node""")
    condition = Attribute("""The condition that has evaluated to decide if \
    fire the condition or not""")
    processDefinition = Attribute("ref to PD the activity belongs to")

    def setOriginatingNode(node_id):
        """Set originating node"""

    def setDestinationNode(node_id):
        """Set destination node"""
        
    def setCondition(condition):
        """Set the condition"""

    def getOriginatingNode(condition):
        """Get the originating node"""

    def getDestinationNode(condition):
        """Get the condition"""

    def getCondition(condition):
        """Get the condition"""

    def getProcessDefinition():
        """Get the process definition
        """


=== Added File Zope3/lib/python/Zope/App/Workflow/IWorkflowWorkitemStorage.py ===
##############################################################################
#
# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
# All Rights Reserved.
# 
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
# 
##############################################################################
"""
Interface for Workitem Storage
$Id: IWorkflowWorkitemStorage.py,v 1.1.2.1 2002/12/03 15:35:47 vds Exp $
"""

from Interface import Interface


class IWorkflowWorkitemStorage(Interface):
    """
    Base interface for Workitem Storage.
    """

    def loadWorkitem(wi_id):
        """Load a Workitem
        """

    def storeWorkitem(wi_id):
        """store a Workitem
        """


=== Added File Zope3/lib/python/Zope/App/Workflow/IWorkflowWorklistHandler.py ===
##############################################################################
#
# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
# All Rights Reserved.
# 
# This software is subject to the provisions of the Zope Public License,
# Version 2.0 (ZPL).  A copy of the ZPL should accompany this distribution.
# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
# FOR A PARTICULAR PURPOSE.
# 
##############################################################################
"""
Interface for Worklist Handler
$Id: IWorkflowWorklistHandler.py,v 1.1.2.1 2002/12/03 15:35:47 vds Exp $
"""

from Interface import Interface


class IWorkflowWorklistHandler(Interface):
    """
    Base interface for Worklist Handler.
    """

    def getWorkitemNames(filter):
        """Return a sequence of workitem"""


=== Zope3/lib/python/Zope/App/Workflow/IWorkflowProcessInstance.py 1.2 => 1.2.24.1 ===
--- Zope3/lib/python/Zope/App/Workflow/IWorkflowProcessInstance.py:1.2	Mon Jun 10 19:28:18 2002
+++ Zope3/lib/python/Zope/App/Workflow/IWorkflowProcessInstance.py	Tue Dec  3 10:35:47 2002
@@ -13,56 +13,38 @@
 ##############################################################################
 
 """
-    Interfaces for Workflow Process Definition.
+    Interfaces for Workflow Process Instance.
+$Id$
 """
 
 from Interface import Interface
 
 class IWorkflowProcessInstance( Interface ):
-    """
-        Interface for workflow process definition.
-    """
+    """Interface for workflow process instance.
 
+        Represents the instance of a Process defined by a WorkflowProcessDefinition."""
 
-    def getStatus():
-        """
-           Report the status
-        """
-        pass
-
+    status = Attribute("""The state in which the workitem is""")
+    workitem_list = Attribute("""The list of WorlflowWorkitem for the current WorkflowProcessInstance""")
+    process_definition = Attributes("""The WorkflowProcessDefinition used to create this instance""")
     
-    def setActive():
+    def setStatus():
+        """Set the process instance status
         """
-           Change the status to Active according to the state machine
-        """
-        pass
-
+        
+    def getProcessDefinition():
+        """Gets the process definition for this process instance."""
 
-    def setCompleted():
+    def getStatus():
         """
-           Change the status to Completed according to the state machine
+           Report the status
         """
-        pass
-
     
-    def listWorkitems():
+    def listWorkitems(filter):
         """
            List all contained workitems
         """
-        pass
-    
-
-    def listActiveWorkitems():
-        """
-           List contained Active workitems
-        """
-        pass
 
+    def getWorkitem(wi_id):
+        """Gets a workitem by id."""
 
-    def listFailedWorkitems():
-        """
-          List contained Failed workitem
-        """
-        pass
-
-    


=== Zope3/lib/python/Zope/App/Workflow/IWorkflowWorkitem.py 1.2 => 1.2.24.1 ===
--- Zope3/lib/python/Zope/App/Workflow/IWorkflowWorkitem.py:1.2	Mon Jun 10 19:28:18 2002
+++ Zope3/lib/python/Zope/App/Workflow/IWorkflowWorkitem.py	Tue Dec  3 10:35:47 2002
@@ -13,61 +13,44 @@
 ##############################################################################
 """
 Interface for workitems
+$Id$
 """
 
 from Interface import Interface
 
 
-INIT = 0
-BEGUN = 1
-COMPLETED = 2
-FAILED = 3
-
-class WorkflowWorkitemException(Exception):
-    """
-    Exception for workitems.
-    """
-
 class IWorkflowWorkitem(Interface):
     """
     Base interface for workitems.
     """
 
-    def getProcessInstance():
-        """
-        Get the process instance this workitem is about.
-        Returns a IWorkflowProcessInstance.
-        """
+    assignee = Attribute("""The user in charge of accomplish the task""")
+    status = Attibute("""The state in which the workitem is""")
 
-    def begin(data):
+    
+    def setAssignee(assignee):
         """
-        Begin work on a workitem.
-        Can raise WorkflowWorkitemException.
+        Set the assignee.
         """
 
-    def complete(data):
+    def getProcessInstance():
         """
-        Complete work on a workitem.
-        Can raise WorkflowWorkitemException.
+        Get the process instance this workitem is about.
+        Returns a IWorkflowProcessInstance.
         """
 
-    def fail(data):
-        """
-        Abort work on a workitem.
-        Can raise WorkflowWorkitemException.
-        """
+    def start():
+        """Starts work on a workitem."""
 
-    def assign(assignee, data):
-        """
-        Assign a workitem to a principal.
-        assignee implements IPrincipal.
-        Can raise WorkflowWorkitemException.
-        """
+    def finish():
+        """Finishes work on a workitem."""
+
+    def abort():
+        """Aborts work on a workitem."""
 
-    def getState():
+    def getStatus():
         """
         Get the internal state of the workitem.
-        Returns one of INIT, BEGUN, COMPLETED, FAILED.
         """
 
     def getAssignee():

=== Removed File Zope3/lib/python/Zope/App/Workflow/IWorkflowActivityInfo.py ===

=== Removed File Zope3/lib/python/Zope/App/Workflow/IWorkflowEngine.py ===

=== Removed File Zope3/lib/python/Zope/App/Workflow/IWorkflowEvents.py ===

=== Removed File Zope3/lib/python/Zope/App/Workflow/WorkflowActivityInfo.py ===

=== Removed File Zope3/lib/python/Zope/App/Workflow/WorkflowEvents.py ===