Automatically apply stereotype of InterfaceBlock to instance in ibd - enterprise-architect

Is there a way to make a port in a ibd automatically apply the stereotype that is specified in the InterfaceBlock?
Goal is to automatically apply a shapescript to the port when the according Interfaceblock is assigned.
Do i need to write a script?
Using EA14, SysML 1.5

Yes, you'll need to write a script or an add-in.
Writing a simple script will allow you to set the stereotype when you run the script.
With an add-in (or with a script if you use my open source add-in EA-Matic) you can subscribe to an event (e.g. EA_OnPostNewElement) and set the stereotype there automatically without human intervention.

Related

Prefilled notes of Class attributes in Enterprise architect

is there a way to have prefilled attributes notes in enterprise architect?
It should be something like this scenario:
1) I create new attribute
2) Enterprise architect prefill note of attribute with predefined text
Something like template for attributes.
Thank you for any advice
I know this won't help directly this question.
Anyways you can achieve it through an external addin.
All you need to do is handle the EA_OnPreNewAttribute and EA_OnPostNewAttribute broadcast events .
This isn't quite what you're after but it is possible to create an Attribute stereotype in a Profile and add to this a Tag with an initial value set to what ever you want. When you create an attribute with this stereotype, this means your predefined text would appear in a tag-value for the attribute rather than the note. Not ideal, but might work for you.
You could also have a go at writing some JavaScript to do this as well (under Scripting in EA). You'd have to use the JS to navigate the repository structure, find the attributes in question, and update their note. I don't believe you can attach a script to a UI event, so I think you'd be stuck running this post-hoc rather than having the note auto-populate on attribute creation.

How to set required fields and default values for work items

I am using Visual Studio Team Services for my project, and accessing it via the web. I am using the Scrum template.
I am trying to figure out how to set default values for Task fields. For example, for the task's Activity field, I want to make it a required field, and set the default value to "Development" whenever I add a new task.
How can I do this?
TFS
On TFS you need to customize the process template to provide a <DEFAULT> rule. To change the process template you need to use witadmin to export the workitem type definition you want to change, then edit the XML to add the rule you want, in your case a <DEFAULT> rule on the transition to the default state. The re-import the workitem type definition.
The process/rules are explained here:
Define a default value or copy a value to a field
Modify or add a custom work item type (WIT)
VS-Team-Services
On Visual Studio Team Services this option does not exist yet for system fields. The features for process customization have been released in the past months and are rapidly evolving. It's probably a short wait until these features will be available.
What you can do is use the "Template" link on the work item form to create a bookmark that will open the work item form with a number of fields pre-filled.

How to link from a diagram to a script

Imagine you have a diagram in Sparx Enterprise Architect and you would like to provide a button or link to start some kind of script.
I know that there are diagram-type scripts which can be accessed through the context menu of a diagram but I would like to present the user of a diagram a button or link to execute a certain script.
Is this possible?
Not out of the box. EA allows you to create hyperlinks which run any one of a fairly large set of EA commands, but this set does not include the ability to run an arbitrary script.
What you can do is create a stereotype and an Add-In which catches the EA_OnContextItemDoubleClicked event and, after checking the stereotype, performs the desired function.
Note that the EA API does not allow you to run an arbitrary script either, so you'll have to implement the function separately in the Add-In.

content navigator P8 stepprocessor property order

We have a FileNet 5.1 system with Content Navigator as the UI. From content navigator we use the default workflow stepprocessor to display workflow steps.
We use the IBM EDS service to add additional properties(like mandatory fieds) to these stepprocessors.
This service loads JSON files to augment the workflow fields.
I now have a question what determines the order of the property in how th content navigator/eds determines the fields.
Thanks.
It turns out it is not possible to manipulate the property order out of the box. The solution: make a custom stepprocessor where you can manipulate it yourself.

Rehosted Workflow Designer and ToolBox double click

1 . I have Toolbox for Activity where I have Activities listed and on right side I have designer where Workflow designer is placed. From my Toolbox I can drag and drop Activites into designer It works fine. Now to increase the usability experience I want to double click on Activity in toolbox and it should be added automatically into desinger within specified "Sequence" activity as the second last activity in sequence workflow ? How can I do this ?
I have long running workflow which runs for 3-5 minutes; I want to give flexibility to end user to Cancel/Stop/Abort workflow while workflow is in execution. How can I do this ?
I am using Toolbox where I have listed down activities; at top of Toolbox it gives Searchbox; This search box gives search based on first letter; now I want to search for anywhere in the text...
I am using workflow designer as hosting Workflow and I use WorkflowInvoker to invoke my workflow; so what is best practice to Cancel/Stop executing workflow ?
To enable double clicking in the ToolboxControl, set the AssociatedDesigner property to the live instance of the WorkflowDesigner.
Might work better if you asked one question per posting...
As for your question on cancel/stop/abort your host application can do this (depending on how you host the workflow).