فصول الدورة
التدريب · المسار 6. الترحيل إلى Holarch · الفصل 6.4 من 5
6.4 النماذج من أدوات أخرى 2:44
استورد نموذج SysML من XMI: ما الذي ينتقل، وما الذي لا ينتقل، وكيف تعيد بناء العروض.
يعرض Holarch 2.21.
ما ستتعلمه
- استورد نموذج UML/SysML (XMI أو مشروع Cameo بصيغة .mdzip) إلى مشروع مفتوح
- سمِّ ما يجلبه الاستيراد من أداة أخرى وما يتركه
- تحقق من العناصر والعلاقات المستوردة في قاعدة البيانات وقسم «التتبع»
- أعد بناء عرض من العلاقات المستوردة
استورد نموذجًا أقدم لـ Plant Inspection Drone من ملف XMI، وهو تنسيق التبادل الذي تصدّره أدوات SysML: تنتقل كتله وأجزاؤه وأنشطته مع تدفقها وتخصيصاتها كأصول وإجراءات وعلاقات؛ أما تخطيطات المخططات فلا. تحقق من النتيجة في قاعدة البيانات ومخطط الإجراءات المستورد، وأعد بناء عرض بمخطط أصول مرسوم من العلاقات المستوردة.
ملفات المشاريع
- مشروع البداية (.holarch.json؛ إدارة المشاريع ← ملفات المشروع ▾ ← استيراد مشروع (.json)…)
- المشروع المكتمل (.holarch.json؛ إدارة المشاريع ← ملفات المشروع ▾ ← استيراد مشروع (.json)…)
يُشغَّل الفيديو من holarch.app؛ راجع سياسة الخصوصية.
التطبيق العملي
نفّذ هذا بنفسك في Holarch، على المشروع التوضيحي CubeSat EO-1.
- افتح مشروع EO-1 التوضيحي (إذا لم يكن لديك واحد، فأنشئه: إدارة المشاريع ← ملفات المشروع ▾ ← مشروع توضيحي جديد ← CubeSat (هندسة أنظمة موجّهة)). افتح الاحتياجات والمتطلبات ← الاستيراد والتصدير، وانقر تصدير UML/SysML (XMI)… في بطاقة التصدير، وأبقِ التنسيق على OMG XMI 2.5.1 (.xmi)، ثم انقر تصدير. يحل هذا الملف محل تصدير من أداة SysML مثل Cameo أو Enterprise Architect.
- في إدارة المشاريع، انقر + مشروع جديد، وسمّه
EO-1 Import Practice، ثم انقر إنشاء مشروع. افتح الاحتياجات والمتطلبات ← الاستيراد والتصدير، وأفلت ملف .xmi، وتحقق من أن التنسيق يعرض UML/SysML (.xmi, .uml, .mdzip)، وانقر متابعة مرتين، واقرأ مراجعة، ثم انقر استيراد N عنصر. - في قاعدة البيانات، ابحث عن
class:Asset، وحدد Payload Camera، وتحقق في التتبع من أنه جزء من EO-1 Spacecraft ومن الإجراءات التي ينفّذها. - افتح المخططات، وانقر + مخطط جديد، واختر مخطط Asset، واختر EO-1 Spacecraft في مخطط لـ، ثم انقر إنشاء.
- فعّل الـ Actions المؤداة لعرض وظائف كل نظام فرعي.
تكون قد انتهيت عندما يعرض مخطط الأصول في المشروع الجديد الأنظمة الفرعية للمركبة الفضائية مع الإجراءات التي تنفّذها.
اختبر نفسك
- ما الملفات التي يستطيع Holarch استيرادها من أداة SysML v1، وكيف تحصل عليها؟
- لماذا تستطيع إعادة بناء المخططات بسرعة بعد الاستيراد؟
- تستورد تصديرًا أحدث للنموذج نفسه. لماذا لا تحصل على نسخ مكررة؟
إظهار الإجابات
ما الملفات التي يستطيع Holarch استيرادها من أداة SysML v1، وكيف تحصل عليها؟
XMI 2.x مع ملف تعريف SysML 1.x من Cameo/MagicDraw أو Enterprise Architect أو Rhapsody أو Papyrus (صدّره من الأداة)، ومشروع Cameo أو MagicDraw بصيغة .mdzip مباشرة، وملف Papyrus بصيغة .uml. ويمكن أن تأتي المتطلبات وحدها أيضًا بصيغة ReqIF، والجداول بصيغة Excel أو CSV.
لماذا تستطيع إعادة بناء المخططات بسرعة بعد الاستيراد؟
لا تُستورد تخطيطات المخططات من أداة أخرى، لكن العلاقات تُستورد. ويرسم Holarch مخططات الأصول والتسلسل الهرمي وغيرها من تلك العلاقات.
تستورد تصديرًا أحدث للنموذج نفسه. لماذا لا تحصل على نسخ مكررة؟
يحتفظ كل عنصر مستورد بمعرّف XMI الخاص به، ويكون الإعداد الافتراضي لـ «مطابقة الكيانات الموجودة حسب» هو معرّف XMI لملفات XMI، فيحدّث الاستيراد اللاحق تلك العناصر. ولا تُضاف العلاقات الموجودة مرتين.
قراءة المزيد
النص المكتوب
إظهار النص المكتوب (التعليق الصوتي وما يظهر على الشاشة)
Introduction
Chapter four: models from other tools. Teams that used another modeling tool usually have a model to bring along, not just requirements. Holarch reads UML and SysML models in XMI, the exchange format that SysML tools export.
We import an older model of the Plant Inspection Drone. The file was made for this course, in the form a SysML tool exports.
What comes across
Be clear about what comes across. Blocks become assets, and their parts become the decomposition. Activities become actions, with their flow, and allocations say which asset performs each action. Diagram layouts do not come across: you rebuild the views you need in Holarch.
On screen: Card: what comes across.
Import the file
Open Needs and Requirements, then Import and Export, and drop the file. Holarch detects the format from the file: UML and SysML.
On screen: Needs & Requirements → Import and Export → drop the .xmi file → Analyzed.
Click Continue, and Continue again. Review lists ten new items and eleven relationships, and one activity whose flow comes from the file. Click Import, and the items are merged into the open project. Each one keeps its XMI ID, so importing a later export of the same model updates them instead of adding copies.
On screen: Continue → Map → Continue → Review → Import 10 items.
Check the result
Open the Database, and filter to assets: type class, colon, Asset. The drone, its five subsystems and their descriptions are all here.
On screen: Database → class:Asset.
Select the flight controller, and open Trace in its inspector. It is part of the drone, and it performs Fly Inspection Route: the allocation from the old model.
On screen: Flight Controller → inspector Trace.
The activity came across with its flow. Open Inspect a Tank on the Diagrams page: its action diagram runs the three steps in order.
On screen: Diagrams → Inspect a Tank action diagram.
Rebuild the views
The block diagrams did not come across, but the relationships did, so views are quick to rebuild. On the Diagrams page, choose New Diagram, then Asset Diagram, with the drone as its root: its subsystems are drawn at once.
On screen: Diagrams → New Diagram → Asset Diagram → root Plant Inspection Drone → Create.
Turn on Performed Actions, and each subsystem shows the functions it performs.
On screen: Show Performed Actions.
Recap
Let's recap. An XMI file brings blocks, parts, activities with their flow, and allocations, as assets, actions and relationships. Diagram layouts are rebuilt in Holarch, and the imported relationships make that quick.
Next, cleaning up after all these imports.