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 - djdejong

Pages: 1 [2] 3
16
General Board / Re: Get a gateway's "Type"?
« on: December 13, 2016, 07:05:07 am »
I've tried simply "myElement2.Type", but that only gives "Decision".

17
General Board / Re: Get a gateway's "Type"?
« on: December 13, 2016, 07:02:00 am »
It's a Business Process Diagram in BPMN 2.0 if that's what you're asking. I have gateway elements located inside that diagram. Is it even relevant that it's a gateway though? The "Type" field I have in mind is a drop-down list available in the properties of every element.

18
General Board / Get a gateway's "Type"?
« on: December 13, 2016, 06:32:54 am »
Hi,

This should be an easy thing, I'm just unsure of where to get the info. I want to get the name of the "Type" of an element in my VBScipt, in particular one with the stereotype "Gateway". E.g., "Parallel", "Even-Parallel", "Exclusive", etc...

I've looked through the intellisense options and have tried everything that sounded like it could be it, and have had no luck.

Thanks for the help,
Dana

19
General Board / Re: Invisible tags and changed Type??
« on: December 06, 2016, 05:58:59 am »
Note to anyone that happens to read this, set tv = .... had to be used for it to work (also, refresh the tagged values of the element if you want those vlaues to apply later within the current execution of your code:

Code: [Select]
set tv = supplierElement.TaggedValues.AddNew("Path", "")
tv.value = "Normal"
tv.Update()
supplierElement.Taggedvalues.Refresh

20
I'll admit I haven't tried to dig into this yet, but I was wondering if anyone had already figured this one out and might have some advice?

I want to conditionally create model documents for a virtual doc and add a particular filter to their corresponding template depending on that condition, but I've never tried to change a template from inside a script before so I'm not sure how to approach this, or if it can even be done.

Thanks!
Dana

21
General Board / Re: Invisible tags and changed Type??
« on: November 29, 2016, 07:09:29 am »
Ah yes - I know it's strange, I was trying to do what you showed but I didn't know how to do it and got impatient...I guess that ended up being ironic.  I was trying "...AddNew("Normal", "Path"), or something like that :P

Thanks for this. I'll try it out and get back.

22
General Board / Invisible tags and changed Type??
« on: November 29, 2016, 05:51:08 am »
I'm trying to define flows in a diagram by tagging elements.  If element1 and element3 are tagged with the "Tag" as "tagName" and the "Value" as "tagValue", I want to tag element2 identically:

BEFORE SCRIPT:
element1 (Tag: tagName; Value: tagValue) ---(sequence connector)--> element2 (Tag: X; Value: Y) ---(sequence connector)---> element3 (Tag: tagName; Value: tagValue)

AFTER SCRIPT:
element1 (Tag: tagName; Value: tagValue) ---(sequence connector)--> element2 (Tag: tagName; Value: tagValue) ---(sequence connector)---> element3 (Tag: tagName; Value: tagValue).

This is part of the code I've been playing with to make this happen:

if ((traverseNormal) and (not normalFound)) then
      dim weirdCounter : weirdCounter = 0
      'messin about
      for each connector in myElement.Connectors
         'initialize
         connectorClientID = connector.ClientID
         connectorSupplierID = connector.SupplierID      
         set clientElement = GetElementByID(connectorClientID)
         set supplierElement = GetElementByID(connectorSupplierID)
                        'make sure it's an outgoing connector
         if clientElement.Name = myElement.Name then
            'it's determined at this point that there's only one outgoing connector, therefore supplierElement is the next element
            for each myTag in supplierElement.TaggedValues
                   'I'm doing this because I wasn't sure how to use "supplierElement.TaggedValues.AddNew" properly
               while weirdCounter = 0   
               
                     myTag.Value = "Normal"
                     myTag.Name = "Path"
                     myTag.Update
                     weirdCounter = 1
                                                        'function returns the next element tagged accordingly
                     set getNextElement = supplierElement   
                     
               wend
               
            next            
         end if
      
      next
end if


It currently enters the code given the conditions and changes element2 in some way, but when I go to the diagram and check out element2's properties and the Tags table, it appears blank still.  However, the BPMN 2.0 (the diagram type I chose) table looks quite different and the "Type" is changed -- in the case where the elements are activities -- from "abstractTask" to blank.

A template fragment, as well as code running through element2's tagged values, recognizes that element2 has been tagged as I've intended, but I'm concerned about the changed Type and I'm bewildered as to why the tagged value is invisible to me within the properties dialogue.

23
General Board / Progress Bar for a Script run from a Diagram
« on: November 23, 2016, 11:19:52 am »
Hey!

Does anyone know how to implement a progress bar that displays a script's progress as it's running? 

I have a script that analyzes diagrams, and I want to update the user of its progress as it's running -- but I'm not super keen on using the annoying message boxes. I was hoping there's something more elegant, such as a progress bar that gives info as the script is executing.

Thanks!
Dana

24
General Board / Re: Finding elements relative to connectors in VBScript
« on: November 15, 2016, 11:29:15 am »
Ah, and SupplierID the ID of the target.

25
General Board / Re: Finding elements relative to connectors in VBScript
« on: November 15, 2016, 11:26:26 am »
It looks like "EA.Connector.ClientID" might get the ID of the source of the connector.

26
General Board / Finding elements relative to connectors in VBScript
« on: November 15, 2016, 11:01:35 am »
Hi,

Is there a way to simply access the source and target of a given connector element?  I've defined and populated an array with elements as below, where getDiagramObjects is a procedure that returns an array of elements of the specified type from the diagram:


dim arrSequenceFlows

set arrSequenceFlows = getDiagramObjects(currentDiagram, "SequenceFlow")



I want to now access the ID (or any unique identifier) of a source/target of a given element in teh array arrSequenceFlows. 

Thanks!
Dana

27
Thanks. There is a hierarchical relationship, specically what I depicted there.  But I ended up just asking the user with those same procedures.  It would be cool if there was a way to climb the hierarchy just in the code without having to ask the user to locate the next highest package, though.  Right now I only know that diagram.PackageID, where diagram is the current diagram, will get me diagram's parent package (Package 3) but I'm unsure how to climb higher. In the case of Package 4 I do agree that I'd have to ask, however.

28
Hey,

I'm running a script from a diagram inside a package to create a virtual doc.  The script defines the model doc with a package as source.  My package structure in Project Browser looks like this:

Package 1
    Package 2
        Package 3
           My Diagram
Package 4

The script is run from My Diagram.  I want to use Package 2 and Package 4 as sources for specific model docs.  I currently understand how Package 3 can be used, but I'm unsure how to get the others.

Thanks!
Dana



29
Ah, okay.  That's good to know - thanks!  I'll take a look at that query.

30
General Board / Filtering Elements by Multiple Tagged Values in a Template
« on: November 02, 2016, 08:13:07 am »
Hey,

I'm trying to use the "Element Filters" in the "Document Options" dialogue of the document editor to select an element satisfying two or more values present in its tagged values table.

Say for element1: tag1 = val1; tag2 = val2. element2: tag1' = tag1 = val1; tag2' = val2'. Could I filter for "val1" and "val2' " to grab only element2 using two separate TagValue filters (I realize it might not be necessary in this simplistic example)?  For some reason my attempts to use two filters at once are returning nothing, despite the element having both the tags I'm filtering for.

Thanks!
Dana

Pages: 1 [2] 3