How to Create Your Own Product-Modeling Environment
-
Upload
tim-geisler -
Category
Software
-
view
307 -
download
4
Transcript of How to Create Your Own Product-Modeling Environment
How to Create Your OwnProduct Modeling Environment
Tim Geisler
webXcerpt Software GmbH
CWG 2011, Marco Island 2011-10-04
Product Modeling
Product Modeling
Specification Coding in SAP R/3● Materials● BOMs● Classes● Cstics● Procedures● Constraints● Selection Conditions● Interface Designs
Product Modeling Environment
Means for describing product model➔ Textual domain-specific language➔ Tailored to your needs
Tooling➔ Eclipse-based Integrated Development
Environment (IDE)➔ Functionality tailored to your needs
Domain-Specific Languages
Domain-Specific Languages
Domain-specific language (noun): a computer programming language of limited expressiveness focused on a particular domain.
The two main reasons why DSLs are popular:● Improving productivity for developers● Improving communication with domain experts
(Martin Fowler)
Customer Project @
Company-wide generic product structure
NSN VC frameworkIPC extensionscoding conventions
Standardizedproductdescriptions
Customer Project @
Company-wide generic product structure
NSN VC frameworkIPC extensionscoding conventions
productdescriptions
Standardized Formalized
Customer Project @
Company-wide generic product structure
NSN VC frameworkIPC extensionscoding conventions
productdescriptions
Standardized Formalized
Tooling: Eclipse-based IDEsConfigModeler
VClipse
Domain Specific LanguagesCML + CMLUI + CMLT
VCML
ConfigModeler and Vclipse:Two DSLs with Eclipse-based IDE
RFC
Editor/IDE
Editor/IDE
ConfigModeler
VClipse
CML
VCML
Code Generation
CML: Customer's Concepts
product structure
grouping for order structure
logical materials
domains
complex expressions
equations
counting
VCML: SAP's Concepts
Language elements for describing VC objects:
● cstic● class● dependency net● …
Embedded SAP languages for dependencies
Code Generation: CML to VCML
Generate VC objects and dependencies● correct ordering of procedures
Use NSN VC framework● use generic variant functions● use generic cstics● use generic procedures and dependency nets● respect NSN naming conventions
Code generation on the fly● using Eclipse builder infrastructure
Interfacing SAP
Two mechanisms for interfacing SAP● ALE via IDocs (Product Data Replication)● create/change/read/delete objects via RFC
Reading objects via RFC● Model extraction from SAP to VCML
No extraction of CML from SAP possible!
IDE: Tooling for Modelers
IDE: Tooling for Modelers
Syntax checking
Cross references
Semantic checking
IDE: Tooling for Modelers
Outline
Templates Content AssistFolding
Renamerefactoring
Companion Languages
Companion Language I: CMLUINSN UI Enhancement Framework
Framework for describing
● widgets (headings, checkboxes, notes, …) and
● layout (columns, font, color, spacing)
Old: Maintenance Dialogs New: DSL + IDE Tooling
Companion Language II: CMLTAutomated Model Testing
Test tool at NSN:Fysbee's ConfigScan
DSL for describing test cases usingCML concepts
Companion Language II: CMLTTest-Case Execution
● Remote call of ConfigScan from ConfigModeler
● Display of test results in separate view
● Navigation to corresponding test statement in test-case language
Companion Language II: CMLTSupport for Test-Case Maintenance
● Test-coverage analysis (static)Is there a test case for each material, cstic, ...?
● Fully integrated languages CML / CMLT
● Robustness: generation of ConfigScan code● Import of test cases from IPC export files
Use of ConfigModeler @
More than 100 product models are currently in development using ConfigModeler.
(prototypes not included)
About 50% of these product models are already on production system.
About 50% of all product models on production system have been built with ConfigModeler.
(size and complexity not taken into account)
Showtime
Product “hiT 7030”
Multiplexes STM-1/STM-4 to 2M, 34/45M, STM-1, STM4
1 uplink board with 2 SFP module slots
3 downlink boards with 0-6 SFP module slots
Life Demo: Modeling with DSLs
Demo: Deployment to SAP
● Using PDR
Technology in Use
Open source technology based on Java● Eclipse: IDE platform● Xtext:
● domain-specific language framework● ANTLR-based parser● IDE generated automatically● adaptable via dependency injection (Google Guice)
● EMF: Eclipse Modeling Framework
SAP JCo / IDocs library
VClipse is Free
VClipse is Free
VClipse.org: Open Source
Use, adapt, integrate, contribute!
Use Cases for VClipse
Mass upload (of parts) of configuration
Model comparison– Use textual or EMF diff tools to compare models
Model versioning– use version control system for textual models
Model refactoring– rename objects, move cstics
Model validation– check own naming conventions– check for syntactic and semantic errors
How to Create Your OwnProduct Modeling Environment?
Product Modeling Environment @ NSN
RFC
Editor/IDE
Editor/IDE
ConfigModeler
VClipse
CML
VCML
Code Generation
My Own Product-Modeling Environment
RFC
Editor/IDE
Editor/IDE
my ConfigModeler
VClipse
myCML
VCML
my Code Generation
Building Blocks
Metamodel
Editor/IDE
my ConfigModeler
myCML
my Code Generation
Scoping + ValidationTarget Architecture
Grammar
Import fromLegacy Configurators
or Specifications Export / Reports Vclipse adaptions
Code Generation
IDE adaptions
Defining yourModeling-Language Grammar
● using the Xtext grammar language
● from this grammar, the following is derived:● metamodel (Ecore + Java classes)● parser● editor with syntax highlighting, content assist,
outline, folding, ...
Defining yourModeling-Language Metamodel
Represents all product models in the domain(like a schema)● EMF Ecore Meta Model● Generated from grammar or defined separately● Source of transformation
Scoping + ValidationLanguage Aspects not Represented in Grammar Scoping: visibility of objects for cross-references
Validation: checks for complex model properties
Defining yourTarget Architecture
Clear: SAP Variant ConfigurationOpen aspects:
● Naming conventions● Which objects should be modeled?● Constraints / conditions on values?● BOM calculation● Use of variant tables● Use of certain variant functions● …
Might be very company-specific!
Code Generation
Task: map myCML models (instances of your metamodel) to VCML models● Respect your target architecture● Various means to implement:
● Java● EMF model transformation languages
IDE Adaptions● Xtext-based editors are highly configurable
through dependency injection using Google Guice
● Nearly each part of system can be adapted and replaced.
Import from Legacy Configurators● Task: map models of your legacy configurator to
xCML models● Various means to implement, depending on
your legacy configurator:● Extension of legacy transformator● XML transformation using e.g. XSLT● Implement DSL for legacy configurator
use model 2 model transformation to transform to xCML
● ...
Export / Reports● Use EMF model to text transformation language ●
Features for Free● Due to the use of Eclipse as platform,
you get a lot of features for free:● Integration of all modern version control systems
(CVS, Subversion, Git, …)● Textual file comparison● Task-focused work using Mylyn● Integration of bug-tracking systems● Query / replace with regular expressions● ...
Conclusion
Conclusion
Textual Domain-Specfic Languages● suitable for product modeling● modern tooling easy to create with Eclipse/Xtext
VClipse● interface to SAP system when using DSLs ● open-source tool useful for various modeling tasks
How to create your own product-modeling environment● identified several building blocks
Thanks to ...
● various persons at Nokia Siemens Networks● Peter Muthsam & Michael Wilhelm (SAP VC)● Fysbee team for ConfigScan support● Daniel Naus (CWG Sandbox)● various persons at itemis (Xtext)● webXcerpt team
How could product modeling with textual DSLslook like for your domain and your company?