import java.util.*;
import com.hansky.intf.stateflow.*;
import com.hansky.intf.sat.*;
import com.hansky.intf.butterfly.*;
import com.hansky.sln.spdbank.extraclass.Common;
import com.hansky.apps.butterfly.server.ButterflyServer;
String data="";
ButterflyServer bs = ButterflyServer.getSingleton();
String udboid ="62BF0B61-8E59-3CA2-CBC2-4B699C3F89A5";
IButterflyContext ctx = (IButterflyContext)request.getAttribute("hs.butterfly.context");
ISession session = bs.getServerContext().getUserDB(udboid).getSessionManager().createSession();
try {
ILOV lv = ctx.getLOV("name", "cmsf_changecate");
List ops = lv.getOptions();
for(int i =0 ;i < ops.size() ;i++){
IOption st = (IOption)ops.get(i);
data+=st.getOID()+":"+st.getText("zh_CN")+"<BR>";
}
} catch (PersistenceException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
finally{
try {
session.txClose();
} catch (PersistenceException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
response.setContentType("text/html;charset=utf-8");
response.getWriter().write(data+"<br>");
import java.util.*;
import com.hansky.intf.stateflow.*;
import com.hansky.intf.sat.*;
import com.hansky.intf.butterfly.*;
import com.hansky.sln.spdbank.extraclass.Common;
import com.hansky.apps.butterfly.server.ButterflyServer;
String data="";
ButterflyServer bs = ButterflyServer.getSingleton();
String udboid ="62BF0B61-8E59-3CA2-CBC2-4B699C3F89A5";
IButterflyContext ctx = (IButterflyContext)request.getAttribute("hs.butterfly.context");
ISession session = bs.getServerContext().getUserDB(udboid).getSessionManager().createSession();
try {
IStateflow sflow = ctx.getStateflow("name", "annual_req_management");
List states = sflow.getStateList();
for(int i =0 ;i < states.size() ;i++){
IState st = (IState)states.get(i);
data+=st.getOID()+":"+st.getDisplayName("zh_CN",session)+"<BR>";
}
} catch (PersistenceException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
finally{
try {
session.txClose();
} catch (PersistenceException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
response.setContentType("text/html;charset=utf-8");
response.getWriter().write(data);
import java.util.*;
import com.hansky.intf.stateflow.*;
import com.hansky.intf.sat.*;
import com.hansky.intf.butterfly.*;
import com.hansky.sln.spdbank.extraclass.Common;
import com.hansky.apps.butterfly.server.ButterflyServer;
import com.spdb.General.*;
String data="";
ButterflyServer bs = ButterflyServer.getSingleton();
String udboid ="62BF0B61-8E59-3CA2-CBC2-4B699C3F89A5";
IButterflyContext ctx = (IButterflyContext)request.getAttribute("hs.butterfly.context");
ISession session = bs.getServerContext().getUserDB(udboid).getSessionManager().createSession();
try {
IStateflow sflow = ctx.getStateflow("name", "annual_req_management");
List trans = sflow.getTransitionList();
for(int i =0 ;i < trans.size() ;i++){
ITransition st = (ITransition)trans.get(i);
data+=st.getOID()+":"+st.getName()+":"+st.getDisplayName("zh_CN", session)+"<BR>";
}
} catch (PersistenceException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
finally{
try {
session.txClose();
} catch (PersistenceException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
response.setContentType("text/html;charset=utf-8");
response.getWriter().write(data);
各存为一个bsh文件,放到chtml目录 ,网页访问下