public static void addNodeContextTasks ( final INodeEntry nodeentry , final Project project , final Sequential seq ) { //set thread local node name final Task nodenamelocal = genSetThreadLocalRefValue ( NODE_NAME_LOCAL_REF_ID , nodeentry . getNodename ( ) ) ; nodenamelocal . setProject ( project ) ; seq . addTask ( nodenamelocal ) ; if ( null != nodeentry . extractUserName ( ) ) { //set thread local username final Task userlocal = genSetThreadLocalRefValue ( NODE_USER_LOCAL_REF_ID , nodeentry . extractUserName ( ) ) ; userlocal . setProject ( project ) ; seq . addTask ( userlocal ) ; } }
Add tasks to the Sequential to set threadlocal values for the node name and username