public static GramJob setupEnvironment(JobExecutionContext jobExecutionContext, boolean enableTwoPhase) throws GFacProviderException {
log.debug("Searching for Gate Keeper");
try {
GramAttributes jobAttr = GramRSLGenerator.configureRemoteJob(jobExecutionContext);
String rsl = jobAttr.toRSL();
if (enableTwoPhase) {
rsl = rsl + "(twoPhase=yes)";
}