Map<String, String> props = new HashMap<String, String>();
Instance test00_instance0 = null ;
CompositeType appli3 ;
// Calling that application from an external program (this instance).
S1 s11 = (S1) test00_instance0.getServiceObject();
s11.callS1("createAppli-1");
// setting visibilities
// composite a3 should not be shared
// test00_instance0.setProperty(CST.SHARED, CST.V_FALSE);
System.out.println("\n\n===================================== Testing promotions\n"
+ " creating composite on S1 containing an S2 composite \n");
props.clear();
// props.put(CST.A_LOCALIMPLEM, CST.V_TRUE);
// props.put(CST.A_LOCALINSTANCE, CST.V_TRUE);
// props.put(CST.A_BORROWIMPLEM, CST.V_FALSE);
// props.put(CST.A_BORROWINSTANCE, CST.V_FALSE);
CompositeType mainCompo = apam.createCompositeType("Test00", "TestS1Promotions", null, "S1Main", null /* models */,
props);
System.err.println("TestS1Promotions inside Test00 and black box");
mainCompo.createInstance((Composite) test00_instance0, props);
System.out.println("\n\n\n========================== deuxieme exec ===");
// test00_instance0 = appli3.createInstance(null /* composite */, null/* properties */);
// Calling that application from an external program (this instance).
s11 = (S1) test00_instance0.getServiceObject();
s11.callS1("createAppli-2");
System.out.println("\n\n\n== troisieme exec ===");
// test00_instance0 = appli3.createInstance(null /* composite */, null/* properties */);
// Calling that application from an external program (this instance).
s11 = (S1) test00_instance0.getServiceObject();
s11.callS1("createAppli-3");
}