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.
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.
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.
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".
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.