OutSystems Service Studio 4.1 Help
eSpace References
An eSpace can be a part of an application in the sense that elements exposed by this eSpace are used by other eSpaces. An application, in this situation, is composed of the main eSpace and all the eSpaces that expose elements necessary to the complete application. In this context, it is necessary to distinguish the two following concepts: Producer and Consumer.
Producer
The Producer is the eSpace (An application or a part of an application that implements a set of services, gathered in a single project. Each service can be presented in a different flow.) or extension (Set of actions, structures, and entities defined in OutSystems Integration Studio that increments the OutSystems Hub Edition platform and allows integration with external systems.) that effectively defines and implements the referable elements. The Producer can expose the following referable elements:
Entities: Created and defined in the Producer eSpace or Producer extension.
Structures: Created and defined in the Producer eSpace or Producer extension.
Actions: Created and defined in the Producer eSpace or Producer extension.
Screen Blocks: Created and defined in the Producer eSpace.
Permission Areas: Created and defined in the Producer eSpace.
Consumer
The Consumer is the eSpace that uses elements exposed by the Producer. From the Consumer point of view, these elements are called References.
To export your elements so they can be used by other Consumer eSpaces, you have to set them to public as explained below.
If the producer is an eSpace, simply use OutSystems Service Studio and set the Entities, Structures, User-defined actions, Screen Blocks, and Permission Areas as Public. Once an element is set as Public, it can be used by other Consumer eSpaces.
You can only set as public the elements that belong to your eSpace, that is, owned by it. References cannot be set as public.
System entities are implicitly
public so they can be used by any Consumer eSpace.
If the producer is an Extension, its entities, structures, and actions are defined in OutSystems Integration Studio at extension definition time. Once the extension is successfully published in OutSystems Hub Server, it can be used by Consumer eSpaces by simply adding a reference to it.
To use the Public elements of a Producer, you must launch the Add/Remove References Window, in the Consumer, and then simply add a reference to the Producer entities, Producer structures, Producer actions, Producer screen blocks, and Producer permission areas.
Once the reference is added, you can use it anywhere in your consumer eSpace but you cannot change its definition.
Using references is different
from merging elements from an eSpace: when you merge an element, this
element is copied to your local eSpace and is executed in that eSpace.
See how merge works.
The following picture presents graphically the relationship between Public and References elements:

In this picture, the Private elements are, by simple exclusion, those that are neither References nor Public. As you can see, it is not possible to expose an element that is a reference to another eSpace.
See Also
Add/Remove References Window | Consumer eSpace Life Cycle | Producer eSpace Life Cycle | About Sessions in OutSystems Platform