Previous Up Next

5  Define a process modeling notation

Process models can be used to denote workflows, business processes, and algorithms. We are in particular interested in a process modeling notation that allows us to analyze process models for certain patterns. Before we start defining the notation, we define the transitivity construct that shall be useful subsequently for defining the pattern.

Proposition in Class with
  attribute
    transitive: Proposition
  rule
    trans_R: $ forall x,y,z,R/VAR
                      AC/Proposition!transitive C/Proposition
                     P(AC,C,R,C) and (x in C) and (y in C) and (z in C) and
                     A_e(x,R,y) and (y R z) ==> (x R z) $
end

The predicate A_e(x,R,y) is true if there is an explicit attribute between objects x and y that has the category R.



Exercise 7: Define a process notation that allows tasks to be defined. Tasks can have successor tasks. Agents execute tasks. The successor relation shall be transitive.



Task with
  attribute,transitive
     successor: Task
end

Agent with
   attribute
     executes: Task
end 

The process modeling notation is very simple but it has the ability to represent very complex workflows. Let now distinguish start statements and predicate statements.



Exercise 8: A start statement is a task that has no predecessor (no task has a start statement as sucessor). A predicate statement is a task that has more than one successor. Define these concepts as query classes.



StartStatement in QueryClass isA Task with
  constraint
    c1: $ not exists t/Task (t successor this) $
end

PredicateTask in QueryClass isA Task with
  constraint
    c1: $ exists s1,s2/Task A_e(this,successor,s1) and
          A_e(this,successor,s2) and (s1 \= s2) $
end

You can define end statements in a similar way. A more tricky concept is the following.



Exercise 9 (difficult): Define the concept of a loop task, i.e. a task that is part of a loop. The name of the query shall be LoopTask.



LoopTaskOf in GenericQueryClass isA Task with
  parameter
    rep: Task 
  constraint
    c: $ (this successor rep) and (rep successor this) and
         (exists s/Task A_e(rep,successor,s) and (s successor rep)) $
end

LoopTask in QueryClass isA LoopTaskOf 
end


The parameter rep in the first query stands a representative of a loop. Note that there may be many loops inside a process model and we would like to be able to query, which tasks belong to the same loop. The second query just returns all loop statements regardless of the representative. It is sufficient to leave out a value for parameter rep in this case.

There can be several loops inside a process model. Loops can also be nested, i.e. a task can be member of several loops. Note that the regular attribution predicate (t1 successor t2) is closed under transitivity!

Now that we have defined loops, let us tackle the pattern "agent with split responsibility".



Exercise 10 (difficult): Assume that an agent A is responsible for tasks t1 and t2 in a process model but there is a task t between t1 and t2 that is executed by another agent. This matches situations where an agent does some work, then passes control to another agent, and afterwards resumes control. Define this patterns as a query class named AgentWithSplitResponsibility that returns agents with split responsibility.



AgentWithSplitResponsibility in QueryClass isA Agent with
   constraint
     c1: $ exists t1,t2,t/Task a/Agent (this executes t1) and
              (this executes t2) and (t1 successor t) and
              (t successor t2) and (a executes t) and (a \= this)$
end


The condition (a \= this) makes sure that the middle task t is executed by a different agent.





Previous Up Next