Author Topic: Variable Content In Documents  (Read 14088 times)

Claudia_Dogaru

  • EA User
  • **
  • Posts: 30
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Variable Content In Documents
« on: August 01, 2007, 06:36:03 am »
We are creating templates in EA also want the flexibility to include or exclude specific information content from the RTF report. For example, when we generate a document for a client we need the ability to include/exclude certain information like a requirement that is specific to one customer only. One suggestion is to use tagged values but I am not sure how to do that, even after reading the help text/user guide, or even if it is the best solution for this purpose. I would appreciate some guidance and feedback as to the best approach/solution that would fit our purpose.

We need the entire template solution to be created and reside in EA, we do not want to use MS Word documents as part of our template solution. Can someone please suggest the best method to achieve this goal?

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Variable Content In Documents
« Reply #1 on: August 01, 2007, 10:39:10 am »
Hi Claudia,

Perhaps the following will help, or at least give you some thinking points.

I wonder about the wisdom of using tagged values, considering your context - you want to customize output on a per-client basis.

This makes me wonder if you'd want to distribute the underlying model to a client, if it contained client-specific tagged values for other clients.

When you say you want the entire solution to "be created and reside in EA" would this be broad enough to include an add-in? If so, perhaps you could store your client preferences outside of EA, or in a separate EA model for only that purpose. The add-in would look up the preferences for a particular client and generate the output you desire.

There are various ways this could be done. Two examples come to mind right off the bat, without any attempt to be exhaustive.

One would be to make a one-time copy of the model and insert customized values. You would then create output as usual, from the custom model, then delete (or archive) it. You could create a new custom model at any time, which would reflect the base (reference) model at that point.

Another would be to custom-generate the output directly from the add-in. This could be done by setting (temporary) values and using triggering the output functions, by directly building and writing output from the add-in code, or some combination of the two. Once you were done you'd clean out any temp values, perhaps after archiving a copy of the model.

HTH, David
« Last Edit: August 08, 2007, 01:18:09 am by Midnight »
No, you can't have it!

Claudia_Dogaru

  • EA User
  • **
  • Posts: 30
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Variable Content In Documents
« Reply #2 on: August 01, 2007, 11:04:28 am »
Thank you for your input David but I am looking for a solution that resembles "conditional text". This information would reside in the same model/project and would disply or be invisible depending on the customer that the report is generated for.

What we are specifically looking for is text that has a "Yes/No flag/option" functionality - the flag/option can be turned on (the information displays) or turned off (the information is now invisible)depending on the customer the report is generated for.

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Variable Content In Documents
« Reply #3 on: August 01, 2007, 11:31:35 am »
Just so I have a better idea of what you are saying:

Do you anticipate storing these conditional values within an EA model?

If so, will you distribute such a model to multiple customers?

And once again if so, would the various conditional values present a problem if the details of the model were examined by a customer?
No, you can't have it!

Claudia_Dogaru

  • EA User
  • **
  • Posts: 30
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Variable Content In Documents
« Reply #4 on: August 02, 2007, 05:03:06 am »
Thank you for your reply and here are the answers to your questions.

We definitely want to store the "conditional values" in the EA model. Requirements are a good example, different cutomers may have different requirements associated with the same project/model.

This model may be distributed to multiple customers, published in HTML format, customers will not have access to the model through an EA application.

Since the models are published in HTML for customers we want customers to only see the model details that are pertinent/part of their project. Therefore, our goal is to create one model/project with details/requirements that apply to multiple customers and the ability to pick which details each customer sees when the model is published. To clarify, Model 1 has requirements A, B, C, & D associated with it. The model is publcihed in HTML for Customer 1 with requirements A, B, & C and for Customer 2 with requirements A & D.

I hope this clarifies our goal.

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Variable Content In Documents
« Reply #5 on: August 02, 2007, 05:34:12 am »
Quote
I hope this clarifies our goal.


Not quite Claudia, but the fault is entirely mine.

In my message the term "model" meant the EA project (such as an EAP file). This is a colloquilaism, and it blurs the meaning. You are quite correct to draw a distinction between the model and the containing project.

So, what I should have asked was...

Will the EA project will be published to customers?

It seems that you will only be publishing 'extracts' - the actual "models" as per above - which will be phrased as HTML output or something along those lines. You will have (or wish to have) complete control over the actual elements included in each such publication instance. Further, this control will be scoped to individual customers.

[An important point here: remember that there is a no cost read-only EA reader (EA Lite). If you distribute the entire project your audience will be able to use the reader to peruse all customers' requirements.]

The way you describe it, you could likely describe the association between customers and requirements (or whatever other elements are customized the way you need) through tagged values. Look through the EA documentation for how to set up tagged values, as it will give you some ideas. Note that the tagged values can have a range of data types, beyond simple text strings.

You're still left with filtering the reports. This is an area where numerous requests have been made to Sparx, but we don't yet have much progress.

I'd suggest - once again - that you consider writing an add-in to address this need. My guess is that it will be a relatively small add-in, but of course I've not tested this assumption.

I wonder if you could do this via virtual documents. The EA help sometimes calls these document objects - you'll find information under both headings in the help index, with slightly different items listed. This is worth a try, but it might not provide the level of flexibility you require. I think these things date back to before HTML documentation from EA, but they seem to have been kept current.

David
« Last Edit: August 08, 2007, 01:18:34 am by Midnight »
No, you can't have it!

Claudia_Dogaru

  • EA User
  • **
  • Posts: 30
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Variable Content In Documents
« Reply #6 on: August 02, 2007, 09:20:08 am »
Thank you again for your sugeestions.

Here's my strategy to achieve our goal of customizable templates - virtual documents with document artifacts.

I looked up both add-ins and value tags and am not sure how they can be useful for my purpose. So I am not sure how I should proceed here. Can you please elaborate?

I also ran into another issue. It would be useful to be able to use a base document artifact as a starting point and be able to copy it (I tried a simple copy & paste and it didn't work), which is the equivalent of a Save As in MS Word. You start off with one document (Document 1), you add information to it and save it with another name (Document 2) and now you have your original document plus the one you created. Is there a quick and easy way to do that with document artifacts in EA?

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Variable Content In Documents
« Reply #7 on: August 02, 2007, 09:43:40 am »
Quote
I looked up both add-ins and value tags...

I'm not sure we're talking about the same thing. I was referring to tagged values, as defined by UML.

Quote
It would be useful to be able to use a base document artifact as a starting point and be able to copy it (I tried a simple copy & paste and it didn't work)...

Select the 'source' artifact on a diagram, then choose Copy from the Edit menu. Go to the 'target' diagram, click somewhere to make sure no element is selected, and from the main menu Choose Edit | Paste Elements | As New. If the As New option is disabled try again, making sure you've selected and deselected carefully.

David
No, you can't have it!

Claudia_Dogaru

  • EA User
  • **
  • Posts: 30
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Variable Content In Documents
« Reply #8 on: August 02, 2007, 10:25:40 am »
I be;lieve we are talking about different things so I will try to clarify and also ask one question at a time.

The document artifacts I created reside as part of one model/package in the Project Browser. To copy this document artifact, I clicked on one of the document artifacts I created to select it, then I selected Copy fporm the Edit menu, then Edit and Paste Elements as Link becasue that was the only option that wasn't greyed out.

I would like to be able to duplicate the document artifacts in the Project Browser with the Copy and Paste functionality but cannot figure out a way to do that. Can you help with this?


Jan ´Bary´ Glas

  • EA User
  • **
  • Posts: 408
  • Karma: +0/-0
  • Bary
    • View Profile
Re: Variable Content In Documents
« Reply #9 on: August 02, 2007, 09:28:24 pm »
For copying (same element with different GUID, not connected to the original one) you can use XMI export - import. Check the Strip GUID box when importing.
As the feature works on packages only you have to drag and drop the element into new one.

HTH, Bary
Jan 'Bary' Glas

Claudia_Dogaru

  • EA User
  • **
  • Posts: 30
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Variable Content In Documents
« Reply #10 on: August 07, 2007, 05:49:31 am »
I am not overly familiar with the EA application yet so I am unclear on how to do what you suggested in your answer.

Can you please describe/clarify your answer by using a step by step approach to answer the question? For eaxmple, to copy a document artifact, click on Project, select Import/Export, and so on......

In other words, I require further clarification to understand the procedure you described in your answer.

Jan ´Bary´ Glas

  • EA User
  • **
  • Posts: 408
  • Karma: +0/-0
  • Bary
    • View Profile
Re: Variable Content In Documents
« Reply #11 on: August 07, 2007, 11:08:54 pm »
Quote
...
I would like to be able to duplicate the document artifacts in the Project Browser with the Copy and Paste functionality but cannot figure out a way to do that. Can you help with this?

Hi Claudia,
you want to take an existing element and make a new one with all attributes same, do you?
Step-by-step:
1. Move all elements you want to duplicate in an empty folder.
2. From the context menu (right click) pick Import/Export | Export package to XMI file...
3. Export it (defaults are OK)
4. Drag the original elements back, where it belongs
5. Use context menu on a target folder. Pick Import/Export | Import package from XMI file...
6. Make sure you checked "Strip GUID"
7. Import

Hope it is clearer now.
Jan 'Bary' Glas

Claudia_Dogaru

  • EA User
  • **
  • Posts: 30
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Variable Content In Documents
« Reply #12 on: August 08, 2007, 06:28:03 am »
Thank you for your reply. Your answer is clear and I followed the steps you outlined but am unable to successfully copy the elements. I am not sure if this makes a difference but these are document artifact elements, where the element type is artifact and the stereotype is document.

I created the 2 document artifact elements in a package called Version - the package folder is copied over but the elements do not copy with them.

Can you tell me what I can do to copy the elements over with the package folder?

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Variable Content In Documents
« Reply #13 on: August 08, 2007, 06:50:51 am »
Claudia,

Did you follow Jan's step 6 exactly?

David
No, you can't have it!

Claudia_Dogaru

  • EA User
  • **
  • Posts: 30
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Variable Content In Documents
« Reply #14 on: August 08, 2007, 07:05:16 am »
Yes I did. I wonder if for Step 2 I should export the files to the same folder where the Sparx program files reside. Currently I am exporting the files to another folder on my hard drive. The location to Export to wasn't specified in Jan's response - could that be the issue? Otherwise I can't figure out what's wrong.

Can you please provide guidance on this becasue my deadline is the end of this week?