1 / 20

Palladio Workflow Engine

Palladio Workflow Engine. SDQ Lerngruppe 2010. Motivation. Structure and run activities consisting of a set of actions Make actions reusable and configurable Example: Run simulation Read in Eclipse configuration Load PCM models Check PCM model validity Generate code

Download Presentation

Palladio Workflow Engine

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Palladio Workflow Engine SDQ Lerngruppe 2010

  2. Motivation • Structure and run activities consisting of a set of actions • Make actions reusable and configurable • Example: Run simulation • Read in Eclipse configuration • Load PCM models • Check PCM model validity • Generate code • Consists of sub-step • Run simulation • Clean up all side effects Lerngruppe Workflow Engine

  3. Idea: Plug together configurable workflow jobs Couldbeusedforrunning multiple simulationswithoutnewcodegeneration Reusablefor PCM Solver! Load PCM models Check model validity TransformPCMToCodeJob Run simula-tion Configuration Configuration Configuration Configuration Xpand Genera-torJob Xpand Genera-torJob Xpand Genera-torJob … File = repository File = system File = allocation Clean up: Each Job provides a cleanupmethodandthusencapsulatestherequired clean upactions. Example: Delete generatedcode. Lerngruppe Workflow Engine

  4. Concepts • Job • Configuration • ConfigurationBuilder • Blackboard Lerngruppe Workflow Engine

  5. Job • Defines an activity • Can be composed • Three steps • Construct job • Execute job • Call rollback (optional) • Configuration is passed to the constructor • A prepared chain of jobs can be executed without knowledge what jobs they are. Lerngruppe Workflow Engine

  6. Example Composed Job Composite job: Calls all itschildrenwhenexecuted in the order theywereadded packagede.uka.ipd.sdq.workflow.pcm.jobs; publicclassLoadPCMModelsIntoBlackboardJob extendsOrderPreservingBlackboardCompositeJob<MDSDBlackboard> implementsIJob, IBlackboardInteractingJob<MDSDBlackboard> { /** * Constructor of the PCM loader job * @paramconfig A PCM workflow configuration containing the list of URIs * where to find the PCM model files */ publicLoadPCMModelsIntoBlackboardJob( AbstractPCMWorkflowRunConfigurationconfig) { super(); this.add(newPreparePCMBlackboardPartionJob()); this.add(newLoadPCMModelsJob(config)); } } Blackboardinteracting: An MDSD blackboardissetand also setfor all children CompositeJob: Rollback iscalledfor all children Lerngruppe Workflow Engine

  7. Job Inheritance Tree • AbstractCompositeJob • Implements List<IJob> • Allows to add jobs to internal list • Calls each job‘s rollback for rollback • OrderPreservingCompositeJob • Execute: Executes contained jobs in the order they have been added • OrderPreservingBlackboardCompositeJob • Has setBlackboard method • Typed by a Blackboard type • Sets blackboard for contained blackboard interacting jobs before executing them Lerngruppe Workflow Engine

  8. Available (Abstract) Jobs Lerngruppe Workflow Engine

  9. Configuration • Jobs are configured by passing configuration objects • Configuration contains info how to run the job • Examples • Which PCM files to load • How many measurements in SimuCom • Logging level • Which PCM solver to use (LQN, LQNSim, ...) • Which feature annotation to use • The built-in Eclipse ILaunchConfiguration is not used to make the workflows independent of being started from the run dialogue. • E.g. SimuCom is started as a web service in the SLA@SOI project Lerngruppe Workflow Engine

  10. Configuration Hierachy Onlyexampleattributesshown Validation, requireserrormessagetemplatemethod Allowstosetinteractivemode, usercanact upon failures Containsfurther PCM Solver configuration Contains PCM model files URLs Containsconfigforplugingenerationandwhetherexistingcodecanbedeleted Containsfeature model handling ContainsfurtherSimuComconfiguration Lerngruppe Workflow Engine

  11. ExampleEclipse Launch Dialogue Savedaskey-value-pairs in an EclipseLaunchConfiguration Callsyourimplementationof an EclipseLaunchConfigurationDelegate Prof. Max Mustermann - Title

  12. Launch Configuration Delegates • Create configurationfromEclipserunconfig • Calledwhenyouclickrun in Eclipse • Launch methodcalledwithEclipseLaunchConfiguration • ILaunchConfigurationwith Properties • Youneedtosetmonitoring, debuglevels, loggers, … Lerngruppe Workflow Engine

  13. Workflow Launch Configuration Delegates • Abstract delegatehandlesEclipsespecifics • Remainingtemplatemethods • Create workflowjobs • Deriveconfiguration • Just implementthose! Lerngruppe Workflow Engine

  14. DelegateHierachy All Eclipsestuff, onlycreateWorkflowandderiveConfigabstract AddesabstractcreateBlackboard, fixes Blackboard type toMDSDBlackboard. ImplementscreateBlackboardandcreateWorkflowfor PCM models DeriveSimuComconfig Derive PCM Solver config (fixes genericWorkflowConfigurationType) Lerngruppe Workflow Engine

  15. Configuration Builder • Most Jobs require a certain type ofconfiguration • Fillingthesebased on theEclipseinputisencapsulated in Builders • Can bereused in multiple launchdelegates Lerngruppe Workflow Engine

  16. ConfigurationBuilderExample publicclassSimuComWorkflowLauncherextends AbstractPCMLaunchConfigurationDelegate<SimuComWorkflowConfiguration> { @Override protectedSimuComWorkflowConfigurationderiveConfiguration( ILaunchConfigurationconfiguration, String mode) throwsCoreException { SimuComWorkflowConfigurationconfig = newSimuComWorkflowConfiguration(); AbstractWorkflowConfigurationBuilderbuilder; builder = newPCMWorkflowConfigurationBuilder(configuration, mode); builder.fillConfiguration(config); builder = newSimuComLaunchConfigurationBasedConfigBuilder( configuration, mode); builder.fillConfiguration(config); returnconfig; } } Create therequiredconfig Create a builderforthe PCM configpart Letthisbuilderfill in the PCM info (model filenames, …) Create a builderfortheSimuComconfigpart Letthisbuilderfill in theSimuCominfo (maxmeasurements, wheretostore, …) All infoiscontainedhereandcanbereadby a PCM model loaderandbySimuCom Lerngruppe Workflow Engine

  17. Mapping theConfiguration Builderfillsconfiguration Clicking Run extractsconfiguration publicvoidfillConfiguration(AbstractWorkflowBasedRunConfigurationconfiguration) throwsCoreException { SimuComWorkflowConfigurationconfig = (SimuComWorkflowConfiguration) configuration; config.setSimulateLinkingResources(getBooleanAttribute(ConstantsContainer.SIMULATE_LINKING_RESOURCES)); config.setCleanupCode(getBooleanAttribute(ConstantsContainer.DELETE_PLUGIN)); config.setPluginID(getStringAttribute(ConstantsContainer.PLUGIN_ID)); … EclipseILaunchConfigurationeConf: ("simulateLinkingResources" = false) ("clear", true) ("outpath", "...codegen.simucominstance") ("variable", "") ("minimum", "") ("maximum", "") Builderisinstantiatedbydelegate newSimuComLaunchConfigurationBasedConfigBuilder(eConf, mode); Prof. Max Mustermann - Title

  18. Blackboard • Many Jobs require access to model files • Do not just store the URLs in the config • Load files just ones •  Keep a blackboard with the model files • Jobs can access data from blackboard by an ID • Concepts • Blackboard interacting Jobs • MDSD Blackboard • EMF Resource Partitions Lerngruppe Workflow Engine

  19. Blackboard Classes Hasseveralpartitionswith an ID and a type T tostoreinformation Type T isfixedto a ResourceSetPartitiontostore EMF model instances For PCM models, an MDSDBlackboardisfilledwithspecialisedPCMPartitionstoconvenientlyaccessthe model files Lerngruppe Workflow Engine

  20. Workflow plugins • Workflow • Main concepts • Eclipse-dependent • Abstract classes with template methods • Launchconfig • Build configurations based on Eclipse launch configs • MDSD • Read in EMF models • OAW and MediniQVT support • PCM • Build PCM configuration • Useful PCM jobs • Tests Lerngruppe Workflow Engine

More Related