Top 5 handy hints for creating ‘Structured’ Use Cases in Enterprise Architect

I was inspired to write this post by Ian Mitchell from eaDocX’s use case discussion at today’s European EA User Group in London. It got me thinking about traps I’ve fallen into and tips that aren’t immediately obvious when starting out with the structured scenario editor.

1. Writing unstructured text first and generating structure

This one I think is the biggest time saver and deserves it’s spot at the top of this list. While the rigid structure of the structured editor has many benefits, free-flowing writing and focusing on content is not one of them – and in my opinion it should be the focus of effort of the first draft of content.

My advice? When writing up the skeleton of your use case stick to the standard ‘Description’ tab to get all your content on paper. Don’t worry about numbering lines, just get it down! Key here is your writing can be fluid and you can capture the detail of your use case flow without having to worry about structure.

image

creating unstructured use case detail first

Once you’ve got your basic content on paper its a simple two clicks to create a structured scenario. Right click –> Create Structure From Notes –> New Line Delimited.

image

and transform it into structured scenario steps

Transforms into..

image

generated structured from free-form use case

Having gone down the path of creating scenarios solely in the structured scenario editor initially – personally I find the process to stilted for my workflow. Having to stop at the each step, add new step, move cursor, get distracted by the context references and whether EA has incorrectly assigned a Actor icon to a system step.. Maybe it’s just my workflow but I prefer to get the basic content down first – then play with the structure.

2. Context references – the magical linkage between elements

Context references is where I first saw the benefit of using the structured scenario view. It allowed me to add references to my model, enforce a standard vocabulary and promote re-usability  – all really good things.

So how does it work?

In our example before we had no references, just plain text. So lets reword the ‘user’ into something more realistic, select it and right click it to see what we can do with it.

image

defining new elements from use case text

So I’ve renamed user to Librarian and now I can create a new element for this new actor I’ve defined.

image

select the appropriate element type – in this case its an Actor

Select the Use Case Toolset to find the ‘Actor’ element and notice the name has already been pre-populated for you. The actor element has been added to the project browser as well so it can be re-used – bonus!

Now that we have established this reference it will be used every time the word ‘Librarian’ is entered into the use case text – both in the main scenario or any alternate/exception flows.

This works for existing model elements as well, simply select the text as before but instead of creating a new element, select ‘Insert context reference’

image

or for existing elements, simply insert a context reference and find the element in the project browser

3. Working with the scenario editor as a window

When you want to quickly flick between scenario content it is pain to have to open a use case via the properties, switch the scenarios tab, and view the structure, only to find it was the wrong use case element and have to open 3 more use cases and repeat the process before you find the step you were looking for.

It can handy to display the scenarios editor as a separate window rather than an inline element.

To do this in EA v10, from the ‘Element’ file menu, select ‘Scenarios and Rules’  (in v9 it can be found in  ’View’ ->’More element tools’ – thanks to Rafal Dmowski for pointing this out)

image

working with the scenario and rules window

This will popup the scenario and rule window as a separate dialogue which you can have open while you flick between multiple use case elements, either from the canvas or the project browser.

image

make it a popup window to allow navigation from the diagram canvas

4. Define a glossary to give further context

If you have ever added items to EA’s severely under-utilised glossary, you will have noticed these terms appear underlined and referenced many places within EA.

To add terms to the glossary, hit Alt + 2 or select ‘Project’ –> ‘Glossary’ from the file menu and start adding terms. (Note: you may need to add a glossary type first before you can save a anything – hit the .. and enter a glossary name!)

image

adding glossary terms for a richer model

I’ve gone and added a few terms to my sample glossary and now lets take a look at our scenario from before.

image

all terms within glossary referenced throughout the model

I should point out here that this is not limited to just the structured scenario but any field where the term is used – EA will underline the item to show a reference to a glossary item has been made.

So whenever the cursor is rolled over the underlined term – a definition is displayed!

image

quick referenced on cursor hover

5. Changing those scenario type names

Now the standard set of scenario types might be best practise and perfectly fine for your modelling needs – but I have found some engagements where the need to use further granularity for types. Previously this was fine before structured scenarios came along as you could name your scenario and type however you pleased but with structured comes rules.

To edit these types, Select ‘Settings’ –> ‘General Types’ from the file menu

image

adding scenario types to your model

and you are presented with the following screen.

image

default model types

This presents the default set of types which can be added to. Let’s add one called fatal exception – perhaps not a great example but it illustrates my point.

image

adding a custom type

Now return to our scenario view and see what this does.

image

new type available in the scenario list

Not much other than add a new type to dropdown. EA thinks in the main 3 types still but you can trick it into accepting your new exception type.

Drill into your alternate exception by double clicking it in the ‘entry points’ dialogue.

Try changing the type of this from it’s existing ‘Alternate’ to our new ‘Fatal Exception’.

image

switching over an existing exception scenario to use new type

Saves ok – great news!

So while EA will only allow you two ‘create’ the two standard sub types, you can simply swap these out for your own custom types as afterwards – semi-circumventing the process.

This may go somewhere towards getting around the ‘no alternate, alternates’ problem discussed before.

GD Star Rating
loading...
Posted in Business Analysis, Enterprise Architect

A better way of importing and maintaining requirements within EA – introducing eaDocX

In a previous post we looked at using the de-facto standard for importing data into EA – the CSV import. Now while this method works, it is a pain and comes with the limitations of using a CSV based format – one wrong comma can throw off your entire data set!

I’ve been meaning to write about the wonders of eaDocX for a while now but it seems this is my first opportunity to sing its praises. eaDocX does away with the horrendously outdated RTF functionality that EA uses and replaces it with the new standard XML  based .docx format

In additional to the huge host of benefits from using .docx (I’ll write about them soon I promise!), the corporate edition comes with much-needed Excel integration. We can use the power of Excel to import/export data from EA without having to be constrained by CSV.

Lets take a look!

So when you have eaDocX installed, it appears as an extension.

We can select a package and open in Excel – hooray!

image

Open packages directly in Excel with eaDocX!

This hands the reigns over to eaDocX to take the package XML and recreate it in a .xlsx document. What does this look like? It looks an instance of Excel with all elements in your package listed

image

Packaged viewed within Excel

Notice the ‘Element’ listing on the left. This defines the type of element to be included, which in our example is the default ‘Package’ and ‘Requirement’ which suits our example of importing requirements quite nicely!

Click on the ‘Columns’ tab to select the attributes to display for each element.

image

select columns to display for the selected elements

I’ve selected a few extra columns to display for this example, namely adding the alias, description and status.

Once you’ve selected the extra columns, hit the big EA –> button to export these new columns into Excel.

image

adding requirement-related columns

To make changes to this and re-import is easy! Simply make the changes directly into the Excel and hit the middle button ‘EA =’ to perform a comparison on your changed data and the EA package.

image

making changes and performing a comparison with the EA package

 

I’ve gone and changed the status of some requirements to ‘Active’ and the comparison has highlighted the change cells.

To import these back into EA, you guessed it, the 3rd and final button, EA <-

If I know look at my requirements in the ‘Package Browser’ I can see all of my requirements have had their statuses updated to ‘Active’ – magic!

image

seeing the changes applied back into EA

A practical application of importing and re-importing

If you’ve read some of my other articles, this is the part where I say, well that’s interesting, but how is it useful? Well wait no more friend, I shall reveal.

In most organisations (unless your already deep in EA world or love your Rational Suite) the requirements are written up in either Word or Excel and have various levels of ‘document management’ applied to it to keep it maintained.

My first step in most projects is to remove the risk and import a reasonable baseline document into EA to begin building a solid model. This works well the first time, but requirements being requirements, they tend to change over time and you may not have the luxury of enforcing maintenance through EA. If that’s the case, you need a repeatable process to keep the EA requirements in sync with any externally managed ‘artifact’ (typically the ubiquitous Word document).

Providing you have a stable requirement number (I hope for at least that much!) you can always keep things maintained.

A Worked Example  – Team Foundation Server (TFS) synchronisation

I use this example for TFS but in can be applied to any external system using a reference number.

We have a lot of requirements stored in TFS and updates managed through its version history, so at any given point in time the TFS item will have the latest status and description of the requirement.

We can export the list of TFS requirements into Excel easily (handy MS product integration), but the old copy-and-paste method works just as well if an export function exist for your external system. We end up with a output something like this

image

an example out of TFS requirements in Excel

The title here is generally longer than this but we have a structure which is Client – Req# – Short Name so I can quickly strip out the rest to get just the Req number as above.

Now that I have something like that, I can use the power of VLOOKUP in Excel to retrieve the value of the TFS item from my eaDocX Excel version. Confused? Let me explain in pictures.

I write a VLOOKUP function to lookup the value of the requirement ID (REQ-001) and find the associated column for the TFS ID.

=VLOOKUP(B17,’Raw text’!$C$2:$G$217,1,FALSE)

If your unfamiliar with VLOOKUPS, essentially its using the value of B17 (the requirement ID), looking into the worksheet ‘Raw text’ between cells C2 and G217 for a match and returning the value in the 1st column which is a validation check to ensure the right record is return. The FALSE at the end ensures an exact match is made (not a partial)

So what happens when we do this for our data set?

image

VLOOKUP returning the relevant TFS tasks for each requirement

I know have a list of requirements with their corresponding TFS item # – magic!

Now VLOOKUPs can be tricky, so I add an extra validation step to the one I mentioned above – performing a simple check between the requirement ID return in the VLOOKUP and the original requirement to ensure they are the same. if not, we must be returning the wrong value.

What does this look like?

image

=CELL=CELL

That’s it! it will return TRUE if they match or FALSE if not. Rinse and repeat for all cells.

image

adding a bit of basic validation

Protip: I often use a conditional formatting rule to mark FALSE records in red to make life a bit easier.

When I’m happy everything is in order lets import back into EA.

But wait, where would I store such a value? Well this is precisely what tagged values are and should be used for.

So head to any requirement and view its tagged values.

image

tagged values

None? That’s okay, we need to add a new one.

image

adding a new tagged value for the TFS #

Don’t enter a value but give it a useful name.

Now when we return to our eaDocX Excel view, we should be able to see our tagged value in the list of available columns.

image

selecting the tagged value to be part of the export to excel

Look there he is!

Export a new version to Excel.

image

all blanks because nothing has been added yet

A column full of blanks? Excellent. Now we can add our data from the VLOOKUP before and sync it back to EA

Run the Compare function.

image

performing the compare

A whole column of blue changes – that’s what we want.

Hit the import function to sync these back into EA.

Back in the Package Browser we can see these changes have been applied

image

seeing the TFS #s in the package browser

This can be repeated for other properties such as status, development effort, assignee etc but be careful how much you use because it is additional overhead to maintain.

My motivation for keeping both TFS and EA in sync is to give the power and flexibility of using EA to model, analyse and output static documents for clients while retaining the familiar interface of TFS for the development team.

Note: It must also be repeated that when importing at scale the validation of data becomes important as it can be quite easy to accidentally overwrite things – so don’t neglect the validation checks and be sure before you commit changes!

A closing note

Hopefully that’s a clear enough explanation of how to use the functionality provided by Excel integration from Ian and the eaDocX team and I’ll be back to write-up more on the even more useful documentation generation and document management capabilities it offers – but until then this will have to suffice!

GD Star Rating
loading...
Posted in Business Analysis, Enterprise Architect

Adding a UI (prototype) to Model Simulations in EA

Following on from my previous post on creating and simulating state machines in Enterprise Architect (EA), I will walk through the process of adding a UI to prototype and further interactivity to your model.

If you recall the previous article, I walked through the process of setting up ‘Triggers’ to run scenarios through your state machine and set simulation variables at state or sub-state level to better represent your application. All of this information was available using the EA ‘variables’ or recording to the Console. We can go a step further and prototype a quick UI to represent our application and/or provide a ‘dashboard’ view of states and variables.

 

Setting up the state machine

image

the state machine from the previous post

Using the state machine I used last time, we need to create a place-holder ‘state machine’ element so we can reference it as a simulation start point.

Add a ‘User  Interface’ diagram to the appropriate place in the package browser.

 

image

add a user interface to the diagram

 

This will be our place-holder to put the state machine and User Interface elements.

On the diagram create a new state machine element.

image

create a new state machine element

Then right-click the newly created element and select your existing state machine diagram we created in the previous example.

image

select a composite state diagram

Locate the state machine diagram in the package browser.

image

Locate the state machine in the package browser

Now we can create a new User Interface diagram and add that as a frame on to the current diagram (keeps it neater and modular).

image

add another UI element on drag into onto the master canvas

And drag that on to the Model Default (or whatever you named the original) diagram canvas.

To complete the process of linking a UI to a simulation, we want to open the Execution Analyser and create a script. If you don’t have the window open, select ‘Analyzer’ – ‘Execution Analyzer’ to bring it back up

image

Show the Execution Analyzer

 

From the Execution Analyzer window, select to add a new script

image

Add a new simulation script to the Execution Analyzer

And they key step for us is the last tab, ‘Simulation’ and defining the ‘Entry Point’ and Input behaviour.

Select the ‘..’ icon to locate your state machine element for the Entry Point.

image

Define a state machine to be the simulation entry point

That sets the entry diagram we want to use for the simulation.

To connect the User Interface to the simulation, we need to define a behaviour (in JavaScript notation) to display the correct UI element.

The format of this command is as follows:

dialog.CreateOrder.Show = True;

where ‘CreateOrder’ is the name of User Interface we created earlier (‘CreateOrder’ in my example above).

As you may have guessed from the above JavaScript, the model simulation script will start the simulation on the ‘Validate Example’ state machine and as it’s first point of business, it will display the ‘CreateOrder’ User Interface we created.

Note: Another method of displaying the UI is to assign the same command (above) to the first transition of the state diagram (e.g. Initial –> Created in my example). Whichever method works for you!

Creating the UI and assigning actions to things!

So now we have a model simulation that will give us an actual rendered screen we should probably put something on it!

Open up the CreateOrder User Interface  we created earlier and lets start adding elements.

Using the Toolbox you can add standard UI elements or use the Win32 elements to add things onto your prototype. Here is a horridly rushed example of some text and a button (note the list of Win32 UI control types in the toolbox)

image

building a basic user interface

So now I’ve added a UI to the model and hooked it up using a simulation script, what happens if I run it? Well let see.

Going to back to the ‘Execution Analyzer’, right click the script and select ‘Start Simulation’

image

start the model simulation from the execution analyzer

What do we get?

image

example rendered UI element during a simulation

A ‘nicely’ rendered (I use the term nicely loosely of course!) dialog box that we mocked up but the button doesn’t do anything – lets fix that!

 

Adding Signal behaviours to Button and making our UI interactive

Head back to our CreateModel user interface and view the properties of the ‘No More Items’ button. On the ‘tagged values’ tab we want to add a new tagged value.

image

creating an OnClick action for the button

The naming of this tagged value is very specific and must always be named ‘OnClick’ with the following value ‘BroadcastSignal(“ “)

image

defining the trigger to use for the button

When the simulation is interpreted, EA will parse the above tagged value as a JavaScript function and attempt to fire the trigger “Signal Name”. So what we were doing before manually using the ‘Simulation events’ and ‘Waiting Triggers’ window in EA, we can no build into our interactive prototype to reasonable something more alike our application!

It is important to note that the trigger type must be ‘Signal’ for this to work. To check this, return to our state machine and find an appropriate transition. In my example we are using a button called ‘No more items’ which corresponds to following transition on my state machine.

clip_image001

locating the appropriate trigger

Bringing up the properties of this transition will allow me to view the Triggers associated with it.

image

checking the trigger type of the transition

Notice the type is ‘Signal’. Had this been one of the other trigger types our simulation would not register the event.

So when we run the simulation again, we can actually use the button on the UI to progress the simulation.

image

simulation before clicking the rendered button

 

Selecting the button progresses us further into the state machine as if we had used the ‘waiting triggers’ window in the bottom right of my example.

image

simulation progressed after selecting the rendered button

So you’ve now added some interesting tricks to your model but at this point you still might be thinking – “that’s all very well, but that isn’t all that useful to me”. Well the initial driver for me to head down this path wasn’t to create a prototype application based on my state machine but was in fact to provide a better view of the variables and states I was assigning throughout my model.

Introducing the Model Simulation Dashboard!

So go along with my very basic prototype I built an even simpler dashboard view which sits along side the prototype and displays the variable states (as recorded in the EA ‘Locals’ window) and any additional info I want to record in my simulation.

To this all I do is create a second UI diagram, and call this at the first transition (from Initial –> Created in my example)

image

linking a second UI for a ‘dashboard’ type view

dialog.Screen1.Show=true;
dialog.CreateOrder.Show=true;

In the above example, Screen1 (horribly named I know!) is my dashboard view and CreateOrder is the first UI screen from our example above.

What does that look like?

image

example of dashboard view alongside the running prototype

I have my dashboard running alongside my UI screens to give an alternative view of things I need to track at any given time.

Protip: You can change the stereotype of a Screen element to be a Win32Dialog and get additional properties, such as setting the window to be in the centre – very useful when using multiple Screens.

image

Protip: adding a centre position property to the screen element

All done!

Well thats the basics covered of adding a prototype UI to your model simulations and if there is further interest I can share some tips on making a more dynamic prototype in EA, hiding elements until required – but I shall save that for another day.

Hope that was useful to someone!

GD Star Rating
loading...
Posted in Business Analysis, Enterprise Architect, Prototyping

Creating and Simulating (also validating) a state machine using Enterprise Architect

Recently I have been reverse engineering a state transition (officially a state machine but I prefer the term state transition model) to understand the complex life-cycle of our application’s central object.

I had seen a demo on model simulation but the focus was more on a generated model from source rather than a hand fashioned UML model. This post is a walk through on the process and hopefully some takeaways from what I’ve learned.

 

Understanding complex systems

I came into a project that is well down the road to completion but sorely lacking in any concrete documentation which was becoming a pain point for everyone – and particularly for me – the new analyst tasked with helping out.

One of my first tasks was to document some ‘light’ form of a state model to get an idea of all of the possible scenarios and break down some of the complexity. I’ve iterated through several versions (or styles) of the state model trying to provide a simpler view of states and state transitions but the model was just very complicated and the diagrams were too busy. Understanding it myself was hard enough and trying to validate each of the scenarios was proving far too time-consuming.

 

States and multiple sub-states – too many paths!

My main problem was due to having states and multiple sub-states being dependent on single transitions. For example, we had something like this

OBJECT (super state life-cycle)

– sub item1 (sub state life-cycle)

– sub item2 (sub state life-cycle)

– shipping item (sub state life-cycle)

– other items (sub state life-cycle)

So for every transition, we could have movements of one or all of the sub-states, and depending on what states they were in, we could also have super-state changes.

image

example of super-state / sub-state model I quickly threw together to serve as an example

 

A threw together a quick example of what things (sort of!) looked like in our world – its a horribly rushed example but gets across the point.

 

Model simulation and simulation variables!

So I got to the point where I’d modelled enough states and sub-states that it was very difficult to validate the accuracy – so I decided to use a bit of smarts and try out model simulation.

I setup my workspace to get the simulation controls ready. It looks somewhat like this.

simulation workspace

the simulation workspace configured to show variables, triggers and simulation console

With this setup we can kick off model simulations to run through transitions, select the required ‘trigger’ to choose paths and even save triggers to define pre-defined scenarios to run through. Note: I’ll post a separate article on how to do each step in more detail.

All of this is nothing new? Well that’s get into some simulation variables to track what’s going on at each point.

First of all, I’ve run through a created scenario manually (interpreted in EA language) by manually selecting the triggers as they come up. You can then save these as a trigger set and select to signal the triggers automatically – now we can fly through our models after defining our criteria.

image

model simulation in progress

The above shows a simulation in action as it goes through the path I defined manually and you can see the trigger sequence waiting to be fired to progress the simulation further.

image

showing the simulation console and ‘waiting triggers’ panel

What I end up at the end is a list of states / decisions / elements that I have passed through in the console log and a list of triggers that were fired.

For me this wasn’t all that useful – just a flat list of states and sub-states at a single level wasn’t;t really enough – plus there was more detail I wanted to capture that would make these even more useful.

Enter simulation variables

I stumbled on simulation variables when trawling through some EA help file about getting my simulations to work and instantly through of a use (more on that soon).

Given I am reverse engineering a model and not trying to do and model-driven development, I feel I can use simulation in this way but I certainly appreciate this is a hack job and not their intended purpose (sorry everyone!).

I added an operation to each state called ‘updateVars’ and added a behaviour to each to assign simple variable.

image

adding JavaScript simulation variables to add another layer of interactivity

EA uses JavaScript notation when performing UML model simulations, so we can just assign variables as we need them. Now you see why I had the variable window open before right?

Protip: To avoid cluttering up your diagram with all your updateVars on each state element – hide the operations from the diagram in the diagram properties. Un-tick the ‘Operations’ box under Show Compartments.

image

Protip – hide your operations from your state machine diagram to avoid clutter

 

So now that I have added simulation variables to my model, I can see what the states and sub-states are at any given point in the model – either by pausing or setting simulation break points (another great feature!).

image

example of paused simulation showing variables and waiting triggers

Writing to simulation console

Although simulation variables were interesting they didn’t really offer me much over what I had before – just a different way of viewing the same state/substate information. What I really wanted was to be able to use this concept to show other important things that are going on at certain steps.

Another cool feature Sparx have included here is being about to output to the simulation console so you can supplement the standard list of element names with your own text.

So at certain steps, I have UI actions or account deductions, that I wanted to bring into my model and highlight to my stakeholders where and when these were actually occurring. Strictly nothing to do with a state machine but I’m not here to win UML medals – just provide my stakeholders something they can understand!

So on one of the updateVars actions I can add another line like this:

image

adding extra information to the console log

The magic words here are Trace() which allow you to output a string to the console log. What does it look like in the simulation console? I’m glad you asked – it looks something like this.

image

seeing the Trace() output onto the simulation console

I ended up adding custom Trace() events for each state so I could better represent state /sub state movements and also record important events along the model.

Hopefully you followed along with me on this and I’ve had some interest regarding doing a screencast on the topic so please let me know in the comments if you’re interested and I’ll get one together.

This was an overview article to demonstrate the main features and I will come back and go through some of the steps I rushed through in more detail in the next post.

GD Star Rating
loading...
Posted in Enterprise Architect

Track changes in generated documents with EA + SharePoint (or without!)

I wanted to share a tip that I’ve been using for a while that seems to be a reason some people give for not liking Enterprise Architect (EA) – not being able to track document changes.

EA works by generating RTF documents of its content which many users prefer of the more interactive HTML renderings of that same content – either due to habit or function. While EA has countless benefits for analysis (just read this blog for many examples!) it doesn’t provide document versioning / differencing out of the box.

This is no problem at all since MS Word has all the differencing functionality we need to provide that same level of ‘track changes’ that we have all come to depend on (or hate!).

Lets define a scenario to frame our example:

The example scenario

Ok – so you generated a use case document from EA (Enquiry Use Case v0.1 rtf) and sent it around for an internal review the previous week and have been updating the EA model with the required changes. All of the feedback has been incorporated into the model and you proceed to generate a new version, this time calling it Enquiry Use Case v0.2.rtf.

So we now have two documents. The v0.2 document contains our updates but doesn’t contain any mark-up to distinguish what has changed which will annoy our reviewing stakeholders.

So what do we do? We turn to the powerful ‘compare’ functionality built into Microsoft Word of course!

In either word document, select the ‘Review’ tab on the ribbon, select to ‘Compare’ button and the ‘Compare’ button again.

image

Select the Word Compare function

Now we are presented with the comparison options that Word will use when parsing each document.

 

image

Word compare options

 

Original document – locate the v0.1 document

Revised document – locate the v0.2 document

Select the ‘More >>’ button to see further options

Ensure ‘Tables’ is ticked if your RTF template is set up to format using tables

Ensure ‘Show Changes in:’ option is set to New document

Ready? Hit ‘OK’ to generate a new document with the marked changes

image

example of generated comparison document

We now have a tracked changes displayed for two separately generated documents.

Whats the SharePoint connection? well..

SharePoint for document management

Maintaining document versions is a pain, especially when following a method of manually producing document change sets as above, so using SharePoint makes this a little easier.

Office’s built in SharePoint integration means we can overwrite our previous version with our newly generated model and let SharePoint handle the pain of version tracking.

CAVEAT: This only works when the document library settings for SharePoint are configured to force versioning (Document Library Settings -> Versioning Settings )

document library versioning settings

document library versioning settings

Make sure ‘Create major and minor (draft) versions’ is checked and

Require documents to be checked out before they can be edited? is set to ‘Yes’.

If you don’t have permissions to set the above, contact your SharePoint administrator and they can enable this specifically for the SharePoint document library that you are using.

With versioning configured, rather than saving locally and making sure we rename versions appropriately, we can simply save over the top of the existing version.

image

Save directly to SharePoint from Word

Select or type a ‘SharePoint’ in the dialogue and locate the existing document. It will prompt if you want to overwrite the existing document – confirm this and we are done.

We have overwritten the current version only and we can easily roll back to any previous as required – no messing around with file naming conventions, multiple documents sources and all the pains that exist without document management.

When we have multiple versions, Word gives us an added feature that we can use for our document comparing advantage.

 

All previous versions are accessible directly from Word (or any Office app).

We also get an added bonus feature under the ‘Compare’ function we demonstrated earlier.

 

compare specific version

compare specific version options when working from SharePoint document

Here we get the Major and Last Version options again but we also get the Specific Version option which allows to select ANY version – useful when you’ve updated several minor versions.

Now you should have one less reason not to use EA and few handy SharePoint document management tips to boot!

 

GD Star Rating
loading...
Tagged with: , , , ,
Posted in Business Analysis, Enterprise Architect, SharePoint 2010

Import requirements into Enterprise Architect with CSV Import

I want to share a quick guide to importing existing requirements into Enterprise Architect in order to start building traceability and management structure over your requirements.

In a lot of organisations, requirements definition takes the unsophisticated form of either a word or excel document. This is typically due to existing templates, familiarity and availability of Microsoft Office or lack of experience in alternative options.

In either case, you can take these flat formats and import them into EA with a relatively easy and repeatable process – as I will show you below.

At the least, I would expect a requirements document to have the following items per requirement statement:

  • Requirement number
  • Requirement definition
  • Priority
  • Owner

Can also include other details that you wish to track about a given element, such as category, project phase t-shirt size – it could be anything!

If the document is currently in MS Word, then copy and paste the requirements portions into Excel, and tidy up formatting as necessary until you have just the relevant requirement columns.

Set up EA CSV Import Definition

First, Create a top level container package to hold our requirements.

Select the top level item (normally ‘Model’ unless you’ve renamed it) and click the ‘New Package’ icon. Give it an appropriate name – ‘Requirements’ works for me.

image

Then, right click on the newly created package and select ‘Import/Export’ -> ‘CSV Import/Export’.

image

This will be display the CSV Import/Export window where you can select a file to import and a template to use. Seeing as we having created a template yet, we will need to do that first.

image

So where it says ‘Specification’ and there is a button to the right ‘Edit/New’ – click that.

Now we are on the specification page we can provide the details for our template and define the fields we want to create for our requirements.

image

  • Fill out the Specification name and notes fields as appropriate.
  • Ignore the default filename.
  • Set the default direction to import
  • Under default types enter: ‘requirement’. This states that every element we want to import will be a requirement element.
  • Make sure the ‘Preserve hierarchy’ is unchecked (only for first import – it’s important later on when running an updated CSV back into EA!)

With me so far? Great!

Now for the available fields. This lists the standard elements and allows you to select the EA properties you wish assign from your import file.

Typically my ‘selected fields’ look this (in order):

  • Name
  • Alias
  • Type
  • Notes

optionally include other items such as

  • Phase
  • Priority

The order of which these are sorted is imported because this will exactly match the columns in your import spreadsheet.

So if you’re following along with my example, I had the following columns in my import file:

  • Requirement number
  • Requirement definition
  • Priority
  • Owner

So what we are doing here is a mapping from import file -> EA property.

So let’s return to our specification fields and run through each:

Name - for this I normally truncate the definition at a certain length and use that as the name, but you can write an appropriate name if you feel the need – not plausible for long lists of requirements (100+).

Tip – Use the following excel formula to truncate to 60 characters and copy and paste down the column: =LEFT(B2,60) replacing B2 with the requirement definition.

It is also important to then copy and paste the VALUES only over top so we don’t end up importing the formula into EA!

Alias - I use the requirement number for this, so switch this around so requirement #s are displayed in the 2nd column.

Type – this is the column EA will use to determine the type of element to create, so in our case they will all be requirement. copy and paste this down the column to every requirement row has the word ‘requirement’.

Notes - This is the key column which will contain the body of your requirements. You have some formatting issues if you had rich text from a word document, but its worth the time to clean this up at some point, although arguably easier to do this within EA.

The other columns for here are optional and you can pick and choose appropriate EA properties to map your other data too – do this at your discretion based on project needs.

image

If you can’t find an appropriate EA property, then create a tagged value and assign it to the specification

image

Save the specification and we are ready to import!

Importing the file with our specification

Before we can import the file into EA, we need to take our freshly re-worked excel file and save as a .CSV

Select File -> ‘Save As’ and select the CSV format.

Now back on the ‘Import/Export’ window, select the newly created specification, check the direction is ‘Import’.

Under the file, locate the import file you saved in the above step.

image

When you’re ready to go – hit ‘Run’. (Make sure you have closed the CSV file from the earlier step otherwise EA will throw an error saying it can’t open the file)

Success! We should now have a list of imported elements under the package you selected earlier

image

Stay posted for my follow up article on how to update and managed changes to requirements while retaining structure!

Hope that was helpful.

GD Star Rating
loading...
Posted in Business Analysis, Enterprise Architect

Project structure in Enterprise Architect

Getting the project structure right in EA is an important step to understanding how EA works and  makes the process of generating documentation a lot easier.

Lets take a look at the standard project structure when we create a new EA project

Select ‘File’ -> ‘New Project’ and enter a file name and location for your project

Then select the type of model you wish to create for the purposes of this demo I’ve gone with ‘Requirements’ and ‘Use Case’

clip_image001[3]

You should now have a blank project from which to build your model.

On your right (if you haven’t moved things around) you should be able see the (empty) project browser window.

clip_image002[3]

You are presented with a blank model, with the first (root) element of the project named ‘Model’. If it helps, you can rename this element to something more appropriate, such as the name of the project, or stream of work.

At this point, think of the project browser as a form of folder structure where the ‘Model’ element is the C: drive and you will begin to create ‘packages’ under it to organise your work.

Tip: If you can’t see the project browser, hit ‘Alt + 0′ or ‘View’ -> Project ‘Browser’ from the file menu.

clip_image003[3]

So now we want to build out some structure to the form the skeleton of our model. This will help guide users both viewing and adding to the model, and help when we move on to working with the document templates later on.

If you recall we selected this project  to be a ‘requirements and a use case model,’ so we now want to create a container package for each of these. So go ahead and make two packages, ‘Requirements Model’ and ‘Use Case Model’ under the ‘Model’ element.

To do this, make sure the ‘Model’ element is selected and click the small ‘folder’ icon on the project browser toolbar.

clip_image004[3]

This will pop up a window to create a new view and ask to select a type. This really only affects the type of icons used for the package, but go ahead and select ‘Use Case’.

clip_image005[3]

When you have added both packages, you should see something like the below image.

clip_image006[3]

Note: The two package icons are different as I selected the ‘simple’ view icon for the requirements model package

There is another option here to create a package from a wizard – this may help your understanding of how to structure your models as it creates a number of elements by default.

clip_image007[3]

To create a model from a wizard, right click the root element ‘Model’, and select the appropriately named ‘Add a New Model using Wizard’ option.

We are presented with the same window as earlier when we created a new project.

clip_image008[3]

If you select ‘Use Case’ here and hit ‘OK’, it will go ahead and create another package named ‘Use Case Model’, this time with some pre-created elements thrown in to boot. Let’s go ahead and look at what its created.

clip_image001

Here you can see the elements generated by the wizard – a sample use case diagram, a package each for actors and use cases and same sample elements.

clip_image002

 

The generated use case diagram gives some explanatory text on what each element does and how it relates to other UML elements.

We can either start with this model and edit the generated elements or just start from scratch. For clarity, lets start from scratch by deleting the generated diagram and retaining the generated elements (Packages, Actors and Use Cases)

clip_image001[4]

Right click the ‘Use Case Model’ diagram and select ‘Delete Use Case Model’

Now ensuring we have the ‘Use Case Model’ package currently selected, select the ‘New Diagram’ button within the project browser

clip_image004

EA will then bring up the new diagram dialog where you can select a type of diagram to create and prompt for a diagram name.

In the example below I have named it ‘Search for books’

clip_image005

So what does this have to do with project structure? Documentation in EA centres around having a well organised model therefore allowing the flexibility to generate documentation at the required level – either at the micro or macro level.

By containing our various elements within packages, appropriately structured and named, we can quickly generate highly specified, focused documentation or higher-level, broader documentation without the hassle of manually adding or removing content after generation.

Let’s build up our sample model a little more to represent what you would actually use.

image

Here I have added 5 ‘root’ packages that contain distinctly different models:

  • Requirements – to hold the all important requirements model
  • Use Cases – to hold the use case/user story expansions to met the requirements laid out in the requirements package
  • Domain Model – a conceptual data modelling area to map out the data model. Can and should be supplemented with a a logical (physical data model as system is developed)
  • State Transition Model – a later-stage model but important when rest of the model matures and complexities arise. Particularly useful when reverse engineering a system

The reasons for why this is important may not be immediately clear but should make more sense when it comes time to generate documentation from our model. More on that in my next article! In the mean time, happy building!

GD Star Rating
loading...
Tagged with: , , ,
Posted in Enterprise Architect

2013 – a new year wishlist/checklist

As with a lot of people, I’ve decided to define my goals for this year in blog form and publish it as a general reminder of my failings next time round.

 

2012 was the year of me – largely spent travelling extensively in South America and then moving from Australia to London.

2013 the focus goes back  to work and bringing the blog back to life.

So at a high level, the goals:

  • dust off the blog – change focus of blog to more general me and my work rather than the current ‘business analysed’ theme.
  • the 750 words challenge – writing daily, even if not published
  • publish the using EA series of articles
  • publish thoughts on agile analysis
  • publish thoughts on project ideas
  • play more with ruby and js frameworks
  • more focused/less-distracted work patterns
  • travel more.. (continental Europe)

More on these later and am improved skin.

GD Star Rating
loading...
Posted in Business Analysis

Ariba on Demand Single-Sign On – A more detailed explanation and walkthrough

I have been working on a large-scale integration project for Ariba on Demand at a client site, and while working in varying capacities and roles, have had quite a lot (read – ‘everything’) to do with implementing the single sign-on (SSO) relay provided as-is and unsupported by Ariba. I’m not going into the spiel as to what Ariba on Demand is and how/why its used etc, if your here for Ariba on Demand SSO help, these are high chance you know (I’d hope so!). For the sake of article completeness, but also to contradict the above statement, Ariba on Demand is a cloud-based procurement platform allowing enterprises to run their entire purchasing/invoicing/sourcing/contract mgmt etc workflow in a single application environment.

This article is intended to be supplementary to the provided Ariba documentation on the provided relay code (specifically the IIS-ASP relay) and based on my own experience of trawling through the code and hacking it into place.

The Ariba diagram

ariba remote-authentication flow

The above diagram is supplied by Ariba in the Remote Authentication Kit – Design Overview.doc

It explains the basic flow between the various components to authenticate a user in Ariba. The purpose of this post is not to re-iterate what is shown in the diagram but to dive further down into the workings of the relay for debugging and personal-sanity related reasons.

 

My Diagram – explains the various query string parameters of each hop

sso-hop-diagram

I believe there are two parts of the relay that aren’t well documented or explained. The first being how to encryption / decryption of challenge key works and secondly the details of the values being passed back and forward from the relay to Ariba. This might be stating the obvious for those who have worked with SSO and encryption methods before, but it wasn’t for me and I’m guessing it may be useful for someone else down the line also.

 

Setting up the relay and how the encryption works

The provided relay is a single page that retrieves the current user, encrypts a key sent from Ariba and sends them both (username and encrypted key) back to Ariba for authentication.

So lets back up a bit here – challenge key? Encryption what?

The keys – Public and Private Keys

I’m not going to get into the detail of public/private key architecture, but the provided solution provides a ‘keys\’ folder which contains two sample keys, public.pem and private.pem, along with a genkeys.bat batch file which will create fresh keys into these files (a compulsory step if not done already).

The private key is the one we hold dearly, and the relay page has a configuration line which directs to the location of that private.pem keyfile. It looks like this:

PrivKey = ConfigPath & “D:\pathto\keyfile\private.pem”

In my case, my integration server’s permissions were locked down too tightly and the application did not have access to read this file, and hence the solution did not work. In my experience, this is the single biggest cause of failure of the relay – not having appropriate permission to access the private key file or a mis-configured path in the above line and someone moves the key during deployment.

So what does the relay page do with the keys?

The query string and it’s parameters

Well to protect the integrity of the transaction and stop hijacked sessions, when the user first enters the Ariba URL they are taken to the Ariba portal, and if SSO is configured for that realm, the user is again bounced back to the SSO relay address configured (see above diagram – Hop #2). During this second hop, a unique challenge key is generated and returned to relay as a query string parameter.

This is shown as &key= in my diagram above.

The relay then retrieves the currently authenticated user (depending on your IIS configuration, but using integrated authentication is the best method) and stores that in another query string parameter &user=

This is the value that Ariba will use to match against a user record and provide access into the application.

The private key is used to encrypt a combination of the user and the challenge key given by Ariba, into a single encrypted value and return that to Ariba. No snooping users can decrypt the contents of that string because they are not in possession of the matching public key. This public key is configured in Ariba in order to decrypt the return values and authenticate the request and its integrity.

The user is then bounced back (3rd and final hop) with these details, &user= and &sig=, containing the current user and encrypted digital signature respectively. Ariba takes verifies the value of &sig= by decrypting it with the value given in the public string.

The encryption process in more detail – an optional dive into what is happening

As hinted in the title, this section is entirely optional and is intended to dive into the process of encrypting / decrypting the username and challenge key – specifically the how and the why and ways of trouble shooting when things don’t go so smoothly.

As explained above, the relay page encrypts the combined values of the Ariba-generated challenge key and the username of the logged in user. It does this encryption using the industry standard encryption toolkit, OpenSSL, using the pre-compiled Windows 32 distribution which includes openssl.exe (available here).

A line in the relay page defines the bath to openssl.exe, in a similar manner to the private.pem key file explained above:

OpenSSL= “D:\bin\openssl ”

So looking further down into the relay page code, the OpenSSL variable is called twice:

set oExec = WshShell.Exec(OpenSSL & “dgst -sha1 –sign “D:\keyfile\private.pem”)
oExec.StdIn.Write key & username
oExec.StdIn.Close
signature = oExec.StdOut.ReadAll()

Here the openssl.exe binary is called with the parameters “dgst –sha1” encode with a sha1 algorithm and “-sign” using the private key value of “D:\keyfile\private.pem”). It then sends the values of key (ariba generated challenge key) and username (value of currently authenticated user) and returns the encrypted version to the value of  “signature’”

The next block then encrypts the value of signature with another call to OpenSSL (so another call of openssl.exe) with the parameters of ” enc -base64″) to encode it into base64. This value is then stored into the variable “sigEncode”.

Finally this value, sigEncode returned to Ariba as a query string (value of &sig=” “), where Ariba uses the SSO configuration value stored for the realm’s public key.

Testing the process – the provided test pages

Fortunately Ariba have provided to test simulation pages in the \LoginTest\ folder to simulate both sides of the Ariba handshake. Providing the configuration values for authURI, OpenSSL and PubKey are correct in both login.asp and login_verify.asp, these pages can be utilised to simulate Ariba connections without having the configure SSO options within Ariba. This proves a useful mechanism that the relay page is functioning as intended before touching production settings.

 

Hopefully some of the above content was useful, if nothing else it provides a useful reference of my own learnings if I ever need to deploy the relay page again!

GD Star Rating
loading...
Tagged with: , , ,
Posted in Ariba on Demand

Building Ideas in Rails – thoughts from a ‘non-developer’

I have been hacking around for a few weeks with some web app frameworks in order to prototype a few application ideas. Now I’m not a developer by trade, I consider myself to be a ‘technical’ BA (see my earlier post on business analysts) and I’m always interested in learning new technologies.

With this in mind, I started playing around with Django (I’d been toying with Python and natural language processing so Django was a natural extension) and then gave Rails a shot after hearing people buzzing about it for a few years.

“I came for rails but I stayed for Ruby”

I heard this phrase many times when reading through the mountains of posts on the subject and it couldn’t be more accurate. Like I said earlier, I’m not a developer but I can read and make vague sense of most mainstream languages but I have never seen anything so intuitive and obvious as Ruby. The syntax is clear, it doesn’t contain a lot of onerous escaping semi-colons or braces, or use excessive indenting, it just reads so cleanly. Conventions like using question marks (empty?) just make so much sense and makes reading and writing Ruby so easy.

 

Up and running with a new Rails app in 5 minutes

It really is incredibly easy to create a basic skeleton app in 5 minutes (assuming you have an environment setup already – which is max 30 minutes anyway!). Using generators and gems like awesome twitter-bootstrap gets you not just a basic skeleton but also an incredibly functional UI framework ready to build upon (I love you twitter-bootstrap!).

 

Less focus on arduous scaffolding, more time to prototype!

For me, the beauty of Rails is being able to quickly mock-up up an idea without spending several hours building the scaffolding before I can put in anything useful. I can draw a quick data model and a few UI sketches on paper and translate this into Rails in under 30 minutes to get my idea out of my head and into something *real*.

I’ve tried in the past to transpose my ideas in different ways, sketching UIs on paper, building PowerPoint/Prezi presentations of key concepts, Balsamiq mock-ups and stream-of-conscious sessions into text files, but they never went anywhere because they were always abstract – there was no ‘easy’ step to transition to something real. I’d always get lost / sidetracked choosing platforms, technology stacks and eventually find myself looking at a detailed jQuery library on some low-level UI element that probably had nothing to do with my app in the first place.

 

Something tangible, something flexible

Rails gives you powerful tools to get something out quickly and then build upon with a robust toolset (RSpec, Cucumber) to ensure you aren’t cutting corners and allows your 10 minute prototype can transition into a robust application.

Sure there is a learning curve, but its the easiest of the bunch (IMO) powered by a beautiful language and backed by a vibrant and vocal community.

 

Let the ideas flow…

With that said, lets see if any of my half-baked ideas eventuate into anything other than personal playgrounds – Github be ware, I feel a large amount of commits coming from this ‘non-developer’..

GD Star Rating
loading...
Posted in Business Analysis