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.

Messages - Mr Stuff

Pages: [1] 2 3 4
Automation Interface, Add-Ins and Tools / Re: Script Prompt Position
« on: July 31, 2017, 07:41:11 pm »
I also had problems with Session.Prompt placing the box in odd places and now use vbscript inputbox for the reason Geert gave.

Just once thing... have you checked the parameter list? I have a vague recollection that one of my early errors was passing too many parameters thinking it worked like InputBox and the invalid parameters were indirectly causing bad placement.

Just to round things off, I accomplished my objective by a very heavy handed hack...

Script to allow user to add/edit TaggedValues on a BPMN2.0::Activity also creates/updates (edge mounted) ObjectNodes whose name is set to the TaggeValue value and presentation is controlled by a ShapeScript for the ObjectNode based on a custom stereotype.

One nice feature of this is that the Collapse Embedded Elements option on diagrams hides all this extra info if it's not required.

I do look forward to a better way of doing such things though.



You mean EA will ignore the explicit XML dt tag with a formally recognised schema datatype of string and try to b64 decode and decompress anyway??? Surely EA is interested in the value and not the encoding...?

I hope we have our wires crossed because I have a hard time making sense of that :)


@qwerty "anyone offer..." was more of a "Does anyone have an existing...": why reinvent the wheel?

@Helmut - thank you very much; I've passed all the information to a colleague who has a development environment...

And yes to, "If I have understood you right you want to visualize a tagged value of a parent element with an Add-In used by a shape script." One can't use shapescripts on BPMN2.0 elements, but my placeholder objecnodes will not be BPMN2.0 (they'll have a custom stereotype just to trigger the shapescript to call the function to display the returned value)

Thanks for the input everyone,


Because I am hoping for a compiled add-in that I just, "add in". That is how it works, isn't it?

Hi Helmut

Thanks for the support...

A shapescript can print values of things such as #NAME# of the element to which the script applies. Shapescripts can also make use of add-in calls.

This old forum post gives examples of coding and calling and I'd do it myself but I don't have a dev. environment.

What I would like to get from an add-in call in a shapescript for an embedded element such as an objectNode is the value of a named taggedvalue of the parent element (obviously a general purpose getter that did properties as well would be v. useful, but I'm primarily interested in taggedvalues).

Please let me know if any further clarification is required.


@KP  :) I just found that while waiting for further answers...

following fragment toggles Collapse Embedded Elements

Code: [Select]
newStyleEx = curDiag.StyleEx
if instr(newStyleEx, "CEE=1;") > 0 then
newStyleEx = Replace (newStyleEx, "CEE=1;", "")
' just to be safe, follow the Sparx pattern of putting the CEE=1 value just before the Theme
newStyleEx = Replace (newStyleEx, "Theme=", "CEE=1;Theme=")
end if
curDiag.StyleEx = newStyleEx

Thanks, Julian

@Viking - thanks... Geert's repository is where I got the plain text of the shapescript (rather than the base64 zipped version in the XML) that I would like to past back as plain using <dt:dt string>


Thanks, but that's not really the issue The diagram properties dialog* has a check box to "collapse embedded objects", which reduces their appearance to black dots on the element edge.

I don't want to remove the diagram objects merely enable/disable this display option.

*right-click on diagram background... Properties... Elements... "collapse embedded objects" check box.

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

(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...



@KP - thanks.

Just had the same info from Allan in support; my reply - with further questions about a modified local BPMN2.0 MDG XML file (see notes above) - was as follows:

Thanks for the quick turnaround.

Yes, I have been able to link a note to TaggedValues but only to all of them at once; when only one or two pieces of information are to be highlighted this is a problem as there are 18 tagged values with non-null, non-<memo> values displayed in properties that's already a long list. Our custom tagged value does appear, but it's lost in a sea of unimportant plain text

>>> Yes, messing around with BPMN shape scripts isn't going to work.

It might be helpful to acknowledge this prominently; it would have saved me considerable effort. It is also a significant deficiency in my opinion.

I am trying to replace the BPMN2.0 MDG with non-encoded, non-compressed shapescript for Activity; advice on how to resolve conflicts with the built in BPMN2.0 MDG would be appreciated, i.e. how do I substitute a local MDG XML. As noted in the forum, two XLM files with same name, etc. always enable/disable together: what do I need to change in my version to keep them separate… and if I amend the content, when does EA reload the XML file/how can I force it to?

All input gratefully received.


That's pretty much what I've done - except for the stated problem of not knowing how to differentiate the two MDGs correctly.

Thanks Geert, that info is safely stored now ;)

<Creative hat on>
It turns out that even if I wanted to jump through those hoops there's no point: the app is virtualised and I have no privileges to modify/replace files, so couldn't update the MDG.

So... I thought, why not take a copy... and change

<Image type="EAShapeScript 1.0" xmlns:dt="urn:schemas-microsoft-com:datatypes" dt:dt="bin.base64"> to
<Image type="EAShapeScript 1.0" xmlns:dt="urn:schemas-microsoft-com:datatypes" dt:dt="string">

for Activity... and then just paste in the plain text of the shapescript, which I can have open in Notepad++ edit, save and ?refresh EA to see the results

I still don't know whether that would work because: although I have added my BPMN2.0 MDG (modified as above) from a local path and have tried disabling the built in BPMN2.0 MDG technology, the latter keeps reenabling itself.

It's also possible that I need to change some ID or Alias or something in the replacement MDG XML file, but I have no idea what might be important.

Any thoughts? Could this work?



Pages: [1] 2 3 4