Description
The purpose of the issue to prepare and discuss a design and implementation, regarding how Dependent Resource might access other dependent resources in managed mode.
Problem statement
Dependent Resources are not independent of each other, it's a common usecase to use output or generally speaking data from other dependent resources. In standalone mode, when dependent resources created manually reference to an other dependent resource can be passed when dependent resource is created. For managed mode this is more problematic, since those are instantiated and managed by the system. But should have access to other dependent resources.
Proposed Solution
A way would be to inject the other managed dependent resources. (Eventually the plan is to allow to describe most of the workflows with dependent resources), making this available via an interface:
public interface ManagedDependentResource {
void setDependentResourceContext(DependentResourceContext context)
}
Where the DependentResourceContext
will contain a list of managed dependent resources.
Notes:
- With
depends_on
relation, should be the dependent resources accessible somehow more explicitly? see: Depends On and Conditions to describe workflows Dependent Resources #850