Created
October 29, 2010 06:01
-
-
Save Asher-/653002 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'workflow/WorkflowController.rb' | |
require 'workflow/WorkflowObject.rb' | |
class Workflow < WorkflowObject | |
# everything inherits from this | |
class Object | |
end | |
# Consultants are agents of the Workflow | |
class Consultant < WorkflowObject | |
# they can be managers | |
module Manager | |
end | |
# they receive and delegate assignments | |
module Assignments | |
# they send and receive notifications about their assignments | |
module Notifications | |
# notifications about assignments arrive in the inbox | |
class Inbox < WorkflowObject | |
end | |
# notifications about assignments get sent through the outbox | |
class Outbox < WorkflowObject | |
end | |
end | |
# completed assignments are also stored | |
module Completed | |
end | |
# also future assignments can be anticipated | |
module Future | |
end | |
end | |
# they can have other Consultants who are managers | |
module Managers | |
end | |
# they can have other Consultants who they manage | |
module Delegates | |
end | |
# they can have assignments that they have delegated | |
module Delegations | |
# ones that are still underway | |
module InProgress | |
end | |
# and ones that have been completed | |
module Completed | |
end | |
end | |
# their status can be evaluated in a number of terms | |
module Status | |
# they have a calendar to track assignments, work schedule, etc. | |
class Calendar < WorkflowObject | |
# events with others are scheduled ahead of time | |
module Meetings | |
# * function: during( period ) | |
# * function: during?( period ) | |
end | |
# and vacations generally have advance notice | |
module Vacations | |
# * function: dates | |
# * function: during?( period ) | |
# * function: total_available | |
# * function: used | |
# * function: available_times | |
# * function: available? | |
# * function: planned? | |
# * function: planned_during?( period ) | |
end | |
# and we might want to track unanticipated out-days | |
module OutDays | |
end | |
# which make schedules | |
module Schedule | |
# * function: dates | |
# * function: days | |
# * function: hours | |
end | |
end | |
module Workload | |
# get periods matching workload [during period specified] | |
# * function: light_times [during_period] | |
# * function: heavy_times [during_period] | |
# * function: crunch_times [during_period] | |
# * function: priorities [during_period] | |
# query whether period matches workload | |
# * function: workload( during_period ) | |
# * function: light_time?( during_period ) | |
# * function: heavy_time?( during_period ) | |
# * function: crunch_time?( during_period ) | |
# * function: priority?( during_period ) | |
end | |
end | |
end | |
# The Workflow knows about its Consultants | |
module Consultants | |
end | |
# Client defines a context for task expectations, | |
# as well as providing terms by which progress can be measured | |
module Client | |
# Opensource/Public Domain | |
class Public < WorkflowObject | |
class GPL < Public | |
end | |
class MIT < Public | |
end | |
class Apache < Public | |
end | |
end | |
# Delivery-oriented Publication | |
class Private < WorkflowObject | |
end | |
# Commercial Distribution | |
class Commercial < WorkflowObject | |
end | |
end | |
# The Workflow knows about its clients | |
module Clients | |
end | |
# The Workflow knows about its managers | |
module Managers | |
end | |
# The workflow has tasks | |
class Task < WorkflowObject | |
# which can require meetings | |
class Meeting < WorkflowObject | |
end | |
# alias Appointment to Meeting | |
Appointment = Meeting | |
# and have managers | |
module Managers | |
end | |
# and have delegates | |
module Delegates | |
end | |
# and knows about their delegations | |
module Delegations | |
# including ones that have been completed | |
module Completed | |
end | |
end | |
# when transitions occur, they can spark Events | |
module Event | |
end | |
# reviewers can be assigned to review transitions | |
module Reviewers | |
end | |
# a Task can report on its status | |
module Status | |
# its priority can be determined in varying terms | |
class Priority < WorkflowObject | |
# and it can later be escalated | |
class Escalation < WorkflowObject | |
end | |
# each escalation is tracked | |
module Escalations | |
end | |
end | |
end | |
end | |
# Tasks exist to be assigned to Delegates (which include self) | |
class Assignment < WorkflowObject | |
# one or more responses are intrinsic to any assignment | |
class Response < WorkflowObject | |
end | |
# The Assignment knows about Managers assigned to the given assignment | |
module Managers | |
end | |
# And about Consultants assigned to it | |
module Consultants | |
# and their Delegates | |
class Delegates < WorkflowObject | |
end | |
# and the delegations made to them | |
module Delegations | |
# and all previously completed delegations | |
module Completed | |
end | |
end | |
end | |
# An assignment has a priority | |
class Priority < WorkflowObject | |
end | |
# and can have meetings | |
class Meeting < WorkflowObject | |
end | |
# which it keeps track of | |
module Meetings | |
# including once they've passed | |
module Completed | |
end | |
end | |
# alias Appointment to Meeting | |
Appointment = Meeting | |
# An assignment can be a vacations | |
class Vacation < WorkflowObject | |
end | |
end | |
# A workflow has a set of Consultants assigned to it, who are its delegates | |
module Delegates | |
end | |
# Reviewers can be scheduled to intervene at various points in the process | |
# to approve, rollback, or forward transitions | |
# review can be blocking or non-blocking | |
class Reviewer < WorkflowObject | |
# they can also be editors | |
class Editor < WorkflowObject | |
# of the process itself (for instance forwarding) | |
class Process < Editor | |
end | |
# of text within the task | |
class Copy < Editor | |
end | |
# of stylistic formats within the task | |
class Style < Editor | |
end | |
# of interface design | |
class Interface < Editor | |
end | |
# administrative role for coordinating other editors/edits | |
class Finishing < Editor | |
end | |
end | |
end | |
# Of the Workflow's Consultants, some or all may also be Reviewers | |
module Reviewers | |
# * function: default reviewer for current user (self unless otherwise specified) | |
end | |
end | |
require_relative 'workflow/Workflow.rb' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment