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.
Related
We use elements with composite diagrams in our models. Usually if such a composite diagram exists, then the element shows a link icon to indicate a double click will open/show the diagram.
But with ArchiMate elements the link icon is not shown unless using the rectangle notation. Is there some workarround or configuration to allways show the icon?
This screenshot illustrates the problem:
Out of the box, there is nothing you can do. There is no setting or configuration that will show the composite diagram indicator on the Archimate elements.
The reason is that the shapescript used for these elements simply doesn't include this indicator.
There are a few options to get this done anyway
1 Send a feature request to Sparx
You can use this link: https://www.sparxsystems.com/support/forms/feature_request.html to send an official feature request to Sparx Systems. They might one day implement this, but there are no guarantees at all.
2 Override the standard the ArchiMate MDG
Steps include
Create your own stereotypes in a profile, redefining the existing ArchiMate stereotypes. See the manual for more details
Include your profile into an MDG
Add your MDG to your model or environment
Set your MDG to Active to actually make the redefines happen.
This might be interesting if you want to add additional properties (tagged values) to the standard ArchiMate stereotypes as well. I'm not so sure if it's worth the trouble just to add the composite indicator.
3 Hack the existing Archimate MDG file
The Archimate MDG is defined in the file C:\Program Files (x86)\Sparx Systems\EA\MDGTechnologies\ArchiMate3.xml. This is an XML file that you can open with any text editor. The shapescripts are included in binary form like this
<Image type="EAShapeScript 1.0" xmlns:dt="urn:schemas-microsoft-com:datatypes" dt:dt="bin.base64">
UEsDBBQAAAAIAGaEbU+CvMH4PQIAADAKAAAHABEAc3RyLmRhdFVUDQAH1zDMXdcwzF3XMMxd
zVVJTsNAEOyrkfhDFC6OlAP7IsSRF/AAlMSJY5FNjgMKiL9T1Z3B9tiJAxKLLI9nqamumV68
lLH0ZCFDackUvURmcigH8qZtIBPMrWUuK8nwrBV5J23pYy6VCKMUo9sNeobZpTJG6L0AmWF9
BZRDWJvISELFLcGYAkveVC2E4EsxGmDUA2MMDUNl5jjD3jlGbeniPcbbwWOsTnOgukbgTuQV
vVDO5AL4K+A7n0oCrJORVhfKPAayuD6E5Qk4FkCS5RT7u/pea3vm8VFltIVrBB6y8USRWuap
n7CnHj/F6jNWM3xDqK+zR20zD+OfsYw5UQzbMqrO2m6mm72YzB75mpjKmPfNlx7g3Tf51zh8
xdUoChWXK687AWOXHlohxi2WGZuMSnqKa1QfbyKQkbjf7hn6U/Rt30AYLZlY/hQZ3Dff3fIs
O0R+H4FmEe+EfOxF2D0EPsY3Qx4ydnMb7n7rrTmldXbG8ohVejAGjpWgfJLcRqA1YgIl1Srg
FPM8md7O0afVI+8+nFb7Wsu3qJh51RdGC1ec3u32GVOMPiqIVQU1LFGx6B2LEafBdvx0xdrv
Nvw7YB4M9By5nRb6VMLZ4m3Yac1XOZoeZC7mnvuN8zbl91crMyuj+Y01oCvnXk7vqszfq8W+
hf9fi+3vtbsW23+trhY3xRxnprg//v8TYTUgtjn2HuS+EHt/G3VN1hPMV89pFl2FKdotV04/
Zl0UufbS80x1BxEO7f5f1V1lr1tm+F73/W5Z46PqKu8HUEsBAhcLFAAAAAgAZoRtT4K8wfg9
AgAAMAoAAAcACQAAAAAAAAAAAACAAAAAAHN0ci5kYXRVVAUAB9cwzF1QSwUGAAAAAAEAAQA+
AAAAcwIAAAAA
</Image>
If you replace that section with a shapescript of your own, it will happily accept that. You can create this format by creating your own profile in EA and then exporting the package as a UML profile. EA will then convert your shapescript into this binary format.
I one published the shapescript for most of the MDG's, including ArchiMate3 on github. That might give you a head start when developing your own.
I am working on importing and modifying requirement type elements in EA through C# add-in.
I want to add custom marker near the element in project browser similar to markers that are set when an element is locked.
I had worked on shape scripts in MDG technology yes unsure if its possible to replicate a custom marker similar to locked element.
Kindly help me if any EA API is available for the same .
The simple answer is: not possible.
You might send a feature request to Sparx, but that browser has the same look/functionality since I know it (2003). So - little chances.
What you "could" do it to write your own browser in a window you can open and control inside EA. But - is it worth that?
EA doesn't provide any direct API available from setting\changing the ICON.
The only option is via shape script for your custom stereotypes.
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.
I have a SharePoint solution, containing 3 Features. One feature is Site scoped, and two are Web scoped.
The site feature contains different lists, 2 workflows and content types. Two of them are quasi similar, one is called CTTaskAchat, and the other one is called CTTaskAccord
The two web features contains lists definitions, lists instance and event Receiver.
When i deploy the solution with my powershell script and that I enable the feature with the powershell script, almost everything works pretty fine. The problem is that i can't find my content type CTTaskAccord nowhere. And I don't understand why i can't find it whereas i can find the CTTaskAchat content type.
If i deploy the solution with my powershell script, but that I activate the feature manually (i.e. through the Site Settings menu) the content type does appear.
So if you have any idea of where I could find my solution.
For your information, I would love to delete all the site collection and create a new one, but it's an update of the solution, so it's not possible.
EDIT : I've just noticed that some other points of the feature don't get activate (i have a list which doesn't exists with powershell but exists when i activate the feature manually)
You able to find the content type inside : Site Actions -> Galleries -> Site Content Types.
when you activated the site feature just check the feature is activated properly.
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).