Index: main/eko-disco-specs/trunk/use-cases.rst
===================================================================
--- main/eko-disco-specs/trunk/use-cases.rst	(revision 10748)
+++ main/eko-disco-specs/trunk/use-cases.rst	(revision 10749)
@@ -16,4 +16,14 @@
    :maxdepth: 1
 
+   use-cases/customer-add-by-mg
+   use-cases/customer-add-by-anon
+   use-cases/customer-edit-basedata
+   use-cases/customer-remove
+   use-cases/contract-add
+   use-cases/contract-manage
+   use-cases/contract-remove
+   use-cases/service-add
+   use-cases/service-manage
+   use-cases/service-remove
 ..   use-cases/meter-reading
 ..   use-cases/mg-customer-add
@@ -26,50 +36,52 @@
   Convert legacy data suitable for new system before.
 
-* Add Customer by Manager
+* Add customer by manager
 
-* Add Customer by Anonymous
+* Add customer by anonymous (self-registration)
 
-  (self-registration)
+* Edit customer base data (contact data and password)
 
-* Edit Customer Data
+* Remove customer
 
-  i.e. Contact Data and password
+* Add contract
 
-* Remove Customer
+* Manage contract
 
-* Add Contract
+* Remove contract
 
-* Manage Contract
+* Add service
 
-* Remove Contract
+* Manage service
 
-* Add Subcontract
+* Remove service
 
-* Manage Subcontract
+* Add subcontract
 
-* Remove Subcontract
+* Manage subcontract
 
-* Add Transaction
+* Remove subcontract
 
-* Remove Transaction
+* Add transaction
 
-* Add Meter
+* Remove transaction
 
-* Manage Meter
+* Add meter
 
-* Remove Meter
+* Manage meter
 
-* Read Meter
+* Remove meter
 
-* Add User and Assign Roles
+* Read meter
+
+* Add user and assign roles
 
   Depending on the role, different user data entities (Officer, Customer,
   Accountant) are automatically created.
 
-* Add Service
+* Add service
 
-* Manage Service
+* Manage service
 
-* Remove Service
+* Remove service
 
 
Index: main/eko-disco-specs/trunk/use-cases/contract-add.rst
===================================================================
--- main/eko-disco-specs/trunk/use-cases/contract-add.rst	(revision 10749)
+++ main/eko-disco-specs/trunk/use-cases/contract-add.rst	(revision 10749)
@@ -0,0 +1,95 @@
+.. _label-uc-contract-add:
+
+Use-Case: Add a Contract
+***********************************************************************
+
+.. Description of a use case
+.. The description must be formulated as seen from system (not: actors)
+.. Describes those changes an (outside) actor can notice
+.. Short and abstract as possible, as long as necessary.
+.. Each use case must have at least one actor involved
+.. Each use case must have a trigger and a result
+
+
+Short Description
+-----------------------------------------------------------------------
+
+A contract is added for some customer
+
+Actor(s)
+-----------------------------------------------------------------------
+
+Staff
+
+
+Trigger(s)
+-----------------------------------------------------------------------
+
+- Imports (modifying existing data)
+- Web form(s) submitted by authorized user.
+
+
+Result(s)
+-----------------------------------------------------------------------
+
+- A new contract was created with unique contract ID.
+
+- Any optional contract-add-ons can be booked for the new contract.
+
+
+Incoming Data
+-----------------------------------------------------------------------
+
+- Customer ID, service ID, respective contractual parameters (like:
+  start of service, end of service, picked payment methods, etc.)
+
+Outgoing Data
+-----------------------------------------------------------------------
+
+- Message about contract creation.
+- Log message
+
+
+Precondition(s)
+-----------------------------------------------------------------------
+
+- Customer ID must exist and be valid for new contracts.
+- Submitting user must be authorized to perform the operation.
+
+
+Postcondition(s)
+-----------------------------------------------------------------------
+
+- The contractual parameters were checked for validity.
+
+
+Invariant(s)
+-----------------------------------------------------------------------
+
+
+Essential Steps
+-----------------------------------------------------------------------
+
+- System receives customer ID, service ID and any optional parameters
+  specifying the contract to create.
+- Passed in service is requested to create a new contract with
+  passed-in parameters (contractual details) set (inludes validating
+  the passed in data).
+- If passed-in parameters are invalid, user is offered a possibility
+  to fix the invalid data.
+- System creates the new contract connecting it to the given
+  customer ID.
+
+
+Open Issues
+-----------------------------------------------------------------------
+
+
+
+Remarks
+-----------------------------------------------------------------------
+
+
+.. raw:: latex
+
+      \pagebreak[4]
Index: main/eko-disco-specs/trunk/use-cases/contract-manage.rst
===================================================================
--- main/eko-disco-specs/trunk/use-cases/contract-manage.rst	(revision 10749)
+++ main/eko-disco-specs/trunk/use-cases/contract-manage.rst	(revision 10749)
@@ -0,0 +1,92 @@
+.. _label-uc-contract-manage:
+
+Use-Case: Manage Contract Data
+***********************************************************************
+
+.. Description of a use case
+.. The description must be formulated as seen from system (not: actors)
+.. Describes those changes an (outside) actor can notice
+.. Short and abstract as possible, as long as necessary.
+.. Each use case must have at least one actor involved
+.. Each use case must have a trigger and a result
+
+
+Short Description
+-----------------------------------------------------------------------
+
+A contract is modified by staff.
+
+Actor(s)
+-----------------------------------------------------------------------
+
+Staff
+
+
+Trigger(s)
+-----------------------------------------------------------------------
+
+- Imports (modifying existing data)
+- Web form(s) submitted by authorized user.
+
+
+Result(s)
+-----------------------------------------------------------------------
+
+- Contract data of the given contract is modified.
+
+- Any optional contract-add-ons can be booked for the new contract.
+
+
+Incoming Data
+-----------------------------------------------------------------------
+
+- Contract ID, names and values of parameters to change.
+
+Outgoing Data
+-----------------------------------------------------------------------
+
+- Message about contract modification.
+- (optional) regarding customer is informed by email or SMS.
+- Log message
+
+
+Precondition(s)
+-----------------------------------------------------------------------
+
+- Contract ID must exist.
+- Submitting user must be authorized to perform the operation.
+
+
+Postcondition(s)
+-----------------------------------------------------------------------
+
+- The contractual parameters were checked for validity.
+
+
+Invariant(s)
+-----------------------------------------------------------------------
+
+
+Essential Steps
+-----------------------------------------------------------------------
+
+- System receives contract ID and any optional parameters
+  specifying the data to change in the contract.
+- Data is validated.
+- If passed-in parameters are invalid, user is offered a possibility
+  to fix the invalid data.
+- System updates the given contract.
+
+
+Open Issues
+-----------------------------------------------------------------------
+
+
+
+Remarks
+-----------------------------------------------------------------------
+
+
+.. raw:: latex
+
+      \pagebreak[4]
Index: main/eko-disco-specs/trunk/use-cases/contract-remove.rst
===================================================================
--- main/eko-disco-specs/trunk/use-cases/contract-remove.rst	(revision 10749)
+++ main/eko-disco-specs/trunk/use-cases/contract-remove.rst	(revision 10749)
@@ -0,0 +1,92 @@
+.. _label-uc-contract-remove:
+
+Use-Case: Remove a Contract
+***********************************************************************
+
+.. Description of a use case
+.. The description must be formulated as seen from system (not: actors)
+.. Describes those changes an (outside) actor can notice
+.. Short and abstract as possible, as long as necessary.
+.. Each use case must have at least one actor involved
+.. Each use case must have a trigger and a result
+
+
+Short Description
+-----------------------------------------------------------------------
+
+A contract is removed from system.
+
+Actor(s)
+-----------------------------------------------------------------------
+
+Staff
+
+
+Trigger(s)
+-----------------------------------------------------------------------
+
+- Imports (removing existing data)
+- Web form(s) submitted by authorized user.
+
+
+Result(s)
+-----------------------------------------------------------------------
+
+- Contract data of the given contract and all connected data (contract
+  add-ons, etc.) was removed from the system.
+- All removed data is archived.
+
+
+Incoming Data
+-----------------------------------------------------------------------
+
+- Contract ID
+
+Outgoing Data
+-----------------------------------------------------------------------
+
+- Message about contract removal.
+- (optional) regarding customer is informed by email or SMS.
+- Log message
+- Archive entry.
+
+
+Precondition(s)
+-----------------------------------------------------------------------
+
+- Contract ID must exist.
+- Submitting user must be authorized to perform the operation.
+
+
+Postcondition(s)
+-----------------------------------------------------------------------
+
+
+Invariant(s)
+-----------------------------------------------------------------------
+
+
+Essential Steps
+-----------------------------------------------------------------------
+
+- System validates contract ID.
+- Removed data is archived.
+- System removes the given contract and connected items (transactions,
+  contract-add-ons, etc.).
+- (optional) System informs regarding customer (email and/or SMS)
+
+
+Open Issues
+-----------------------------------------------------------------------
+
+
+
+Remarks
+-----------------------------------------------------------------------
+
+An ended contract is not the same as a removed contract.
+
+
+.. raw:: latex
+
+      \pagebreak[4]
Index: main/eko-disco-specs/trunk/use-cases/customer-add-by-anon.rst
===================================================================
--- main/eko-disco-specs/trunk/use-cases/customer-add-by-anon.rst	(revision 10749)
+++ main/eko-disco-specs/trunk/use-cases/customer-add-by-anon.rst	(revision 10749)
@@ -0,0 +1,95 @@
+.. _label-uc-customer-add-by-anon:
+
+Use-Case: Add a Customer by Anonymous User (self-registration)
+***********************************************************************
+
+.. Description of a use case
+.. The description must be formulated as seen from system (not: actors)
+.. Describes those changes an (outside) actor can notice
+.. Short and abstract as possible, as long as necessary.
+.. Each use case must have at least one actor involved
+.. Each use case must have a trigger and a result
+
+
+Short Description
+-----------------------------------------------------------------------
+
+A customer is manually added by some arbitrary person.
+
+Actor(s)
+-----------------------------------------------------------------------
+
+Customer
+
+
+Trigger(s)
+-----------------------------------------------------------------------
+
+- Some customer is added to the system.
+- A respective web form is requested from the system to fill
+  customer data.
+
+
+Result(s)
+-----------------------------------------------------------------------
+
+- The new customer was created in system with a new unique customer ID.
+
+- The new customer got valid login credentials from the system.
+
+- A (nearly empty) transaction history can be retrieved for the new
+  customer.
+
+- Authorized users can get the current account balance of the balance.
+
+
+
+Incoming Data
+-----------------------------------------------------------------------
+
+- Contact data
+
+Outgoing Data
+-----------------------------------------------------------------------
+
+- Message about customer creation.
+- Log message
+
+
+Precondition(s)
+-----------------------------------------------------------------------
+
+
+Postcondition(s)
+-----------------------------------------------------------------------
+
+Any email address/phone number was checked for validity.
+User is able to login with sent credentials.
+User is able to create contracts, etc.
+
+
+Invariant(s)
+-----------------------------------------------------------------------
+
+
+Essential Steps
+-----------------------------------------------------------------------
+
+- System receives user contact data, as required, plus optional data
+- Contact data is checked for validity (test email, etc.)
+- System sends login credentials to user.
+
+
+
+Open Issues
+-----------------------------------------------------------------------
+
+
+
+Remarks
+-----------------------------------------------------------------------
+
+
+.. raw:: latex
+
+      \pagebreak[4]
Index: main/eko-disco-specs/trunk/use-cases/customer-add-by-mg.rst
===================================================================
--- main/eko-disco-specs/trunk/use-cases/customer-add-by-mg.rst	(revision 10749)
+++ main/eko-disco-specs/trunk/use-cases/customer-add-by-mg.rst	(revision 10749)
@@ -0,0 +1,97 @@
+.. _label-mg-customer-add:
+
+Use-Case: Add a Customer ny user
+***********************************************************************
+
+.. Description of a use case
+.. The description must be formulated as seen from system (not: actors)
+.. Describes those changes an (outside) actor can notice
+.. Short and abstract as possible, as long as necessary.
+.. Each use case must have at least one actor involved
+.. Each use case must have a trigger and a result
+
+
+Short Description
+-----------------------------------------------------------------------
+
+A customer is manually added to the system by user.
+
+Actor(s)
+-----------------------------------------------------------------------
+
+Admins, Manager
+
+
+Trigger(s)
+-----------------------------------------------------------------------
+
+- Some customer is added to the system.
+- A main contract is added to the system.
+- A respective web form is requested from the system to fill
+  customer and contract data.
+
+
+Result(s)
+-----------------------------------------------------------------------
+
+- The new customer was created in system with a new unique customer ID.
+
+- The main contract was created and connected to the new customer.
+
+- A (nearly empty) transaction history can be retrieved for the new
+  customer.
+
+- Authorized users can get the current account balance of the balance.
+
+
+
+Incoming Data
+-----------------------------------------------------------------------
+
+
+Outgoing Data
+-----------------------------------------------------------------------
+
+- Message about customer creation.
+- Log message
+
+
+Precondition(s)
+-----------------------------------------------------------------------
+
+
+Postcondition(s)
+-----------------------------------------------------------------------
+
+
+Invariant(s)
+-----------------------------------------------------------------------
+
+
+Essential Steps
+-----------------------------------------------------------------------
+
+
+
+Open Issues
+-----------------------------------------------------------------------
+
+
+
+Change Log
+-----------------------------------------------------------------------
+
++------------+----------+------------+--------------------------------+
+| Timestamp  | Who      | New Status | What                           |
++------------+----------+------------+--------------------------------+
+| 2013-11-11 | henrik   | init       | Initial state                  |
++------------+----------+------------+--------------------------------+
+
+
+Remarks
+-----------------------------------------------------------------------
+
+
+.. raw:: latex
+
+      \pagebreak[4]
Index: main/eko-disco-specs/trunk/use-cases/customer-edit-basedata.rst
===================================================================
--- main/eko-disco-specs/trunk/use-cases/customer-edit-basedata.rst	(revision 10749)
+++ main/eko-disco-specs/trunk/use-cases/customer-edit-basedata.rst	(revision 10749)
@@ -0,0 +1,90 @@
+.. _label-uc-customer-edit-basedata:
+
+Use-Case: Edit Basic Customer Data
+***********************************************************************
+
+.. Description of a use case
+.. The description must be formulated as seen from system (not: actors)
+.. Describes those changes an (outside) actor can notice
+.. Short and abstract as possible, as long as necessary.
+.. Each use case must have at least one actor involved
+.. Each use case must have a trigger and a result
+
+
+Short Description
+-----------------------------------------------------------------------
+
+Basic customer data like contact data or login credentials are
+modified.
+
+Actor(s)
+-----------------------------------------------------------------------
+
+Customer
+
+
+Trigger(s)
+-----------------------------------------------------------------------
+
+- Imports (modifying existing data)
+- Web form(s) submitted by authorized user.
+
+
+Result(s)
+-----------------------------------------------------------------------
+
+- Customer base data are modified.
+
+
+Incoming Data
+-----------------------------------------------------------------------
+
+- Contact data | password | user name | user id
+
+Outgoing Data
+-----------------------------------------------------------------------
+
+- Message about successful/failed changes.
+- Log message
+
+
+Precondition(s)
+-----------------------------------------------------------------------
+
+- Submitting user is authorized to do the requested modifications.
+
+
+Postcondition(s)
+-----------------------------------------------------------------------
+
+Any entered data is valid.
+
+
+Invariant(s)
+-----------------------------------------------------------------------
+
+
+Essential Steps
+-----------------------------------------------------------------------
+
+- Sending user authorization is checked.
+- System receives infos about
+  - what data fields of which user should be set to which values.
+  - submitting user
+- Data is modified in system
+- User gets informed about operation success/fail.
+- if operation fails, possibility to change input data is offered
+
+
+Open Issues
+-----------------------------------------------------------------------
+
+
+
+Remarks
+-----------------------------------------------------------------------
+
+
+.. raw:: latex
+
+      \pagebreak[4]
Index: main/eko-disco-specs/trunk/use-cases/customer-remove.rst
===================================================================
--- main/eko-disco-specs/trunk/use-cases/customer-remove.rst	(revision 10749)
+++ main/eko-disco-specs/trunk/use-cases/customer-remove.rst	(revision 10749)
@@ -0,0 +1,91 @@
+.. _label-uc-customer-remove:
+
+Use-Case: Remove Customer
+***********************************************************************
+
+.. Description of a use case
+.. The description must be formulated as seen from system (not: actors)
+.. Describes those changes an (outside) actor can notice
+.. Short and abstract as possible, as long as necessary.
+.. Each use case must have at least one actor involved
+.. Each use case must have a trigger and a result
+
+
+Short Description
+-----------------------------------------------------------------------
+
+A customer with all connected data is removed from the system.
+
+Actor(s)
+-----------------------------------------------------------------------
+
+Staff member
+
+
+Trigger(s)
+-----------------------------------------------------------------------
+
+- Imports (deleting existing data)
+- Web form(s) submitted by authorized user.
+
+
+Result(s)
+-----------------------------------------------------------------------
+
+- A customer and all connected data was removed and archived.
+
+
+Incoming Data
+-----------------------------------------------------------------------
+
+- Customer id, authorization data of submitting user
+
+Outgoing Data
+-----------------------------------------------------------------------
+
+- Message about successful/failed changes.
+- Archive entry of data removed from system with extra info
+  (when/who).
+- Log message
+
+
+Precondition(s)
+-----------------------------------------------------------------------
+
+- Submitting user is authorized to do the requested modifications.
+
+
+Postcondition(s)
+-----------------------------------------------------------------------
+
+Any entered data is valid.
+
+
+Invariant(s)
+-----------------------------------------------------------------------
+
+
+Essential Steps
+-----------------------------------------------------------------------
+
+- Sending user authorization is checked.
+- System receives infos about
+  - what data fields of which user should be set to which values.
+  - submitting user
+- Data is modified in system
+- User gets informed about operation success/fail.
+- if operation fails, possibility to change input data is offered
+
+
+Open Issues
+-----------------------------------------------------------------------
+
+
+
+Remarks
+-----------------------------------------------------------------------
+
+
+.. raw:: latex
+
+      \pagebreak[4]
Index: main/eko-disco-specs/trunk/use-cases/mg-customer-add.rst
===================================================================
--- main/eko-disco-specs/trunk/use-cases/mg-customer-add.rst	(revision 10748)
+++ 	(revision )
@@ -1,97 +1,0 @@
-.. _label-mg-customer-add:
-
-Use-Case: Add a Customer ny user
-***********************************************************************
-
-.. Description of a use case
-.. The description must be formulated as seen from system (not: actors)
-.. Describes those changes an (outside) actor can notice
-.. Short and abstract as possible, as long as necessary.
-.. Each use case must have at least one actor involved
-.. Each use case must have a trigger and a result
-
-
-Short Description
------------------------------------------------------------------------
-
-A customer is manually added to the system by user.
-
-Actor(s)
------------------------------------------------------------------------
-
-Admins, Manager
-
-
-Trigger(s)
------------------------------------------------------------------------
-
-- Some customer is added to the system.
-- A main contract is added to the system.
-- A respective web form is requested from the system to fill
-  customer and contract data.
-
-
-Result(s)
------------------------------------------------------------------------
-
-- The new customer was created in system with a new unique customer ID.
-
-- The main contract was created and connected to the new customer.
-
-- A (nearly empty) transaction history can be retrieved for the new
-  customer.
-
-- Authorized users can get the current account balance of the balance.
-
-
-
-Incoming Data
------------------------------------------------------------------------
-
-
-Outgoing Data
------------------------------------------------------------------------
-
-- Message about customer creation.
-- Log message
-
-
-Precondition(s)
------------------------------------------------------------------------
-
-
-Postcondition(s)
------------------------------------------------------------------------
-
-
-Invariant(s)
------------------------------------------------------------------------
-
-
-Essential Steps
------------------------------------------------------------------------
-
-
-
-Open Issues
------------------------------------------------------------------------
-
-
-
-Change Log
------------------------------------------------------------------------
-
-+------------+----------+------------+--------------------------------+
-| Timestamp  | Who      | New Status | What                           |
-+------------+----------+------------+--------------------------------+
-| 2013-11-11 | henrik   | init       | Initial state                  |
-+------------+----------+------------+--------------------------------+
-
-
-Remarks
------------------------------------------------------------------------
-
-
-.. raw:: latex
-
-      \pagebreak[4]
Index: main/eko-disco-specs/trunk/use-cases/service-add.rst
===================================================================
--- main/eko-disco-specs/trunk/use-cases/service-add.rst	(revision 10749)
+++ main/eko-disco-specs/trunk/use-cases/service-add.rst	(revision 10749)
@@ -0,0 +1,95 @@
+.. _label-uc-service-add:
+
+Use-Case: Add a service
+***********************************************************************
+
+.. Description of a use case
+.. The description must be formulated as seen from system (not: actors)
+.. Describes those changes an (outside) actor can notice
+.. Short and abstract as possible, as long as necessary.
+.. Each use case must have at least one actor involved
+.. Each use case must have a trigger and a result
+
+
+Short Description
+-----------------------------------------------------------------------
+
+A service is added.
+
+Actor(s)
+-----------------------------------------------------------------------
+
+Staff
+
+
+Trigger(s)
+-----------------------------------------------------------------------
+
+- Imports (adding existing data)
+- Web form(s) submitted by authorized user.
+
+
+Result(s)
+-----------------------------------------------------------------------
+
+- A new service is available for customers/staff.
+
+- Contracts can be created from the new service.
+
+
+Incoming Data
+-----------------------------------------------------------------------
+
+- Title
+- Description
+- Service terms (various data about what special options the new
+  service provides, constraints, etc.).
+
+
+Outgoing Data
+-----------------------------------------------------------------------
+
+- Message about service creation.
+- Log message
+
+
+Precondition(s)
+-----------------------------------------------------------------------
+
+- Submitting user must be authorized to perform the operation.
+
+
+Postcondition(s)
+-----------------------------------------------------------------------
+
+- The new service is able to create contracts.
+
+
+Invariant(s)
+-----------------------------------------------------------------------
+
+
+Essential Steps
+-----------------------------------------------------------------------
+
+- System receives customer ID, service ID and any optional parameters
+  specifying the contract to create.
+- System creates a unique service ID.
+- Passed in terms, title, and description are validated.
+- If passed-in parameters are invalid, user is offered a possibility
+  to fix the invalid data.
+- System creates the new service.
+
+
+Open Issues
+-----------------------------------------------------------------------
+
+
+
+Remarks
+-----------------------------------------------------------------------
+
+
+.. raw:: latex
+
+      \pagebreak[4]
Index: main/eko-disco-specs/trunk/use-cases/service-manage.rst
===================================================================
--- main/eko-disco-specs/trunk/use-cases/service-manage.rst	(revision 10749)
+++ main/eko-disco-specs/trunk/use-cases/service-manage.rst	(revision 10749)
@@ -0,0 +1,95 @@
+.. _label-uc-service-manage:
+
+Use-Case: Modify a Service
+***********************************************************************
+
+.. Description of a use case
+.. The description must be formulated as seen from system (not: actors)
+.. Describes those changes an (outside) actor can notice
+.. Short and abstract as possible, as long as necessary.
+.. Each use case must have at least one actor involved
+.. Each use case must have a trigger and a result
+
+
+Short Description
+-----------------------------------------------------------------------
+
+A service is modified by staff.
+
+Actor(s)
+-----------------------------------------------------------------------
+
+Staff
+
+
+Trigger(s)
+-----------------------------------------------------------------------
+
+- Imports (modifying existing data)
+- Web form(s) submitted by authorized user.
+
+
+Result(s)
+-----------------------------------------------------------------------
+
+- Data (terms, title, description) of the given service is modified.
+
+
+Incoming Data
+-----------------------------------------------------------------------
+
+- Service ID, names and values of parameters to change.
+
+Outgoing Data
+-----------------------------------------------------------------------
+
+- Message about service modification.
+- (optional) regarding customers are informed by email or
+  SMS. Regarding customers are those having a contract created by
+  the modified service.
+- Log message
+
+
+Precondition(s)
+-----------------------------------------------------------------------
+
+- Service ID must exist.
+- Submitting user must be authorized to perform the operation.
+
+
+Postcondition(s)
+-----------------------------------------------------------------------
+
+- The new service data were checked for validity.  Validation here is
+  stricter than when adding a service. For instance it is not allowed
+  to change terms for the past if there are already existing
+  contracts created by this service.
+
+
+Invariant(s)
+-----------------------------------------------------------------------
+
+
+Essential Steps
+-----------------------------------------------------------------------
+
+- System receives service ID and any optional parameters
+  specifying the data to change in the service.
+- Data is validated.
+- If passed-in parameters are invalid, user is offered a possibility
+  to fix the invalid data.
+- System updates the given service.
+
+
+Open Issues
+-----------------------------------------------------------------------
+
+
+
+Remarks
+-----------------------------------------------------------------------
+
+
+.. raw:: latex
+
+      \pagebreak[4]
Index: main/eko-disco-specs/trunk/use-cases/service-remove.rst
===================================================================
--- main/eko-disco-specs/trunk/use-cases/service-remove.rst	(revision 10749)
+++ main/eko-disco-specs/trunk/use-cases/service-remove.rst	(revision 10749)
@@ -0,0 +1,93 @@
+.. _label-uc-service-remove:
+
+Use-Case: Remove a Service
+***********************************************************************
+
+.. Description of a use case
+.. The description must be formulated as seen from system (not: actors)
+.. Describes those changes an (outside) actor can notice
+.. Short and abstract as possible, as long as necessary.
+.. Each use case must have at least one actor involved
+.. Each use case must have a trigger and a result
+
+
+Short Description
+-----------------------------------------------------------------------
+
+A service is removed from system.
+
+Actor(s)
+-----------------------------------------------------------------------
+
+Staff
+
+
+Trigger(s)
+-----------------------------------------------------------------------
+
+- Imports (removing existing data)
+- Web form(s) submitted by authorized user.
+
+
+Result(s)
+-----------------------------------------------------------------------
+
+- The given service and all connected data (contracts, etc.) were
+  removed from the system.
+- All removed data is archived.
+
+
+Incoming Data
+-----------------------------------------------------------------------
+
+- Service ID
+
+Outgoing Data
+-----------------------------------------------------------------------
+
+- Message about service removal.
+- Log message
+- Archive entry.
+
+
+Precondition(s)
+-----------------------------------------------------------------------
+
+- Service ID must exist.
+- Submitting user must be authorized to perform the operation.
+
+
+Postcondition(s)
+-----------------------------------------------------------------------
+
+
+Invariant(s)
+-----------------------------------------------------------------------
+
+A service cannot be removed from the system while still contracts
+connected to it exist in the system.
+
+
+Essential Steps
+-----------------------------------------------------------------------
+
+- System checks service ID validity.
+- System checks whether any contracts created by the requested service
+  are still in use in the system and cancels operation if so.
+- Removed data is archived.
+- System removes the given service.
+
+
+Open Issues
+-----------------------------------------------------------------------
+
+
+
+Remarks
+-----------------------------------------------------------------------
+
+
+
+.. raw:: latex
+
+      \pagebreak[4]
