How to get task session ID as a data element in Policy Xpress

Document ID : KB000009791
Last Modified Date : 14/02/2018
Show Technical Document Details
Introduction:

When using the Policy Xpress "Task Information" type data element and the "Task Session Attribute" function, and then "tasksessionid" for the attribute name, it does not return any value.  The following can be retrieve in the same manner, but not tasksessionid:

submitted 

audited 

approved 

primary_complete 

pre_tasks_complete 

 

Instructions:

The task session ID is not currently retrieved by the Task Session Attribute PX function.  As a workaround, add a screen logical attribute to the task's profile screen, with the following Initialization JavaScript, and then get the value of the screen logical attribute with a UI-type PX policy:

function init(FieldContext) 

FieldContext.setValue(FieldContext.getSessionId()); 

 

The UI type policy is needed to retrieve the screen logical attribute value as it is evaluated at the screen (UI) level and not persisted to a physical attribute