displayWorkflowsBasedOnRole: ----------------------------------------- with( userProfileID:rule!GWF_getUserProfSKByLanId(ri!owner).gwfUsrPrfSk, userRoleID:if(rule!APN_isBlank(userProfileID),null(),rule!GWF_getUserPrivIdByProfId(local!userProfileID,cons!GWF_ACTIVE_FLAG_VALUE).gwfUsrRoleId), execRole:if(rule!APN_isEmpty(userRoleID),false(),contains(local!userRoleID,cons!GWF_EXECUTIVE_ROLE_ID)), smRole:if(rule!APN_isEmpty(userRoleID),false(),contains(local!userRoleID,cons!GWF_SENIOR_MANAGER_ROLE_ID)), supervisorRole:if(rule!APN_isEmpty(userRoleID),false(),contains(local!userRoleID,cons!GWF_SUPERVISOR_ROLE_ID)), owners:if(local!execRole,rule!GWF_ExecutiveGroupForActiveWorkflows(local!userRoleID), if(local!smRole,rule!GWF_SeniorManagerGroupForActiveWorkflows(userRoleID,userProfileID), if(local!supervisorRole,rule!GWF_SupervisorGroupForWorkflows(userRoleID,ri!owner),null()))),owners) ----------------------------------------------- GWF_ExecutiveGroupForActiveWorkflows: --------------------------------------------------- if(contains(ri!roleID,cons!GWF_EXECUTIVE_ROLE_ID),rule!GWF_getAllWFModelsByTypeAndActiveFlg(upper(cons!GWF_TYPE_WORKFLOW),cons!GWF_ACTIVE_FLAG_VALUE).gwfWfSk,null()) ----------------------------------------------- GWF_SeniorManagerGroupForActiveWorkflow: --------------------------------------------- if(contains(ri!userRoleID,cons!GWF_SENIOR_MANAGER_ROLE_ID), with( regionIDs:rule!GWF_getPrivilegeDataByProfileIDAndRoleID(ri!userProfileID,cons!GWF_SENIOR_MANAGER_ROLE_ID ,cons!GWF_ACTIVE_FLAG_VALUE).gwfUsrPrivId, regionLabels:if(rule!APN_isEmpty(local!regionIDs),null(),rule!GWF_getRefLookupDataByRefLookupID(local!regionIDs).gwfRefLkupShortDesc), wfIDs:if(rule!APN_isEmpty(local!regionLabels),null(),rule!GWF_getMetadataByTypeAndValue(upper(cons!GWF_TYPE_WORKFLOW),local!regionLabels,cons!GWF_ACTIVE_FLAG_VALUE).gwfWfId), SMWorkflows:if(rule!APN_isEmpty(local!wfIDs),null(),rule!GWF_getWFModelsDataByWFID(local!wfIDs,cons!GWF_ACTIVE_FLAG_VALUE).gwfWfSk), SMWorkflows),null()) --------------------------------------- rule!GWF_SupervisorGroupForWorkflows: ---------------------------------------- if(contains(ri!roleID,cons!GWF_SUPERVISOR_ROLE_ID),rule!GWF_getWorkflowsByWfTypeAndOwner(upper(cons!GWF_TYPE_WORKFLOW),ri!owner,cons!GWF_ACTIVE_FLAG_VALUE).gwfWfSk,null())