Extending Jazz WorkItem using Ecore codegen
Hi,
I was wondering if and how it is possible to extend the Jazz workitem using the codegen tool by either creating and EReference or extending the workitem object. I have found the workitem.ecore library in the source but i am not sure it is safe to simply load a reference to it and start extending. Thanks for any assistance, Boris |
5 answers
Hi Patrick,
Thanks for your quick response. I have read those documents and its not quite what i am looking for. To be more specific I do not really want to extend the model "in jazz" per se but rather refence it from my own. In other words, create a EReference to a WorkItem specifically. I found in the demo documentation that it is possible to reference a SimpleItem then cast it in the Java wrappers. Is this the recommended approach? In other words, enforce integrity in Java? In other words, i cannot reference the WorkItem type directly in the data model. Thanks, Boris |
Hi Boris
I was wondering if and how it is possible to extend the Jazz workitem Modifying the ecore and regenerating the work item component model is *not* recommended. Work Items can be extended using 'custom attributes': You can configure or provide UI controls for these attributes according to your needs (also for the Web UI and query editors). Please have a look at the following Wiki documents that describe the recommended way of extending work items: https://jazz.net/wiki/bin/view/Main/WorkItemCustomizability https://jazz.net/wiki/bin/view/Main/WorkItemCustomizableEditorDesign https://jazz.net/wiki/bin/view/Main/WorkItemWebDynamicLayoutDesign https://jazz.net/wiki/bin/view/Main/WorkItemCustomizableQueryEditorDesign HTH, Patrick |
Hi Boris
Sorry for the misunderstanding. Thanks for your quick response. I have read those documents and its not Yes, you can create references to work items. What we typically do is: - We create the model in RSA (here you would add a reference to work items) - We generate an ecore from the emx using the RSA plugin in JazzDevelopmentTools' update site - We generate the source in Eclipse using the codegen tool If you model the reference as a work item reference, there will be no need to cast. The reference will be a work item handle. HTH, Patrick |
Patrick,
The code seems to generate fine now. Thanks for you help! Boris |
kuschel@ca.ibm.com wrote:
Hi Patrick, For the scenario you are describing, I do recommend modeling a reference to a SimpleItem or Auditable (depending on the super-type of the workitem type that you want to reference) and hiding this loose-typing behind your facade. It's discussed a bit here: https://jazz.net/wiki/bin/view/Main/JazzBotWalkthrough#InterModelReferenceRules The reason I'd recommend doing it this way is that the codegen tool has some rough edges and every additional ecore model you reference makes the analysis codegen is doing more complex and more likely you will run into a codegen bug. |
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.