SetSubWorkData()

This code sample describes how to retrieve the information about the Table Values data type that the main workflow passes to a Sub-workflow.

	Function Boolean SetSubWorkData( \
		Object 		prgCtx, \
		WAPIWORK 	work, \
		Integer		workID, \
		Integer 	subWorkID, \
		Integer 	taskID, \
		Integer 	returnID, \
		RecArray 	pkgs, \
		Dynamic 	data )
		
		List 		mainAttribNames
		List 		subAttribNames
		Record 		r
		Boolean 	success = True

		//Locate the Table Values data type in the RecArray of data types
		//that have been added to the workflow. Then call the
		//UpdateSubWorkData() script which passes the data from the main
		//workflow to the Sub-workflow.

	for r in pkgs
		if ( ( r.TYPE == .fType ) && ( r.SUBTYPE == .fSubType ) )
			success = .UpdateSubWorkData( \
						prgCtx, \
						r.USERDATA, \
						returnID, \
						data )
			break
		end
	end
	
	return( success )
end