Creating Dependencies
Dependencies are Conditions that are applied to a Service or a Task. This Condition has methods for adding Dependencies in the form of a Session ID, and for an optional Task ID. Dependencies also allow a Boolean operation that dictates whether to cancel an entire Task/Service when a dependent Task/Service fails.
You can create a forward Dependency for a Session, and optional Task ID, that does not yet exist. To create a forward Dependency, generate a reference ID to a Session, and then use that ID when creating the Session.
In Java, you use com.datasynapse.gridserver.client.DependencyFactory to create Dependency Conditions. You can assign more than one Dependency by using a ConditionSet. C++ and .NET APIs are similar. See the GridServer API documentation for more details.
If there is no session with the dependent Service ID on the Broker when the Session or task with Dependencies is added, it is automatically canceled because the Dependency does not exist. If it is a forward Dependency, no such cancellation is made.
You can specify that a Session or task be canceled if it has a Dependency that fails.
If a non-forward Dependency is made, and the session does not exist, the task is always canceled.