View Business Process Hierarchy: How to customized soring of top level processes?

Post Reply
xiaoqi
Posts: 127
Joined: 09 Feb 2023, 03:33

Hello all,

I've built the parent-child relationship to Business Processes, and now it's OK to have the Business Process Hierarchy visualized, content is OK for now, but I'd like to know whether there's possibility to allow me customized the sorting order of those Top level business processes, e.g., I'd like to put that "Market Busienss Process" group to the most right position.

I see there's "Process ID" fiedl in business process slot, but assigning that value has no effect for the sorting order sequence.

Comparing with another view - Business Reference Model - see attached 2nd picture, within Business Capability slot, that view's code utilizes the "Busienss Capability Index" value for the sequence customization.

Code: Select all

<xsl:sort select="$topLevelBusCapabilities[name = current()/own_slot_value[slot_reference = 'buscap_to_parent_child_buscap']/value]/own_slot_value[slot_reference = 'business_capability_index']/value" data-type="number"/>
Could you help to check whether we can have similar setting on Business Process part?

Thanks,
Xiaoqi
You do not have the required permissions to view the files attached to this post.
JohnM
Posts: 468
Joined: 17 Feb 2009, 20:19

Hi,

Not currently. We'll raise a request for adding in the future

John
xiaoqi
Posts: 127
Joined: 09 Feb 2023, 03:33

Thanks John for your taking care.
xiaoqi
Posts: 127
Joined: 09 Feb 2023, 03:33

Hello,

May I know when the feature can be added? Or is there any hints that I can customize the current view for making the sort possible?

Thanks, Xiaoqi
JohnM
Posts: 468
Joined: 17 Feb 2009, 20:19

Hi,

It's on the 6.19 release list. The owner's away at the moment so i don't have an exact slot name for it. If it is urgent you could create new slot and I'd call it business_process_index and make it a string.

In your code where your processes are iterated you need to add the sort - I presume it's something like this in your code:

Code: Select all

<xsl:apply-templates select="$processes" mode="[TEMPLATE NAME]"/> 
make it this:

Code: Select all

<xsl:apply-templates select="$processes" mode="[TEMPLATE NAME]">
<xsl:sort select="current()/own_slot_value[slot_reference = 'business_process_index']/value]" order="ascending"/>
</xsl:apply-templates>
That should work. If you get stuck post your code here and we'll take a look

John
xiaoqi
Posts: 127
Joined: 09 Feb 2023, 03:33

Hi John,

Thanks for your help.

In my current "core_bl_business_process_hierarchy.xsl", I found that code mentioned by you in line 251, as below:

Code: Select all

var model=[<xsl:apply-templates select="$topBusinessProcesses" mode="model"/>]
However, it's wrapped in the "var model = [ ]"

I've created the "business_process_index" slot under "business_process" class, and add the code as below:

Code: Select all

var model=[<xsl:apply-templates select="$topBusinessProcesses" mode="model">	<xsl:sort select="current()/own_slot_value[slot_reference = 'business_process_index']/value]" order="ascending"/></xsl:apply-templates>]
After applying to viewer, I got error with the message in the bottom as below:

Code: Select all

file:/C:/Program%20Files/Apache%20Software%20Foundation/Tomcat%209.0/webapps/vfs_knowledge_portal/common/core_char_map.xsl; Line#: 2; Column#: 80 : Fatal Error: Unexpected token "]" beyond end of expression; SystemID: file:/C:/Program%20Files/Apache%20Software%20Foundation/Tomcat%209.0/webapps/vfs_knowledge_portal/business/core_bl_business_process_hierarchy.xsl; Line#: 251; Column#: 73
Is there anything wrong I did? The other part with "apply-templates" is for "subprocess" which I think should not be used like this.

thanks a lot,
Xiaoqi
xiaoqi
Posts: 127
Joined: 09 Feb 2023, 03:33

Added, it's still working when I remove those "sorting" part:

Code: Select all

var model=[<xsl:apply-templates select="$topBusinessProcesses" mode="model"><xsl:sort /></xsl:apply-templates>]
Need consult from you whether the middle Sorting part is the issue?

Xiaoqi
xiaoqi
Posts: 127
Joined: 09 Feb 2023, 03:33

Update again, it's working now, there's one additional "]" is earlier code, now as below:

Code: Select all

var model=[<xsl:apply-templates select="$topBusinessProcesses" mode="model"><xsl:sort select="current()/own_slot_value[slot_reference = 'business_process_index']/value" order="ascending" /></xsl:apply-templates>]
Will keep using this till next viewer version.

Thanks greatly!
Xiaoqi
xiaoqi
Posts: 127
Joined: 09 Feb 2023, 03:33

One more input, besides the Top Layer Business Processes are now sorted by adding "business_process_index" slot, which can be controlled in customized way, below I also found the template for sub-processed under every Top Process.

Original code:

Code: Select all

"subProcess":[<xsl:apply-templates select="$thissubBusinessProcesses" mode="subProcesses"/>],
I add sorting base on process name, now it's better shown per abc ascending:

Code: Select all

"subProcess":[<xsl:apply-templates select="$thissubBusinessProcesses" mode="subProcesses"><xsl:sort select="current()/own_slot_value[slot_reference = 'name']/value" order="ascending" /></xsl:apply-templates>],
Share with you,
Xiaoqi
Post Reply