SlideShare a Scribd company logo
Basic
     B i COSA Workflow Example
                W kfl      E     l
      in a Temporal State Machine

                         GORDON MORRISON
                   GORDON.MORRISON@VSMERLOT.COM




www.vsmerlot.com                                  7/11/2010
What is workflow?

 Workflow is understanding the rules and steps that
                          g                  p
  define the process of work being performed
 Workflow rules require understanding the temporal
  relationships of binary states, their true or false
  behaviors and their respective true or false next state
  transitions.
  transitions
 Workflow requires the proper placement of detail in
  abstraction.
  abstraction



www.vsmerlot.com                                    7/11/2010
Examples

 Processing any event
           g y
 Processing documents, languages, or databases
 User interactions with systems
                          y




www.vsmerlot.com                                  7/11/2010
Things common to workflow

 All have a temporal basis
                p
 All are based on rules that have one or more steps
 All have rules/steps that consist of states that have
                / p
  true and false behaviors
 Some states do nothing but transition to another
  state
 In temporal logic rules/steps/states do one thing
      It’s done well
      It’s coherent


www.vsmerlot.com                                    7/11/2010
Temporal State Machine

 Temporal State Machine
   While (Engine) {
         If(this->table(iTime).f_State())
           This->table(iTime).TrueBehavior()
          T TrueTrace = Thi
                  T       This->table(iTime).trace;
                                  bl (iTi )
           iTime = table(iTime).NextTrueTime;
         Else
           This->table(iTime).FalseBehavior();
           FalseTrace = This->table(iTime).trace;
           iTime = table(iTime).NextFalseTime;
        }
       }
 Table is defined on the next slide

www.vsmerlot.com                                      7/11/2010
www.vsmerlot.com

 The temporal state machine refers to this logic table,
         p                                    g        ,
   the seven columns are:
      Rule name or step displacement
      Function testing state
             i      i
      True behavior
      Next true behavior to execute
      False behavior
      Next false behavior to execute
      Trace




www.vsmerlot.com                                   7/11/2010
A Workflow Example

   RULE           TEST STATE      TRUE B NEXT T         FALSE B        NEXT F     TRACE
   rStateMach,
    rStateMach     f_Initial,
                   f Initial       pCreate,
                                   pCreate    +1
                                              +1,        Ignore,
                                                         Ignore         rError,
                                                                        rError     1000
   +1,            f_Status,       pCreated,  rReady,    pNotCreated,   rError,    1001
   rReady,        f_Approved,     pApproved, rAction,   Ignore,         +1,       2000
   +1,            f_Rejected,     pRejected, rDone,     Ignore,         +2,       2001
   +2              f_Cancelled,
                    f Cancelled    pCanceled, Done
                                   pCanceled rDone,      Igno e
                                                         Ignore,         rError,
                                                                          E o      2002
   rAction,       f_Act1, …                                                       4000

   rDone,         f_Done, …                                                       9000
   rError,        f_Error, …
                   f                                                               9086




www.vsmerlot.com                                                                          7/11/2010
State Machine Interfaces

 temporalMachine.approve;
     p                  pp     ;
   Moves the temporal pointer

 temporalMachine.cancelled;
   Moves the temporal pointer to canceled

   Tests the status

   Returns a Boolean result




www.vsmerlot.com                              7/11/2010
Rules

 Rules define the workflow
 Rules are defined in the state machine workflow
  table
 Each row requires that each column have an entry
      Every state has a true and false behavior
      Every state h a true and f l next b h i
                   has          d false     behavior
 Guards are defined as complete rules
 L i fl
  Logic-flow is separate from d t fl
             i        t f     data-flow



www.vsmerlot.com                                       7/11/2010
Rules are Complete

 Rules consist of one or more steps      p
   Each step is a row in the logic table

 Rules are only entered at their beginning
 Rules allow looping within the rule
 Rules can exit from anywhere within the rule
 Rules are not nested
   Rules are located in time with the workflow
        When
         Wh an action i approved
                      i is           d
        Next rule or step is ready for test




www.vsmerlot.com                                  7/11/2010
Nested Temporal State Engines

 Another Temporal Engine can be called from a rule
             p       g
 Another object can be created from a rule
 Another thread can be created from a rule




www.vsmerlot.com                                7/11/2010
The Temporal Pointer

 Managed by the Temporal Engine:
         g      y             p           g
   Can be set to the zero rule on each entry

   Can be left at the last rule or step used

   C
    Can be provided as an argument when the T
         b       id d                     h   h Temporal E i i
                                                       l Engine is
    called or reentered




www.vsmerlot.com                                            7/11/2010
Trace / Audit is Inherent

 The Temporal Engine Provides a:
             p          g
   True trace for every state/step

   False trace for every state/step

 The trace can always be on
 Or the trace can be dynamically bound
   Turned on or turned off at runtime
         d            d ff         i




www.vsmerlot.com                               7/11/2010
Breaking the Time Barrier




www.vsmerlot.com                               7/11/2010
A Temporal Understanding

Question: What are the five most importing things in
  creating quality software?
       i      li     f
 1) Temporal Logic
      Reduced complexity
 2) Temporal Logic
      Improved quality
 3) Temporal L i
   )T       l Logic
      Greater performance
 4) Detail
      The devil lives here don’t get carried away with abstraction
 5) Abstraction
      It s
       It’s important but to much has caused many a project to fail

www.vsmerlot.com                                                      7/11/2010

More Related Content

PPTX
Control statements in java
PDF
Variable hoisting in JavaScript
PPTX
Constructs (Programming Methodology)
PDF
Loops in c++
PDF
RheinJUG 2010 - Sprechen Sie Scala?
PPT
Iteration
PDF
Objektforum 2010 - Sprechen Sie Scala?
DOC
Jumping statements
Control statements in java
Variable hoisting in JavaScript
Constructs (Programming Methodology)
Loops in c++
RheinJUG 2010 - Sprechen Sie Scala?
Iteration
Objektforum 2010 - Sprechen Sie Scala?
Jumping statements

What's hot (8)

PPT
Decision making and looping
PPT
M C6java5
PDF
L8
PPTX
Nested loop in C language
PPT
M C6java6
PDF
Decision control and iterative statements
PPTX
java programming- control statements
DOCX
Nested Loops in C unit2.docx
Decision making and looping
M C6java5
L8
Nested loop in C language
M C6java6
Decision control and iterative statements
java programming- control statements
Nested Loops in C unit2.docx
Ad

Viewers also liked (13)

PPT
Scalable web-based workflow platform
PPTX
Workflow Foundation 4
PDF
State Machine Workflow: Esoteric Techniques & Patterns Everyone Should Buy pr...
PPT
Windows Workflow Foundation
PPT
Events Workflow diagram
PDF
Workflow for XPages
PPTX
Corporate Workflow Process - Complaints and Legal Matters (illustration)
PDF
The Workflow Reference Model
PPTX
Neuro4j Workflow Overview
PDF
Djangocon 09 Presentation - Pluggable Applications
PPTX
Cognitive IBM Watson Services for Bluemix Developers
PDF
A simple workflow system using state machines
PPTX
Java workflow engines
Scalable web-based workflow platform
Workflow Foundation 4
State Machine Workflow: Esoteric Techniques & Patterns Everyone Should Buy pr...
Windows Workflow Foundation
Events Workflow diagram
Workflow for XPages
Corporate Workflow Process - Complaints and Legal Matters (illustration)
The Workflow Reference Model
Neuro4j Workflow Overview
Djangocon 09 Presentation - Pluggable Applications
Cognitive IBM Watson Services for Bluemix Developers
A simple workflow system using state machines
Java workflow engines
Ad

Similar to workflow in temporal state machine v1 (20)

PDF
Jumping-with-java8
PDF
06-Event-Handlingadvansed
PPTX
010 CONDITION USING IF-converted.pptx
PDF
Kamil witecki asynchronous, yet readable, code
PDF
Correctness attraction __kth_2017
PPT
09 workflow
PDF
Error xaction etl_ktr
PPT
Os6 2
PDF
Streaming Dataflow with Apache Flink
PPT
Introduction to State Machines
PDF
Foomo / Zugspitze Presentation
PDF
Python master class 2
PDF
Promises in JavaScript
PPTX
ICSE Class X Conditional Statements in java
PDF
Functional Programming in Groovy
PPTX
ODP
PHP Barcelona 2010 - Architecture and testability
PDF
Reliability Patterns for Fun and Profit
PDF
Gordon morrison temporalengineering-delphi-v3
PPTX
The SAM Pattern: State Machines and Computation
Jumping-with-java8
06-Event-Handlingadvansed
010 CONDITION USING IF-converted.pptx
Kamil witecki asynchronous, yet readable, code
Correctness attraction __kth_2017
09 workflow
Error xaction etl_ktr
Os6 2
Streaming Dataflow with Apache Flink
Introduction to State Machines
Foomo / Zugspitze Presentation
Python master class 2
Promises in JavaScript
ICSE Class X Conditional Statements in java
Functional Programming in Groovy
PHP Barcelona 2010 - Architecture and testability
Reliability Patterns for Fun and Profit
Gordon morrison temporalengineering-delphi-v3
The SAM Pattern: State Machines and Computation

More from Gordon Morrison (11)

DOCX
Processing data using regular expressions
PDF
Extract Translae Load by-the-numbers
PDF
Nist cosa-foundation v7
PDF
Black capped night heron v1
PDF
NIST COSA-Foundation Software
PDF
Meta edit calc execution v3
PDF
Cosa movie v8 handout
PPT
It wasn’t the if-
PDF
Cosa top down
PDF
A true state machine
PDF
New Cosa Movie V8
Processing data using regular expressions
Extract Translae Load by-the-numbers
Nist cosa-foundation v7
Black capped night heron v1
NIST COSA-Foundation Software
Meta edit calc execution v3
Cosa movie v8 handout
It wasn’t the if-
Cosa top down
A true state machine
New Cosa Movie V8

Recently uploaded (20)

PPTX
A Presentation on Artificial Intelligence
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Encapsulation theory and applications.pdf
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Empathic Computing: Creating Shared Understanding
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
A comparative analysis of optical character recognition models for extracting...
PDF
Encapsulation_ Review paper, used for researhc scholars
PPTX
Cloud computing and distributed systems.
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
A Presentation on Artificial Intelligence
The AUB Centre for AI in Media Proposal.docx
Advanced methodologies resolving dimensionality complications for autism neur...
Assigned Numbers - 2025 - Bluetooth® Document
Diabetes mellitus diagnosis method based random forest with bat algorithm
Encapsulation theory and applications.pdf
Programs and apps: productivity, graphics, security and other tools
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
20250228 LYD VKU AI Blended-Learning.pptx
“AI and Expert System Decision Support & Business Intelligence Systems”
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Empathic Computing: Creating Shared Understanding
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Reach Out and Touch Someone: Haptics and Empathic Computing
Spectral efficient network and resource selection model in 5G networks
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
A comparative analysis of optical character recognition models for extracting...
Encapsulation_ Review paper, used for researhc scholars
Cloud computing and distributed systems.
gpt5_lecture_notes_comprehensive_20250812015547.pdf

workflow in temporal state machine v1

  • 1. Basic B i COSA Workflow Example W kfl E l in a Temporal State Machine GORDON MORRISON GORDON.MORRISON@VSMERLOT.COM www.vsmerlot.com 7/11/2010
  • 2. What is workflow?  Workflow is understanding the rules and steps that g p define the process of work being performed  Workflow rules require understanding the temporal relationships of binary states, their true or false behaviors and their respective true or false next state transitions. transitions  Workflow requires the proper placement of detail in abstraction. abstraction www.vsmerlot.com 7/11/2010
  • 3. Examples  Processing any event g y  Processing documents, languages, or databases  User interactions with systems y www.vsmerlot.com 7/11/2010
  • 4. Things common to workflow  All have a temporal basis p  All are based on rules that have one or more steps  All have rules/steps that consist of states that have / p true and false behaviors  Some states do nothing but transition to another state  In temporal logic rules/steps/states do one thing  It’s done well  It’s coherent www.vsmerlot.com 7/11/2010
  • 5. Temporal State Machine  Temporal State Machine  While (Engine) {  If(this->table(iTime).f_State())  This->table(iTime).TrueBehavior() T TrueTrace = Thi T This->table(iTime).trace; bl (iTi )  iTime = table(iTime).NextTrueTime;  Else  This->table(iTime).FalseBehavior();  FalseTrace = This->table(iTime).trace;  iTime = table(iTime).NextFalseTime; }  }  Table is defined on the next slide www.vsmerlot.com 7/11/2010
  • 6. www.vsmerlot.com  The temporal state machine refers to this logic table, p g , the seven columns are:  Rule name or step displacement  Function testing state i i  True behavior  Next true behavior to execute  False behavior  Next false behavior to execute  Trace www.vsmerlot.com 7/11/2010
  • 7. A Workflow Example  RULE TEST STATE TRUE B NEXT T FALSE B NEXT F TRACE  rStateMach, rStateMach f_Initial, f Initial pCreate, pCreate +1 +1, Ignore, Ignore rError, rError 1000  +1, f_Status, pCreated, rReady, pNotCreated, rError, 1001  rReady, f_Approved, pApproved, rAction, Ignore, +1, 2000  +1, f_Rejected, pRejected, rDone, Ignore, +2, 2001  +2 f_Cancelled, f Cancelled pCanceled, Done pCanceled rDone, Igno e Ignore, rError, E o 2002  rAction, f_Act1, … 4000  rDone, f_Done, … 9000  rError, f_Error, … f 9086 www.vsmerlot.com 7/11/2010
  • 8. State Machine Interfaces  temporalMachine.approve; p pp ;  Moves the temporal pointer  temporalMachine.cancelled;  Moves the temporal pointer to canceled  Tests the status  Returns a Boolean result www.vsmerlot.com 7/11/2010
  • 9. Rules  Rules define the workflow  Rules are defined in the state machine workflow table  Each row requires that each column have an entry  Every state has a true and false behavior  Every state h a true and f l next b h i has d false behavior  Guards are defined as complete rules  L i fl Logic-flow is separate from d t fl i t f data-flow www.vsmerlot.com 7/11/2010
  • 10. Rules are Complete  Rules consist of one or more steps p  Each step is a row in the logic table  Rules are only entered at their beginning  Rules allow looping within the rule  Rules can exit from anywhere within the rule  Rules are not nested  Rules are located in time with the workflow  When Wh an action i approved i is d  Next rule or step is ready for test www.vsmerlot.com 7/11/2010
  • 11. Nested Temporal State Engines  Another Temporal Engine can be called from a rule p g  Another object can be created from a rule  Another thread can be created from a rule www.vsmerlot.com 7/11/2010
  • 12. The Temporal Pointer  Managed by the Temporal Engine: g y p g  Can be set to the zero rule on each entry  Can be left at the last rule or step used  C Can be provided as an argument when the T b id d h h Temporal E i i l Engine is called or reentered www.vsmerlot.com 7/11/2010
  • 13. Trace / Audit is Inherent  The Temporal Engine Provides a: p g  True trace for every state/step  False trace for every state/step  The trace can always be on  Or the trace can be dynamically bound  Turned on or turned off at runtime d d ff i www.vsmerlot.com 7/11/2010
  • 14. Breaking the Time Barrier www.vsmerlot.com 7/11/2010
  • 15. A Temporal Understanding Question: What are the five most importing things in creating quality software? i li f  1) Temporal Logic  Reduced complexity  2) Temporal Logic  Improved quality  3) Temporal L i )T l Logic  Greater performance  4) Detail  The devil lives here don’t get carried away with abstraction  5) Abstraction  It s It’s important but to much has caused many a project to fail www.vsmerlot.com 7/11/2010