The freshness of system information has attracted extensive attention and has become one of the most critical Quality of Service (QoS) indicators in industrial wireless sensor networks (IWSNs). For practical IWSNs composed of numerous components, the system freshness for a specific task is usually related to multiple and multitype sensing data. For example, in a chemical plant fire alarm system, the system controller (SC) cannot determine the fire notification until analyzing multiple types of ambient information, such as temperature, flame, carbon dioxide, and smoke. However, most existing research on freshness metrics, such as Age of Information (AoI) or Age of Processing (AoP), only considers a single-package setting with a single type of data. Therefore, to measure the system freshness accurately in IWSNs, we propose the Age of Task-oriented Information (AoTI) for industrial tasks. It measures the time elapsed of the latest analyzed results before arriving at the receiver since the generation of any type of sampling data belonging to an industrial task. Considering the time-varying and wireless environments, we aim to minimize the long-term AoTI for IWSNs applications by jointly optimizing access selections and sampling frequencies for all sensors. We first formulate this problem as a Mixed Integer Nonlinear Programming (MINLP) problem and then transform it into a Constrained Markov Decision Process (CMDP), which is further relaxed as an MDP using the Lagrangian method. Finally, we develop a Learning-based Access selection and Sampling frequency Control (LASC) algorithm and verify its superiority through extensive simulations.