[resolved] Default context problems

Four Stars

[resolved] Default context problems

Hey. 
We solve problems with context. 
My Job as follows:
I have context in the repository for DB connection and configuration in it: DEVL and PROD. As the default context in the repository I set PROD. 
Then in Jobs and all its contexts, I also configure PROD and DEVL. PROD is set to the default value. But when I run the main job with the context DEVL, then subjobs use values PROD and thus get access error. 
I use to launch subjobs option "Transmit whole context". 
How do I set it so I can run the main job with the context of who actually need? When we select the Run dany context, but it does not work. (PROD / Devli) 
How do I set it so that I can export the context of the choice?

Accepted Solutions
Seventeen Stars

Re: [resolved] Default context problems

Transmit whole context mean, the variable values which exists in the parent job will be transmitted to the child job. Everything what the parent job does not known remains unchanged in the child job.
In the studio you can solve this by adding all context variables groups to the parent job to have it with the appropriated context in the child job.
If you export the job as standalone program (with the function build job) you can set the option all context settings of the tRunJob components (means PROD, DEV etc.) will be changed according to the context of the root jobs.
In the TAC you have the same option for tasks. 
For me the by far best way to deal with it is to have only ONE context (call it Default) and use the implicit context load (Checkout the option in Job->Extras). The implicit context load loads all variables from a properties file and if you place the same file in the same location in the development and production servers (but of course with different content) you never has to deal with changing contexts for different environments and you cannot fail because the job takes always the variables from the correct server.

All Replies
Seventeen Stars

Re: [resolved] Default context problems

Transmit whole context mean, the variable values which exists in the parent job will be transmitted to the child job. Everything what the parent job does not known remains unchanged in the child job.
In the studio you can solve this by adding all context variables groups to the parent job to have it with the appropriated context in the child job.
If you export the job as standalone program (with the function build job) you can set the option all context settings of the tRunJob components (means PROD, DEV etc.) will be changed according to the context of the root jobs.
In the TAC you have the same option for tasks. 
For me the by far best way to deal with it is to have only ONE context (call it Default) and use the implicit context load (Checkout the option in Job->Extras). The implicit context load loads all variables from a properties file and if you place the same file in the same location in the development and production servers (but of course with different content) you never has to deal with changing contexts for different environments and you cannot fail because the job takes always the variables from the correct server.
Four Stars

Re: [resolved] Default context problems

Thank you very much. 
Now I finally understand how context works. External context I can not use because it can not be used for storing DB connected to the repository. 
Thank you