Skip to main content
Version: 5.2.0.1

Scenario Activation Hook

Concept

In situations, where the configuration of a scenario has to be adjusted externally (e.g. by ini-files) a scenario activation hook can be used to overwrite the credentials, environment entries and lookup table during the scenario activation. Orchestra offers a set of fluent interfaces which can be used for overwriting the configuration of existing elements. The way how the configuration can be obtained depend on the implementation context.

Creation

Step 1 : Create a new Java Source.

Step 2 : Select "Scenario activation hook" as Class template.

Creation Creation

After the creation of the java source the following screen appears:

Example Example

The generated template implements the interface ScenarioLifeCycle. Every Java Source that implements this interface is instantiated automatically during the scenario activation and the method onScenarioActivation is invoked. This method receives the parameter scenarioHook. The scenarioHook acts as an entry point into a set of builder interfaces which allow overwriting of existing scenario elements.

Overwriting Credentials

If you want to overwrite an existing credential, invoke the changeCredential method with the name of the credential as parameter. As a result, a object which implements the DynamicSecurityBuilder interface is returned. The DynamicSecurityBuilder allows overwriting the credential settings.

A description of DynamicSecurityBuilder can be found in Overwriting Credential Settings

Overwriting Environment entries

If you want to overwrite an existing environment entry, invoke the changeEnvironmentEntry method with the name of the environment entry as parameter. As a result, a object which implements the DynamicEnvironmentEntryBuilder interface is returned. The DynamicEnvironmentEntryBuilder allows overwriting the settings of an environment entry.

A description of DynamicSecurityBuilder can be found in Overwriting Environment Entries

Overwriting Lookup Tables

If you want to overwrite an existing lookup table, invoke the changeLookupTable method with the name of the lookup table as parameter. As a result, a object which implements the DynamicLookupTableBuilder interface is returned. The DynamicLookupTableBuilder allows overwriting the settings of the given lookup table.

A description of DynamicLookupTableBuilder can be found in Overwriting Lookup Tables