on 07-31-2015 10:00 AM
Hi all,
I have a problem to get to the "Extended Inverse Collection" of an process element in a EAM via vbscript.
Before I start to explain my problem: I searched for similiar topics and I found just this one () in the BPM environment, but it didn't help me.
What I did so far:
1. I created an extended attribute "EAMProcess" in the Metaclass Process in the BPM-Model
2. I created a link from a BPM process (Task) to a EAM-Process via the extended attribute "EAMProcess"
3. In the Dependencies tab of the EAM process I can see the sub-tab "Extended Inverse Collection" and the link I created before (see screenshot)
4. Now I want to get to this "Extended Inverse Collection" via script
I tried many things like
ExtendedInverseCollections As ObjectCol
RelatedObjects As ObjectCol
DisplayedObjects As ObjectBag
AttachedRequirements As ObjectCol
DiagramSymbols As ObjectCol
RelatedDiagrams As ObjectCol
RelatedNameTerms As ObjectCol
RelatedCodeTerms As ObjectCol
RelatedTerms As ObjectBag
InputLinks As ObjectCol
OutputLinks As ObjectCol
ExtendedCollections As ObjectCol
ExtendedCompositions As ObjectCol
AllExtendedSubObjects As ObjectBag
IncomingTraceabilityLinks As ObjectBag
ExtendedInfluences As ObjectBag
OutgoingTraceabilityLinks As ObjectBag
ExtendedDependencies As ObjectBag
DiagramContainers As ObjectBag
but none of them worked.
Does someone has an idea or a solution, how to get the collection?
Best regards
RS
I found a way to get extended inverse collections.
'open bpm
set bpm=openModel("D:\temp\SimthCase\BPM.bpm")
'open eam
set eam=openModel("D:\temp\SimthCase\EAM.eam")
set processes=eam.Processes
for each p in processes
output p.name
set shortcuts= p.shortcuts
for each s in shortcuts
output s.replica
' show extended inverse collection name
output s.dependenciesText
next
next
Here s.dependenciesText gives you
Extended Inverse Collections:
Extended Collection 'SubProcess_1.EAM_Process'
This tells us that the extended inverse collection is combination of object SubProcess_1 and
EAM_Process
It's easy to get full information about these objects:
This is the code sample:
Set dict = CreateObject ("Scripting.Dictionary")
set bpm=openModel("D:\temp\SimthCase\BPM.bpm")
set processes=bpm.Processes
for each p in processes
output "BPM Process name: " & p.name
set metaExtensions= p.getMetaExtensions(Cls_ExtendedAttributeTargetItem)
for each m in metaExtensions
output "ExtendedAttribute Name : " & m.name
output "ExtendedAttribute Value: " & p.GetExtendedAttributeText(m.name)
next
dict.add p.name, metaExtensions
next
set eam=openModel("D:\temp\SimthCase\EAM.eam")
set processes=eam.Processes
for each p in processes
output "EAM process name : " & p.name
set shortcuts= p.shortcuts
for each s in shortcuts
ImportantInfo= s.dependenciestext
ImportantInfo=replace(ImportantInfo, "Extended Inverse Collections:", "")
ImportantInfo=replace(ImportantInfo, "'","")
Pair=split(ImportantInfo, "Extended Collection")
count=ubound(Pair)
For i=1 to count
objName=split(Pair(i), ".")
SubProcessName=objName(0)
ExtendedAttributeName=objName(1)
output SubProcessName
output ExtendedAttributeName
'Now use dictionary to find SubProcess and its ExtendedAttribute
'set ExtAttrubteObject=dict.item(subProcessName)
next
next
next
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
your answer helped me to find the objects in my workspace and work with them.
But as I mentioned, I found the objects in my workspace (via string comparism). Is there no way to get the diagram (source) objects on a direct way, after finding the right shortcut?
The target object is set: in my example I uploaded, the target object would be the eam process.
What about the source object, the bpm diagram? Functions like "SourceObject" do not work.
Do you have an idea?
Kind regards
RS
Hi Royal,
Could you upload a model sample?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Phillip,
I attached a EAM and a BPM file, with the addition ".txt".
The BPM sub-process "SubProcess_1" has an extended attribute ("EAM_Process") with a link to the process in the EAM "Process_1".
In the EAM process "Process_1" you can see the in the dependencies tab the extended inverse collection and the information about the link I created. But I can't get to this collection via script.
User | Count |
---|---|
98 | |
11 | |
11 | |
10 | |
10 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.