UPDATE! The community will be go into read-only on April 19, 8am Pacific in preparation for migration on April 21. Read more.
UPDATE! The community will be go into read-only on April 19, 8am Pacific in preparation for migration on April 21.Read more.

Add Swimlane system field

Idea ID 2738889

Add Swimlane system field

Add a "Swimlane" system field to be auto-set based on the workflow

Swimlanes allow the aggregation of several states in the graphical workflow design into logical groupings based on role, high-level status, or other "second-level" category.  The current functionality is useful for display and visualization purposes, but there is no tie back to actual data in the workflow for reporting or display on the forms.  It would be very useful to add a new system/derived "Swimlane" field which ties back to a value that could be used in listing, distribution, or trend reports, as well as placed on the forms through Composer.

As a proof-of-concept / current workaround, I have written a SQL function which returns the swimlane of any given field.  We have worked this into an AppScript which sets a textual "Swimlane" field on each transition.


-- =============================================
-- Author: Jeff Malin
-- Create date: 8/5/2016
-- Description: Given a State ID, return the string name of its Swimlane
-- =============================================
CREATE FUNCTION [dbo].[GetStateSwimlaneName]
RETURNS varchar(MAX)

-- Determine Workflow ID from State to restrict swimlane calculations
set @WORKFLOWID = (select ts_projectid from TS_STATES where TS_id = @STATEID)

-- Create temp table to hold lane start/end data
SWIMLANENAME varchar(max)


lanedata.TS_NAME as 'SwimlaneName'
,lanedata.startx + 1 as 'SwimlaneStartX'
,lanedata.startx + lanedata.ts_size as 'SwimlaneEndX'
from ( -- SBM Swimlanes table only records width. Determine Start/End offset by aggregating in order
select swimlane.TS_NAME, swimlane.ts_size, isnull((SELECT SUM(layout.ts_size)
FROM ts_gwebands layout
WHERE layout.ts_workflowid = @WORKFLOWID and layout.ts_id < swimlane.ts_id), 0) as startx
from ts_gwebands swimlane
where swimlane.ts_workflowid = @WORKFLOWID
) as lanedata


select lanedata.SwimlaneName from
ts_gwestates statelayout
ts_states states on states.ts_id = statelayout.ts_stateid
@SWIMLANELAYOUT as lanedata -- Search using State position on Swimlane layout temp table
on lanedata.LANESTARTX < statelayout.TS_CENTERX
and lanedata.LANEENDX > statelayout.TS_CENTERX
states.ts_id = @STATEID
and states.ts_status = 0



1 Comment
Micro Focus Expert
Micro Focus Expert
Status changed to: Archived

This idea has not received sufficient votes within 24 months of its submission. It has now been closed (archived) due to insufficient community support.

The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.