Once the Business Object model is defined, then it needs to be mapped to PLCS. This is achieved by use of Templates. First define the business templates required. See Template development for details on creating templates.
All templates that are used by the DEX need to be explicitly listed in the
<plcs_info_model.model> element within the dex.xml
file.
Having created the templates, their use in representing the Business
Object Model needs to be defined. This is done be creating a set of SysML Parametric
Diagrams that show the use of the templates. These are stored in the "PLCS PSM
Representation" section of the DEX, which is the
<plcs_info_model> element within the dex.xml
file.
All the DEXs and templates that are defined within a Context are specified using SysML. Hence it is necessary to set up the SysML environment.
In order to create the SysML PLCS PSM Representation Diagrams, a SysML package needs to be set up.
This comprises the following steps using: MagicDraw 17.0 sp4
plcslib\data\contexts\<<Context>>\dvlp\
plcslib\data\contexts\<<Context>>\dvlp\index.mdxml
Options-> Environment
Select PathVariables
Add a new path
variable named PLCSlib.data
and set the value to your local plcslib\data
folder Exit
MagicDraw WITHOUT saving the project!
Data/<<Context>>
(id the is the first DEX created in this context)
add a new package for the DEXs. Under Containment tab right click on
Data/<<Context>>
and select New Element
-> Package. Name the package DEXs
.
Data/<<Context>>/DEXs
and select
New Element -> Package. Name the package
<<DEX>>
.
<<DEX>>
package, named <<DEX>>DEXPlcsRep
.
Data/<<Context>>/DEXs/<<Package>>
;
New Diagrams->SysML Diagrams->SysML Block Definition
Diagram
<<DEX>>DEXPlcsRep
" as the SysML Block Definition Diagram name in Containment tree view;
"Autosize"
in order to reduce the size of the image.
"Diagram Properties"
"Autosize"
to "true"
File->Export To->Module
Select "OK" in the resulting
dialogue box. (If other dialogue boxes appear select "No".) In the resulting file
chooser, browse to
plcslib\data\contexts\<<Context>>\dexs\<<DEX>>\dvlp\
and save the new dex file as
<<Context>><<DEX>>DEXPlcsRep.mdxml
.
plcslib\data\contexts\<<Context>>\dvlp\index.mdxml
plcslib\data\contexts\<<Context>>\dvlp\index.mdxml
)
to replace the absolute module path to the newly created module with a relative module
path using the path variable PLCSlib.data. i.e. replace as shown below:
<mdElement elementClass='FileProperty'> <value>D:\Users\CVSroot\plcslib\data\contexts\<<Context>>\dexs\<<DEX>>\dvlp</value> <selectionMode xmi:value='0'/> <displayFullPath xmi:value='true'/> <useFilePreviewer xmi:value='false'/> <displayAllFiles xmi:value='true'/> <fileType>FILE_TYPE_ANY</fileType> </mdElement>
<mdElement elementClass='FileProperty'> <value><PLCSlib.data>\contexts\<<Context>>\dexs\<<DEX>>\dvlp</value> <selectionMode xmi:value='0'/> <displayFullPath xmi:value='true'/> <useFilePreviewer xmi:value='false'/> <displayAllFiles xmi:value='true'/> <fileType>FILE_TYPE_ANY</fileType> </mdElement>