| | |
| | | import com.vci.corba.omd.lcm.LifeCycle; |
| | | import com.vci.corba.omd.lcm.TransitionVO; |
| | | import com.vci.server.base.persistence.dao.HibernateSessionFactory; |
| | | import com.vci.server.base.utility.LogRecordUtil; |
| | | import com.vci.server.base.utility.ServerServiceProvider; |
| | | import com.vci.server.bof.server.ServiceFacadeExecuteHelper; |
| | | import com.vci.server.bof.service.BOFactoryServices; |
| | |
| | | |
| | | import com.vci.corba.common.VCIError; |
| | | |
| | | public class BatchTransferBO extends ServiceFacadeExecuteHelper{ |
| | | public class BatchTransferBO extends ServiceFacadeExecuteHelper { |
| | | |
| | | private static ServiceFacadeExecuteHelper instance = null; |
| | | |
| | | public static ServiceFacadeExecuteHelper getInstance() { |
| | | if(instance == null) { |
| | | if (instance == null) { |
| | | instance = new BatchTransferBO(); |
| | | } |
| | | return instance; |
| | |
| | | TransitionVO vo2 = null; |
| | | String boLcStatus = bos[i].lcStatus; |
| | | if (boLcStatus == null || boLcStatus == "") { |
| | | throw getLocalString("", new VCIError("P0010SOF-00023", |
| | | new String[] { bos[i].name })); |
| | | throw getLocalString("", new VCIError("P0010SOF-00023", new String[] { bos[i].name })); |
| | | // throw getLocalString("", new |
| | | // VCIError("当前所选的业务对象\"{0}\"的生命周期状态值为空,不用有效执行跃迁操作。",new |
| | | // String[]{bos[i].name})); |
| | |
| | | } |
| | | if (curLC == null) { |
| | | // TODO:提示出来 |
| | | throw getLocalString("", new VCIError("P0010SOF-00024", |
| | | new String[] { bos[i].name })); |
| | | throw getLocalString("", new VCIError("P0010SOF-00024", new String[] { bos[i].name })); |
| | | } |
| | | if (!vos[i].destination.equals("") && !vos[i].connect.equals("")) { |
| | | for (int l = 0; l < curLC.routes.length; ++l) { |
| | |
| | | } |
| | | } |
| | | if (vo2 == null) { |
| | | throw getLocalString("", new VCIError("P0010SOF-00027", |
| | | new String[] { vos[i].destination })); |
| | | throw getLocalString("", new VCIError("P0010SOF-00027", new String[] { vos[i].destination })); |
| | | } |
| | | } else if (!vos[i].destination.equals("")) { |
| | | for (int l = 0; l < curLC.routes.length; ++l) { |
| | |
| | | } |
| | | } |
| | | if (vo2 == null) { |
| | | throw getLocalString("", new VCIError("P0010SOF-00027", |
| | | new String[] { vos[i].destination })); |
| | | throw getLocalString("", new VCIError("P0010SOF-00027", new String[] { vos[i].destination })); |
| | | } |
| | | } else if (!vos[i].connect.equals("")) { |
| | | for (int l = 0; l < curLC.routes.length; ++l) { |
| | |
| | | } |
| | | } |
| | | if (vo2 == null) { |
| | | throw getLocalString("", new VCIError("P0010SOF-00025", |
| | | new String[] { vos[i].connect })); |
| | | throw getLocalString("", new VCIError("P0010SOF-00025", new String[] { vos[i].connect })); |
| | | } |
| | | } else { |
| | | throw getLocalString("", new VCIError("P0010SOF-00026", |
| | | new String[] {})); |
| | | throw getLocalString("", new VCIError("P0010SOF-00026", new String[] {})); |
| | | } |
| | | // 执行跃迁事件 |
| | | TransitionEventsExcuter excuter = new TransitionEventsExcuter(); |
| | |
| | | return rs; |
| | | } |
| | | // 日志记录 |
| | | VCIInvocationInfo info = HibernateSessionFactory |
| | | .getVciSessionInfo(); |
| | | String ip = "127.0.0.1"; |
| | | if (info != null) { |
| | | ip = info.clientIPInfo == null || "".equals(info.clientIPInfo) ? "127.0.0.1" |
| | | : info.clientIPInfo; |
| | | } |
| | | batchRecordLog(bos, ip, "跃迁"); |
| | | // VCIInvocationInfo info = HibernateSessionFactory.getVciSessionInfo(); |
| | | // String ip = "127.0.0.1"; |
| | | // if (info != null) { |
| | | // ip = info.clientIPInfo == null || "".equals(info.clientIPInfo) ? "127.0.0.1" : info.clientIPInfo; |
| | | // } |
| | | //batchRecordLog(bos, ip, "跃迁"); |
| | | LogRecordUtil.batchWriteLog(bos, "跃迁"); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | |
| | | |
| | | throw this.getLocalString("P0010SOF-00008", e); |
| | | } catch (Throwable t) { |
| | | |
| | | |
| | | t.printStackTrace(); |
| | | throw this.getLocalString("P0010SOF-00008", t); |
| | | } |