Bug in core_bl_bus_process_model_uml_script.xsl (viewer 6.02)

Post Reply
emmacc
Posts: 8
Joined: 05 Sep 2017, 08:59

Hello,

When I try to render a "slightly" more complex diagram of a business process flow after the second decision node the responses are not rendered beneath the right nodes anymore.

I took a look at the UML script generated by the core_bl_bus_process_model_uml_script.xsl and it looks strange / wrong:

Code: Select all

		"Reviewthing" -->"Thing ok? \n <size:10><color:#ffffff><i>No Role Defined</i></color></size>" as Thingok << question >>			
		if " " then
								
		"Rejectthing" -->"Some Decision? \n <size:10><color:#ffffff><i>No Role Defined</i></color></size>" as Somedecision << question >>			
		if " " then
		
--> [Yes] "<img:/C:/../essential_viewer/images/person-icon-empty.png> Do something A \n <size:10><color:#aaaaaa><i>No Role Defined</i></color></size>" as Dosomethinga						
									
		
--> [Yes] "<img:/C:/../essential_viewer/images/person-icon-empty.png> Do something C  \n <size:10><color:#aaaaaa><i>No Role Defined</i></color></size>" as Dosomethingc						
									
		else
--> [No] "<img:/C:/../essential_viewer/images/person-icon-empty.png> Do something B \n <size:10><color:#aaaaaa><i>No Role Defined</i></color></size>" as Dosomethingb						
									
		else
--> [No] "<img:/C:/../essential_viewer/images/person-icon-empty.png> Do something D \n <size:10><color:#aaaaaa><i>No Role Defined</i></color></size>" as Dosomethingd						



and it should rather be like this I guess:

Code: Select all

		"Reviewthing" -->"Thing ok? \n <size:10><color:#ffffff><i>No Role Defined</i></color></size>" as Thingok << question >>			
		if " " then

--> [Yes] "<img:/C:/../essential_viewer/images/person-icon-empty.png> Do something A \n <size:10><color:#aaaaaa><i>No Role Defined</i></color></size>" as Dosomethinga						

		else
--> [No] "<img:/C:/../essential_viewer/images/person-icon-empty.png> Do something B \n <size:10><color:#aaaaaa><i>No Role Defined</i></color></size>" as Dosomethingb						
								
		"Reviewotherthing" -->"Some Decision? \n <size:10><color:#ffffff><i>No Role Defined</i></color></size>" as Somedecision << question >>			
		if " " then
		
--> [Yes] "<img:/C:/../essential_viewer/images/person-icon-empty.png> Do something C  \n <size:10><color:#aaaaaa><i>No Role Defined</i></color></size>" as Dosomethingc						
																											
		else
--> [No] "<img:/C:/../essential_viewer/images/person-icon-empty.png> Do something D \n <size:10><color:#aaaaaa><i>No Role Defined</i></color></size>" as Dosomethingd	

I somehow suspect there is a bug in the XSL when it comes to select the relations of a decision node correctly...

Thanks for any help / suggestions / fixes.

Regards
emmacc
JohnM
Posts: 467
Joined: 17 Feb 2009, 20:19

Hi

Couple of questions.

1) Do you see the same behaviour as seen in this post? https://enterprise-architecture.org/for ... ess#p29132

2) Are you using the files posted in the link?

Let me know the answers and we'll work it out from there

John
emmacc
Posts: 8
Joined: 05 Sep 2017, 08:59

Hi JohnM,

Thanks for the link. I run the latest version of the viewer (6.02) which should already contain the mentioned fixes.

And my problem looks a little different, but similar. One decision has no branches and another has all of them.

Cheers
emmacc
Posts: 8
Joined: 05 Sep 2017, 08:59

I think I found a fix for this problem by branching of the recursion with the local decision candidates:

Code: Select all

<xsl:variable name="localDecisions" select="$newInScopeRelationList[own_slot_value[slot_reference=':FROM']/value = $nextProcessUsage/name]"></xsl:variable>
						
<xsl:call-template name="NewRenderRelationList">
	<xsl:with-param name="inScopeRelations" select="$localDecisions"/>
	<xsl:with-param name="usedRelations" select="$newUsedRelationList"/>
</xsl:call-template>

and removing them afterwards from the $newInScopeRelationList:

Code: Select all


<xsl:call-template name="NewRenderRelationList">
	<xsl:with-param name="inScopeRelations" select="$newInScopeRelationList except $localDecisions"/>
	<xsl:with-param name="usedRelations" select="$newUsedRelationList"/>
</xsl:call-template>						

Of course the outer recursion must be move inwards as well then, and in case the end relations are reactivated it must be called from there too.

The whole change of the otherwise branch starting from line 310 of core_bl_bus_process_model_uml_script.xsl:

Code: Select all


<xsl:otherwise>
	<xsl:variable name="nextProcessUsage" select="$allProcessUsages[name= $thisRelation/own_slot_value[slot_reference=':TO']/value]"/>
	
	<xsl:choose>
		<xsl:when test="$nextProcessUsage/type = 'Business_Process_Flow_Decision'">
			<xsl:text>						
					</xsl:text>"<xsl:value-of select="$thisBusProcStrippedName"/>" --><xsl:call-template name="RenderDecision"><xsl:with-param name="decision" select="$nextProcessUsage"/></xsl:call-template><xsl:text>												
					if " " then
					</xsl:text>
		
		<xsl:variable name="localDecisions" select="$newInScopeRelationList[own_slot_value[slot_reference=':FROM']/value = $nextProcessUsage/name]"></xsl:variable>
		
		<xsl:call-template name="NewRenderRelationList">
			<xsl:with-param name="inScopeRelations" select="$localDecisions"/>
			<xsl:with-param name="usedRelations" select="$newUsedRelationList"/>
		</xsl:call-template>
		
		<xsl:call-template name="NewRenderRelationList">
			<xsl:with-param name="inScopeRelations" select="$newInScopeRelationList except $localDecisions"/>
			<xsl:with-param name="usedRelations" select="$newUsedRelationList"/>
		</xsl:call-template>						
		
		</xsl:when>	
		<xsl:when test="$thisRelation/name = $endProcessRelation/name">
			<!-- IGNORE END RELATIONS -->
			<!---\-> [<xsl:value-of select="$decisionResponse"/>] (*)-->						
		</xsl:when>						
		<xsl:otherwise>
			<xsl:if test="count($nextBusProc) > 0">
				<xsl:text>						
						</xsl:text>"<xsl:value-of select="$thisBusProcStrippedName"/>" --><xsl:call-template name="RenderBusinessProcess"><xsl:with-param name="busProc" select="$nextBusProc"/></xsl:call-template><xsl:text>			
						</xsl:text>
				<!-- Print out any goal events for the next process -->
				<xsl:variable name="thisGoalEventRelations" select="$processFlowRelations[(own_slot_value[slot_reference=':FROM']/value = $nextProcessUsage/name) and (own_slot_value[slot_reference=':TO']/value = $goalEventUsages/name)]"/>
				<xsl:if test="count($thisGoalEventRelations) > 0">
					<xsl:text disable-output-escaping="yes">&#13;</xsl:text><xsl:call-template name="RenderGoalEvent"><xsl:with-param name="eventRelation" select="$thisGoalEventRelations[1]"/></xsl:call-template><xsl:text>					
						</xsl:text>
				</xsl:if>
			</xsl:if>
			
			<xsl:call-template name="NewRenderRelationList">
				<xsl:with-param name="inScopeRelations" select="$newInScopeRelationList"/>
				<xsl:with-param name="usedRelations" select="$newUsedRelationList"/>
			</xsl:call-template>							
										
		</xsl:otherwise>
		
	</xsl:choose>	
</xsl:otherwise>


emmacc
Posts: 8
Joined: 05 Sep 2017, 08:59

I encountered another problem, maybe a bug in eas:generateRelationList?

It seems the list of relations is not being calculated correctly.

For some reasons some TO-slots of a BPU-OCCURS_BEFORE-BPU do not have a FROM counterpart in the list of relations, leaving some vertices in the graph ending nowhere. On the other hand some relations appear twice in the list.

Any idea?

Thanks
User avatar
neil.walsh
Posts: 444
Joined: 16 Feb 2009, 13:45
Contact:

Thanks, I've logged this for investigation
Post Reply