Shared resources are resources that contain common configuration data that can be referenced from multiple places.
You can define a shared resource and then reference it from multiple activities in the same or different process. For example, you can define an HTTP Connector resource and use it in any REST application.
Shared resources such as HTTP Connector or HTTP ClientJDBC Connection, JMS Connection, HTTP Connection, are available at design-time. At runtime, the referencing activities and event sources have full access to their instances and configuration.
Shared resources can be grouped in packages, similar to the way process packages and Java packages are presented in the file system.
When defined in an application module, shared resources are not visible to processes outside the application module. However, when defined in a shared module, they are visible to processes outside the shared module.
- Job Shared Variables
- Job shared variables are used to share data within a job such as between a parent and child process instance. At runtime, the engine allocates a new variable for each job and the value of that variable is not visible outside the job to which it was allocated.
- Module Shared Variables
- Module shared variables are used to share data across all processes in a module. The module shared variable is visible to all process instances within the same module.
The key difference between a job shared and a module shared variable is that when jobs expand across module boundaries, a job shared variable is visible outside the module it was set in, while the module shared variable is visible only inside the module in which it was set.