Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - Mr Stuff

Pages: [1] 2
1
Can anyone tell me what/how to set/clear?

A quick check of the diagram's extended style shows the parameter isn't in there... nor do I see any other obvious location for it.

Thanks - Julian

2
(EA 13, w7 64-bit)

As now confirmed by Sparx, shapescripts don't work with BPMN2.0 stereotyped elements.

My workaround: script the addition of object nodes to a BPMN Activity and put info in them (e.g. name of objectnode as a piece of info, e.g. name = "Never on Tuesdays!")

Problem: obviously easy to set on creation, but it would be better if I could label the objectnode with the taggedvalue of the objectnode's parent, which actually provides the info required, so that when it changes, the objectnode automatically updates.

I've looked through the list of 3rd party addins at Sparx and there's no obvious candidate.

One final caveat - addin would need to be free as I work at a large institution and it would be faster to write a compiler for an addin than to get a purchase order...

Suggestions?

Julian


3
EA V13, W7 64-bit

IIRC adding a FQ stereotype to the UML Types list does not create/match a proper FQ stereotype (it doesn't parse it properly, so a new monolithic only apparently FQ stereotype is created)

Q1: How then can I write a shapescript that will apply only to BPMN2.0 activities?

In UML types, referencing "Activity" as a stereotype, which a BPMN2.0 activity also has, the appearance is unaffected by a shapescript - I assume because the BPMN2.0::Activity stereotype is being trapped and another shapescript is overriding. (If and only if I remove the BPMN2.0 FQ stereotype does the shapescript take effect... but then the TaggedValue I want to display is thrown away silently and without warning. There also doesn't seem to be any way of restoring a BPMN2.0::Activity stereotype through the UI)

Q2: See Q1.

What I want to do: add a new compartment to display a custom TaggedValue value (text) (probably using the shapescripts Geert exported to GitHub as the basis)

What do the great and the good suggest?

Thanks!

Julian

4
I get errors and warnings for diagram Text and Legend objects (Warning: Text cannot be owned by Legend; Error, incorrectly positioned on the diagram/in the browser).

That the text & legend were copied from another diagram doesn't account for it - I just created text element directly and still got errors/warnings - and since neither text nor legend exist in the browser, browser placement errors are unresolvable.

The objectionable elements are also generating errors where they appear on other open diagrams even though validation was, I thought, diagram specific.

Is there any way to avoid these errors & warnings so that users can focus on the real issues??

Thanks

Julian

5
Try as I might I cannot change the parent of an event element to change it from a free-standing element to an embedded element - I know the diagrammatic aspect is separate, I mean I can't "move" the event element in the first place. (of course if I drag and drop digram elements parenthood is updated and in the project browser, but the element is not "embedded", mounted on the target activity) NB both elements are in the same package, but in general they might not be.

I have tried:

Code: [Select]
updateActivityWithEventToBeEmbeddedSQL = "update t_object set ParentID = " & actEl.ElementID & " where Object_ID = " & eventEl.ElementID
and

Code: [Select]
updateActivityWithEventToBeEmbeddedSQL = "update t_object set ParentID = " & actEl.ElementID & " where ea_guid = " & "'" & eventEl.ElementGUID & "'"
(with
Code: [Select]
Repository.Execute updateActivityWithEventToBeEmbeddedSQL, of course)

and in desperation, even though Geert said it didn't work in a code note I tried poking the parentID directly, then updating, refreshing and advising of repository changes ad nauseam also to no effect.

Any suggestions?

Thanks, Julian

PS parentID no "_" !?&$ is that the only exception???

6
General Board / Is this a Browser->Diagram drag and drop bug or...?
« on: June 29, 2017, 05:59:50 pm »
EA 12.1 on W7 64 bit.

Drap and drop from the project browser a BPMN BusinessProcess element that owns a BPMN diagram of the same name onto a a diagram as a link.

An element is created on the diagram and a new, blank, diagram of exactly the same name is created under the BusinessProcess element in the project browser.

Delete the blank diagram and the linked element opens nothing when double clicked. But, Alt-G on the element on the diagram highlights the BusinessProcess in the project browser, so it is a link to the right thing but it has thrown away it's compositediagram. [Anyone have a script for reconnecting orphaned diagrams???]

(If an invocation is created, double clicking the element on a diagram always opens the first diagram under the invoked business process)

How does one add a BP as a link to a a diagram without creating new diagrams in the project browser (and breaking the existing link to the owned diagram?

Thanks

Julian

7
I accuse myself of doing that which I criticise others for: not being able to do what I think I should do and "gaming" the system to do it anyway without asking why I can't do it and what I should be doing instead.

Over on the automation board http://sparxsystems.com/forums/smf/index.php/board,23.0.html I have been asking about script converting BusinessProcess invocations into activities so that I can link them by sequence flows, attach intermediate events etc. [Based on Geert Belleken's synchonize script]

What I realise I now want to know is: given that dragging and dropping a PusinessProcess to e.g. a Collaboration digram creates an invocation, since the UI will not let me use Sequence Flow (and Control Flow links fail BPMN validation), how should Activities link to called Business Processes, and how should e.g. Intermediate Timer events that specify e.g. a deadline for process completion be associated with the invoked. In other words, what is the correct way to

Considerations: the analysis team has done ~100  process models; I was trying to script the changes because there is too much to manually delete/create/link etc. with further connector routing issues if connectors have to be recreated. Called processes should also be triggered by the right events on the calling diagram etc. (Side question: when a BPMN2.0 diagram is validated, does EA check the implied connections to Start and End events (with/without messages))

Given some idea of the right way to do this, scripting it would probably be much easier - Geert's script converts an invocation to a BusinessProcess (but not BPMN2.0, so it doesn't register as a Flow Node, and I'm damned if I can change it make it do that!) and the results are therefore unlinkable.

Many thanks

Julian
Julian

8
I was iterating on packages and elements to find BusinessProcesses to modify and now discover that some have been missed: some BusinessProcesses are (in the browser view) children of other BusinessProcesses - but I can't see what properties of a BusinessProcess Element might lead me to its children.

How can I get a list/collection of the children of a BusinessProcess to check for sub-processes?

Thanks

Julian

9
I can convert actions to instances (thanks Geert for the Synchronize script and general help here) and I can concert all the control flow links to sequence flows, now I would like to be able to attach a free standing event to an activity, i.e. make it edge-mounted.

How might I do that?

Thanks,

Julian

10
This snippet checks to see if an element has a certain tagged value and creates it if it doesn't. It then checks to see the creation was successful but no matter what I do on readback activityScopeInCaseProjectTV is nothing even though the taggedvalue rewally has been created.

Code: [Select]
Session.output("Creating TV named " & asicpTvName & " for " & anEl.Name)
set activityScopeInCaseProjectTV = anEl.TaggedValues.AddNew(asicpTvName,"")
activityScopeInCaseProjectTV.Update
anEl.Update
anEl.Refresh
Repository.AdviseElementChange(anEl.ElementID)
set activityScopeInCaseProjectTV = anEl.TaggedValues.GetByName(asicpTvName)
if activityScopeInCaseProjectTV is nothing then
Session.output("TV named " & asicpTvName & " creation for " & anEl.Name & " failed")
end if
Why? How can I fix this it?

Thx,

Julian

11
(EA12.1 W7 64 bit)

An Activity created from the BPMN2.0 palette has these stereotype values (dumped by script)

Type: Activity
Stereotype: Activity
StereotypeEX: Activity
FQStereotype: BPMN2.0::Activity
   
How can I get this combination by setting values with a script? Please try it - I'd love to know that it can be done in practice!

General issue: StereotypeEx is not supposed** to return the fully qualified stereotype, but it does, so after setting stereotype "BPMN2.0::Activity" I get this

Stereotype: BPMN2.0::Activity
StereotypeEX: BPMN2.0::Activity
FQStereotype: BPMN2.0::Activity

the best I can manage - and only by setting "Activity" in various places - gives me

Stereotype: Activity
StereotypeEX: Activity
FQStereotype: BPMN::Activity

and BPMN::Activity (obviously) doesn't have the right tagged values

Really struggling... and it's Friday and the task should be done today :(

Thanks, Julian

** can't find the equivalent 12.1 page but the 13.0 help page for this is http://sparxsystems.com/enterprise_architect_user_guide/13.0/automation/element2.html.

12
(BPMN2.0 collaboration digram; EA 12.1 on W7 64 bit)

An Action is converted to an Activity by setting Type="Activity" and Stereotype = "BPMN2.0::Activity", the calledActivityRef is set from the Action's callbehaviour; the Call Behavior is  cleared (manually, afterwards)

Control and Object flow but not Sequence Flow connectors can be created from/to the Activity in the UI

None of activityType & sub taskType tagged value values make any difference. It is not the presence of calledActivityRef disabling sequencing as adding that to a fresh element does not change its ability to support sequence flow.

I cannot see any difference between the element I converted to Activity and the BPMN2.0 Activity I created from the BPMN2.0 tools palette - in particular, apart from the name I cannot see (might have missed something!) any difference in TaggedValue values.

How can I make the converted activity support Sequence Flow? (Getting very frustrated  :-[)

Thanks

Julian

13
Thanks to Geert Bellekens I have installed the MS debugger from scd10en.exe but although object variables are listed in the Locals window, clicking on the + to reveal structure does nothing.

Dump Variable Members to File results in an empty file.

Any ideas what the problem is and how to fix it? (EA12.1 on W7 64 bit)

Thanks

Julian

14
Being new to EA scripting I am still unclear/confused about the various things that need to be updated when scripting changes.

For example I see, variously

Code: [Select]
element.Update

Code: [Select]
element.Update
Repository.AdviseElementChange(element.ElementID)

Code: [Select]
diagram.Update

When do I need to update things, "AdviseElementChange" save diagram etc. and in what order, etc. when operating on diagram elements and elements? What other "refresh", "update" etc. methods are there?

Thanks

Julian

15
I would have used Geert's clipboard replacement functionality but... local privilege issues and activeX controls so I ended up writing this, which is much faster than starting IE.

Note that the readback does not delete the "clipboard file" so it can be "pasted" multiple times.

Code: [Select]
const localFilePath = "D:\EAclipboard.txt"

sub testputScriptDataInLocalFile
putScriptDataInLocalFile "Hello World"
        ' use pipe delimiter for test to show whitespace e.g. tab if included in the test string
Session.Output ("Read back = |" & getScriptDataFromLocalFile &"|")
end sub

sub putScriptDataInLocalFile(dataString)
' Note: delete the file each time and recreate so that it starts empty
dim fileSystemObject
dim outputFile

set fileSystemObject = CreateObject( "Scripting.FileSystemObject" )
if fileSystemObject.FileExists(localFilePath) then
fileSystemObject.DeleteFile(localFilePath)
end if
set outputFile = fileSystemObject.opentextFile(localFilePath, ForWriting, True)
outputFile.write dataString
outputFile.close
end sub

function getScriptDataFromLocalFile()
' Note: by not clearing or deleting the file after a read it can be retried if necessary
dim fileSystemObject
dim inputFile

set fileSystemObject = CreateObject( "Scripting.FileSystemObject" )
if fileSystemObject.FileExists(localFilePath) then
set inputFile = fileSystemObject.opentextFile(localFilePath, ForReading, True)
getScriptDataFromLocalFile = inputFile.readAll
inputFile.close
else
getScriptDataFromLocalFile = ""
end if
end function

Hope that's useful to others...

Julian

Pages: [1] 2