org.processmining.exporting.bpel4ws
Class PatternMatcher

java.lang.Object
  extended by org.processmining.exporting.bpel4ws.PatternMatcher

public class PatternMatcher
extends java.lang.Object

This class implements methods to discover different components in a WF-net.

Author:
Kristian Bisgaard Lassen

Constructor Summary
PatternMatcher()
           
 
Method Summary
static java.util.TreeSet<PetriNet> findComponents(PetriNet wfnet)
          This method finds all components that exists in the WF-net.
static Component getComponentFromLibrary(PetriNet wfnet, Triple<java.lang.String,PetriNet,Activity> libraryComponent, java.util.TreeSet<PetriNet> components, java.util.Map<java.lang.String,Activity> annotations, java.util.Map<java.lang.String,Choice> choices)
          Finds a component from a the user defined LIBRARY-components
static Component getEindhovenComponent(java.util.TreeSet<PetriNet> components)
           
static Component getMaximalFlow(PetriNet wfnet, java.util.TreeSet<PetriNet> components, java.util.Map<java.lang.String,Activity> annotations, java.util.Map<java.lang.String,Choice> choices)
          Finds a maximal FLOW-component in a Petri net
static Component getMaximalSequence(PetriNet wfnet)
          Finds a maximal sequence in a given WF-net
static Component getPick(PetriNet wfnet, java.util.Map<java.lang.String,Choice> choices)
          Finds a PICK-component in a WF-net
static Component getSwitch(PetriNet wfnet, java.util.Map<java.lang.String,Choice> choices)
          Finds a SWITCH-component in a WF-net
static Component getWhile(PetriNet wfnet, java.util.Map<java.lang.String,Choice> choices)
          Finds a WHILE-component in a WF-net
static boolean isSelfContaining(att.grappa.Node source, att.grappa.Node sink, java.util.Set<att.grappa.Node> nodes)
          Answers if source and sink borders a component with the nodes in it
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PatternMatcher

public PatternMatcher()
Method Detail

getMaximalSequence

public static Component getMaximalSequence(PetriNet wfnet)
Finds a maximal sequence in a given WF-net

Parameters:
wfnet - - The net that is matched in
Returns:
A WF-net that is a marked graph and a state machine, or null if no such exist

getMaximalFlow

public static Component getMaximalFlow(PetriNet wfnet,
                                       java.util.TreeSet<PetriNet> components,
                                       java.util.Map<java.lang.String,Activity> annotations,
                                       java.util.Map<java.lang.String,Choice> choices)
Finds a maximal FLOW-component in a Petri net

Parameters:
wfnet -
choices -
Returns:
A workflow net that is a marked graph, or null if no such exists

isSelfContaining

public static boolean isSelfContaining(att.grappa.Node source,
                                       att.grappa.Node sink,
                                       java.util.Set<att.grappa.Node> nodes)
Answers if source and sink borders a component with the nodes in it

Parameters:
source - - A node
sink - - A sink
nodes - - A set of nodes
Returns:
The answer

getSwitch

public static Component getSwitch(PetriNet wfnet,
                                  java.util.Map<java.lang.String,Choice> choices)
Finds a SWITCH-component in a WF-net

Parameters:
wfnet - - A WF-net
choices - - A map describing the type of choice each place has
Returns:
A workflow net that represent an explicit choice

getPick

public static Component getPick(PetriNet wfnet,
                                java.util.Map<java.lang.String,Choice> choices)
Finds a PICK-component in a WF-net

Parameters:
wfnet - - A WF-net
choices - - A map over all places in the WF-net to their choice type
Returns:
A WF-net that represent an implicit choice, or null if none is found

getWhile

public static Component getWhile(PetriNet wfnet,
                                 java.util.Map<java.lang.String,Choice> choices)
Finds a WHILE-component in a WF-net

Parameters:
wfnet - - A WF-net
choices - - A map over all places in the WF-net to their choice type
Returns:
A workflow net that represent a while loop, or null if no such is found

findComponents

public static java.util.TreeSet<PetriNet> findComponents(PetriNet wfnet)
This method finds all components that exists in the WF-net. The components are order by node size, so the the smallest WF-nets are first in an iteration over the answer

Parameters:
wfnet - - The WF-net
Returns:
A tree set of components in the WF-net

getComponentFromLibrary

public static Component getComponentFromLibrary(PetriNet wfnet,
                                                Triple<java.lang.String,PetriNet,Activity> libraryComponent,
                                                java.util.TreeSet<PetriNet> components,
                                                java.util.Map<java.lang.String,Activity> annotations,
                                                java.util.Map<java.lang.String,Choice> choices)
Finds a component from a the user defined LIBRARY-components

Parameters:
wfnet - - A WF-net
libraryComponent - - A library component
components - - A set of components
Returns:
A component matched by a LIBRARY-component

getEindhovenComponent

public static Component getEindhovenComponent(java.util.TreeSet<PetriNet> components)