310 likes | 893 Vues
Hasselt, 28 Sept 2012. 7 Lessons Learned Case Study: Replay a Log on Petri Net for Conformance Checking plug-in. A. Adriansyah. ProM Workshop. Overview. Event Log. Replay. Alignments. Visualizations. ABBCE ABCDE …. <<uses>>. <<uses>>. <<uses>>. <<uses>>. Petri net. <<uses>>. 1.
E N D
Hasselt, 28 Sept 2012 7 Lessons LearnedCase Study: Replay a Log on Petri Net for Conformance Checking plug-in A. Adriansyah ProM Workshop
Overview Event Log Replay Alignments Visualizations ABBCE ABCDE … <<uses>> <<uses>> <<uses>> <<uses>> Petri net <<uses>> 1 … 2 3 <<uses>>
Replay algorithm // pseudocode Map event classes to transitions Check existence of Final Marking, create one if user wants Choose replay algorithm Execute replay algorithm Event Log ABBCE ABCDE … Replay Alignments <<uses>> <<uses>> <<uses>> Petri net 1 2 …
Check connection using ConnectionManager EvClassLogPetrinetConnection EvClassLogPetrinetConnectionFactory connectionManager.getFirstConnection(EvClassLogPetrinetConnection.class,…) Event Log ABBCE ABCDE … Replay <<uses>> If no connection, automatically create one <<uses>> <<uses>> @ConnectionObjectFactory Petri net Mapping is stored in EvClassLogPetrinetConnection
Replay algorithm // pseudocode Map event classes to transitions Check existence of Final Marking, create one if user wants Choose replay algorithm Execute replay algorithm Event Log ABBCE ABCDE … Replay Alignments <<uses>> <<uses>> <<uses>> Petri net 1 2 …
Construct new objects, not just connection FinalMarkingConnection Marking @ConnectionObjectFactory New object needs to be created Petri net Create Final Marking <<uses>> <<uses>> colPairOfIntPluginParamBinding = pluginManager.find(ConnectionObjectFactory.class, FinalMarkingConnection.class,...); … childContext = context.createChildContext(...); … pluginParameterBinding.invoke(childContext, net); … childContext.getParentContext().deleteChild(childContext); Replay Constructing Final Marking object using existing plugin
Overview Event Log Replay Alignments Visualizations ABBCE ABCDE … 1 2 <<uses>> <<uses>> <<uses>> <<uses>> Petri net <<uses>> 1 … 2 3 <<uses>>
Designing variants using interface IPNReplayParamProvider + constructReplayParameter + constructGUI IPNReplayAlgorithm + replayLog + isReqWOParameterSatisfied + isAllReqSatisfied + constructParamProvider IPNReplayParameter + isCreatingConn + isGUIMode + setInitialMarking <<uses>> Event Log <<uses>> ABBCE ABCDE … Replay <<uses>> Alignments <<uses>> <<uses>> <<uses>> Petri net 1 2 …
Register new algorithms without changing GUI code pluginManager.getKnownClassAnnotatedWith(PNReplayAlgorithm.class) Event Log ABBCE ABCDE … Replay Alignments <<uses>> <<uses>> <<uses>> @PNReplayAlgorithm @PNReplayAlgorithm @PNReplayAlgorithm Petri net 1 2 … Create annotation @PNReplayAlgorithm Annotate all algorithms with @PNReplayAlgorithm Use the annotation in replay GUI to register algorithms
Overview Event Log Replay Alignments Visualizations ABBCE ABCDE … 1 2 3 <<uses>> <<uses>> <<uses>> <<uses>> Petri net <<uses>> 1 … 2 3 <<uses>>
4. Visual Analytics <<uses>> <<uses>> <<uses>> <<uses>> <<uses>>
Visualization without heavy computation Alignments Project Alignment to Log Model Projected With Alignments Simply create visualization panel
Visualization may require extra computation Alignments xFrequent Movement Sets Mining for Deviation Analysis Frequent Item Sets need to be calculated Computation is postponed until visualization is needed
Visualization using another package Alignments Trace Alignment of Alignments <<uses>> <<uses>> TraceAlignmentWithGuideTree GuideTreeMiner Possible because of separated visualization panel class Don’t forget to add package dependencies
5. Create reusable side-object as needed ProvidedObjectHelper.publish(context, “Log of shown cases”, log, XLog.class, true);
Overview Event Log Replay Alignments Visualizations ABBCE ABCDE … 1 2 3 <<uses>> <<uses>> <<uses>> <<uses>> Petri net 4 5 <<uses>> 1 … 2 3 <<uses>>
Package distribution PNetReplayer Event Log Replay Alignments Visualizations ABBCE ABCDE … <<uses>> <<uses>> <<uses>> <<uses>> <<uses>> <<uses>> Petri net <<uses>> 1 … 2 3 <<uses>> <<uses>> <<uses>> PNetAlignmentAnalysis GuideTreeMiner & TraceAlignmentWithGuideTree
Improving reusability of your code context.tryToFindOrConstructFirstObject(...) <<uses>> ETConformance <<uses>> PNetReplayer CNetReplayer <<uses>> Compliance replayAlgorithm.replayLog(...) … replayAlgorithm.replayLog(...) Provide headless version and one without connection
Overview Event Log Replay Alignments Visualizations ABBCE ABCDE … 1 2 3 <<uses>> <<uses>> <<uses>> <<uses>> Petri net 4 5 <<uses>> 1 … 2 3 <<uses>> 6 7
Take home points • Designing plugin • Create a headless version of your plugin • Reuse objects • Utilize interface and annotations to cover variants • Designing GUI • Separate visualization panel • Reuse code: see Widgets package • Designing package • Keep it small