Method for generating a representation of resources (RES1... RESn) of a service-based industrial automation system such as an industrial automation system with an Enterprise Architecture like ISA'95, whereby each resource (RES1... RESn) has a unique identifier within the industrial automation system, defining of affinities (AF1...AFn), whereby each affinity (AF1... AFn) is described by at least one property and at least one timestamp, detecting of the unique identifier of all resources (RES1... RESn), tracking the affinities (AF1... AFn) their properties and timestamps and generating the at least one representation of resources based on the tracked affinities, characterized by, defining, by an user, an affinity-configuration of affinities (AF1... AFn), wherein the affinities (AF1... AFn) are relationships associated to structural and functional dependencies between at least two of the resources (RES1... RESn) in the system, monitoring and tracking the affinities (AF1... AFn) by means of a Resource Mapping Component, whereby the affinities (AF1... AFn) happen at service level or at system level of a host controller, HC, hosting the Resource Mapping Component, wherein the Resource Mapping Component comprise a Service Framework which is connected to a Service Bus and to a System Software and Application Component, wherein the Service Framework includes a Pattern Detector, a Data Logger and a Resource Mapper, wherein the Pattern Detector is responsible for monitoring the activity of the Service Framework and the System Software and Application component, that means events in form of services that happen at the service level and events that happens at system level from the hosting controller, HC, wherein only a selected list of events is filtered according to a pattern list and an entry on that list indicates a rule for tracking matching events that corresponds to a given affinity, wherein the Pattern Detector parses the information of matching events and their affinities and introduces them into a data base of the Data Logger, wherein the data base is composed of an entry for each matching event and their affinities occurred at a point in time when the timestamp is captured and wherein the representation of the resources is constructed in form of a graphical resource map, RMAP, RUSMAP, TEMAP, RHCMAP, based on the information stored in the Data Logger and the affinity-configuration given by the user. defining of affinities (AF1...AFn), whereby each affinity (AF1... AFn) is described by at least one property and at least one timestamp, detecting of the unique identifier of all resources (RES1... RESn), tracking the affinities (AF1... AFn) their properties and timestamps and generating the at least one representation of resources based on the tracked affinities, characterized by, defining, by an user, an affinity-configuration of affinities (AF1... AFn), wherein the affinities (AF1... AFn) are relationships associated to structural and functional dependencies between at least two of the resources (RES1... RESn) in the system, monitoring and tracking the affinities (AF1... AFn) by means of a Resource Mapping Component, whereby the affinities (AF1... AFn) happen at service level or at system level of a host controller, HC, hosting the Resource Mapping Component, wherein the Resource Mapping Component comprise a Service Framework which is connected to a Service Bus and to a System Software and Application Component, wherein the Service Framework includes a Pattern Detector, a Data Logger and a Resource Mapper, wherein the Pattern Detector is responsible for monitoring the activity of the Service Framework and the System Software and Application component, that means events in form of services that happen at the service level and events that happens at system level from the hosting controller, HC, wherein only a selected list of events is filtered according to a pattern list and an entry on that list indicates a rule for tracking matching events that corresponds to a given affinity, wherein the Pattern Detector parses the information of matching events and their affinities and introduces them into a data base of the Data Logger, wherein the data base is composed of an entry for each matching event and their affinities occurred at a point in time when the timestamp is captured and wherein the representation of the resources is constructed in form of a graphical resource map, RMAP, RUSMAP, TEMAP, RHCMAP, based on the information stored in the Data Logger and the affinity-configuration given by the user.