SlideShare ist ein Scribd-Unternehmen logo
1 von 15
Downloaden Sie, um offline zu lesen
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

Weitere ähnliche Inhalte

Was ist angesagt? (8)

Decision making and looping
Decision making and loopingDecision making and looping
Decision making and looping
 
M C6java5
M C6java5M C6java5
M C6java5
 
L8
L8L8
L8
 
Nested loop in C language
Nested loop in C languageNested loop in C language
Nested loop in C language
 
M C6java6
M C6java6M C6java6
M C6java6
 
Decision control and iterative statements
Decision control and iterative statementsDecision control and iterative statements
Decision control and iterative statements
 
java programming- control statements
 java programming- control statements java programming- control statements
java programming- control statements
 
Nested Loops in C unit2.docx
Nested Loops in C unit2.docxNested Loops in C unit2.docx
Nested Loops in C unit2.docx
 

Andere mochten auch

Events Workflow diagram
Events Workflow diagramEvents Workflow diagram
Events Workflow diagram
Colin Thomson
 

Andere mochten auch (13)

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

Ähnlich wie workflow in temporal state machine v1

06-Event-Handlingadvansed
06-Event-Handlingadvansed06-Event-Handlingadvansed
06-Event-Handlingadvansed
Arjun Shanka
 
Error xaction etl_ktr
Error xaction etl_ktrError xaction etl_ktr
Error xaction etl_ktr
hurac
 
Os6 2
Os6 2Os6 2
Os6 2
issbp
 

Ähnlich wie workflow in temporal state machine v1 (20)

Jumping-with-java8
Jumping-with-java8Jumping-with-java8
Jumping-with-java8
 
06-Event-Handlingadvansed
06-Event-Handlingadvansed06-Event-Handlingadvansed
06-Event-Handlingadvansed
 
010 CONDITION USING IF-converted.pptx
010 CONDITION USING IF-converted.pptx010 CONDITION USING IF-converted.pptx
010 CONDITION USING IF-converted.pptx
 
Kamil witecki asynchronous, yet readable, code
Kamil witecki asynchronous, yet readable, codeKamil witecki asynchronous, yet readable, code
Kamil witecki asynchronous, yet readable, code
 
Correctness attraction __kth_2017
Correctness attraction __kth_2017Correctness attraction __kth_2017
Correctness attraction __kth_2017
 
09 workflow
09 workflow09 workflow
09 workflow
 
Error xaction etl_ktr
Error xaction etl_ktrError xaction etl_ktr
Error xaction etl_ktr
 
Os6 2
Os6 2Os6 2
Os6 2
 
Streaming Dataflow with Apache Flink
Streaming Dataflow with Apache Flink Streaming Dataflow with Apache Flink
Streaming Dataflow with Apache Flink
 
Introduction to State Machines
Introduction to State MachinesIntroduction to State Machines
Introduction to State Machines
 
Foomo / Zugspitze Presentation
Foomo / Zugspitze PresentationFoomo / Zugspitze Presentation
Foomo / Zugspitze Presentation
 
Python master class 2
Python master class 2Python master class 2
Python master class 2
 
Promises in JavaScript
Promises in JavaScriptPromises in JavaScript
Promises in JavaScript
 
Functional Programming in Groovy
Functional Programming in GroovyFunctional Programming in Groovy
Functional Programming in Groovy
 
PHP 7
PHP 7PHP 7
PHP 7
 
PHP Barcelona 2010 - Architecture and testability
PHP Barcelona 2010 - Architecture and testabilityPHP Barcelona 2010 - Architecture and testability
PHP Barcelona 2010 - Architecture and testability
 
Reliability Patterns for Fun and Profit
Reliability Patterns for Fun and ProfitReliability Patterns for Fun and Profit
Reliability Patterns for Fun and Profit
 
Gordon morrison temporalengineering-delphi-v3
Gordon morrison temporalengineering-delphi-v3Gordon morrison temporalengineering-delphi-v3
Gordon morrison temporalengineering-delphi-v3
 
The SAM Pattern: State Machines and Computation
The SAM Pattern: State Machines and ComputationThe SAM Pattern: State Machines and Computation
The SAM Pattern: State Machines and Computation
 
JDD2015: Frege - Introducing purely functional programming on the JVM - Dierk...
JDD2015: Frege - Introducing purely functional programming on the JVM - Dierk...JDD2015: Frege - Introducing purely functional programming on the JVM - Dierk...
JDD2015: Frege - Introducing purely functional programming on the JVM - Dierk...
 

Mehr von Gordon Morrison

Mehr von Gordon Morrison (11)

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

Kürzlich hochgeladen

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Kürzlich hochgeladen (20)

🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 

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