250 likes | 429 Views
Hasselt, 28 Sept 2012. 6 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 6 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
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 Create Final Marking New object needs to be created @ConnectionObjectFactory <<uses>> Petri net <<uses>> Replay pluginManager.find(ConnectionObjectFactory.class, FinalMarkingConnection.class,...); … childContext = context.createChildContext(...); … pluginParameterBinding.invoke(childContext, net); … childContext.getParentContext().deleteChild(childContext); Constructing Final Marking object using existing plugin
Overview Event Log Replay Alignments Visualizations ABBCE ABCDE … <<uses>> <<uses>> <<uses>> <<uses>> Petri net <<uses>> 1 … 2 3
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 … <<uses>> <<uses>> <<uses>> <<uses>> Petri net <<uses>> 1 … 2 3
3. 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
4. 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 … <<uses>> <<uses>> <<uses>> <<uses>> Petri net <<uses>> 1 … 2 3
Package distribution PNetReplayer Event Log Replay Alignments Visualizations ABBCE ABCDE … <<uses>> <<uses>> <<uses>> <<uses>> <<uses>> Petri net <<uses>> 1 … 2 3 <<uses>> <<uses>> PNetAlignmentAnalysis GuideTreeMiner & TraceAlignmentWithGuideTree
Improving reusability of your code context.tryToFindOrConstructFirstObject(...) <<uses>> ETConformance <<uses>> PNetReplayer CNetReplayer <<uses>> Compliance replayAlgorithm.replayLog(...) … replayAlgorithm.replayLog(...) Provide variants without GUI and connection
Take home points • Designing plugin • Create a non-GUI 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