⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 wizardaction.java

📁 OBPM是一个开源
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
    	    			strb.append("<validateScript></validateScript><scale>0</scale><name></name><note></note><id>1181125469687</id></cn.myapps.core.workflow.element.Relation></cn.myapps.core.workflow.element.FlowDiagram>");

    	    			Date lastmodify=new Date();
    	    			BillDefiVO bv = new BillDefiVO();
    	    			BillDefiProcessBean bp = new BillDefiProcessBean();
    	    			bv.setModule(mv);
    	    		    bv.setAuthorname(authorname);
    	    		    bv.setLastmodify(lastmodify);
    	    		    bv.setSubject(workflowname);
    	    		    bv.setFlow(strb.toString());
    	    		    bv.setApplicationid(form.getApplicationid());
    	    		    bp.doCreate(bv);
    	    		    //if want to bind a form 
    	    		    String isbind = params.getParameterAsString("_isbind");
    	    		    if(isbind.equals("true")&&isbind!=null)
    	    		    {
    	    		    	String bindto = params.getParameterAsString("_bindto");
    	    		    	
    	    		    	if(bindto.equals("true")&&bindto!=null)
    	    		    	{
    	    		    		act = new Activity();
    	    		            act.setName((String)FormAction._WORKFLOW.get(new String("5")));
    	    		            act.setType(5);
    	    		            act.setParentForm(form);
    	    		            act.setOnActionFlow(bv);
    	    		            act.setApplicationid(form.getApplicationid());
    	    		            activity.doCreate(act);
    	    		    	}else if(bindto.equals("false")&&bindto!=null)
    	    		    	{
    	    		    		 if(!(flowlist.equals(""))&&flowlist!=null)
    	    		              {
    	    		              	//get flowid and save to activitys
    	    		    		    act = new Activity();
    	    		              	BillDefiVO bdv =(BillDefiVO)bp.doView(flowlist);
    	    		              	act.setName((String)FormAction._WORKFLOW.get(new String("5")));
    	    			            act.setType(5);
    	    			            act.setParentForm(form);
    	    			            act.setOnActionFlow(bdv);
    	    			            act.setApplicationid(form.getApplicationid());
    	    			            activity.doCreate(act);
    	    		              }
    	    		    	}
    	    		    }
    	    		 }
	    	        }
	        }catch (Exception e)
	        {
	        	throw e;
	        }
	        Map map=new HashMap();
	        String id[]=new String[2];
	        id[0]=moduleid;
	        map.put("id",id);
	        map.put("mode","module");
	        getContext().setParameters(map);  
	      return SUCCESS;
		}
		
		public String cancle(){
		      Map map=new HashMap();
		      String id[]=new String[2];
		      id[0]=moduleid;
		      map.put("id",id);
		      map.put("mode","module");
		      getContext().setParameters(map);  
			return SUCCESS;
		}
		
		public String getModuleid() {
			return moduleid;
		}

		public void setModuleid(String moduleid) {
			this.moduleid = moduleid;
		}

		public String getInstance() {
			if (application != null && application.trim().length() > 0) {
				return application;
			} else {
				return (String) getContext().getSession().get("APPLICATION");
			}
		}
		public ParamsTable getParams() {
			ParamsTable pm = null;
			if (_params.get() != null) {
				pm = (ParamsTable) _params.get();
			} else {
				synchronized (this) {
					pm = new ParamsTable();
					Map m = getContext().getParameters();
					Iterator iter = m.keySet().iterator();
					while (iter.hasNext()) {
						String name = (String) iter.next();
						Object obj = m.get(name);
						if (obj instanceof String[] && ((String[]) obj).length > 0) {
							String tmp[] = (String[]) obj;
							pm.setParameter(name, tmp[0]);
						} else {
							pm.setParameter(name, obj + "");
						}
					}
					// set the application param to ParamsTable
					pm.setParameter("application", getInstance());

					if (pm.getParameter("_pagelines") == null) {
						pm.setParameter("_pagelines", Web.DEFAULT_LINES_PER_PAGE);
					}
				}
			}

			return pm;
		}
		
		public WebUser getUser() throws Exception {
			Map session = getContext().getSession();
			WebUser user = null;
			if (session == null || session.get(Web.SESSION_ATTRIBUTE_USER) == null) {
				UserVO vo = new UserVO();
				vo.getId();
				vo.setName("GUEST");
				vo.setLoginno("guest");
				vo.setLoginpwd("");
				vo.setRoles(null);
				vo.setEmail("");
				vo.setLanguageType(1);
				user = new WebUser(vo);

			} else {
				user = (WebUser) session.get(Web.SESSION_ATTRIBUTE_USER);
			}
			return user;
		}
		
		public static ActionContext getContext() {
			ActionContext context = ActionContext.getContext();
			return context;
		}

		public String[] get_formact() {
			return _formact;
		}

		public void set_formact(String[] _formact) {
			this._formact = _formact;
		}

		public String getDisField() {
			return disField;
		}

		public void setDisField(String disField) {
			this.disField = disField;
		}

		public String getFlowlist() {
			return flowlist;
		}

		public void setFlowlist(String flowlist) {
			this.flowlist = flowlist;
		}

		public String getWorkflowname() {
			return workflowname;
		}

		public void setWorkflowname(String workflowname) {
			this.workflowname = workflowname;
		}
		public String[] get_viewact() {
			return _viewact;
		}

		public void set_viewact(String[] _viewact) {
			this._viewact = _viewact;
		}

		public String getDescription() {
			return description;
		}

		public void setDescription(String description) {
			this.description = description;
		}

		public String getOpentype() {
			return opentype;
		}

		public void setOpentype(String opentype) {
			this.opentype = opentype;
		}

		public String getSuperiorid() {
			return superiorid;
		}

		public void setSuperiorid(String superiorid) {
			this.superiorid = superiorid;
		}

		public String getViewname() {
			return viewname;
		}

		public void setViewname(String viewname) {
			this.viewname = viewname;
		}

		public static Map get_FORMACLIST() {
			return _FORMACLIST;
		}

		public static void set_FORMACLIST(Map _formaclist) {
			_FORMACLIST = _formaclist;
		}

		public static Map get_FORMTYPE() {
			return _FORMTYPE;
		}

		public static void set_FORMTYPE(Map _formtype) {
			_FORMTYPE = _formtype;
		}

		public static Map get_OPENTYPE() {
			return _OPENTYPE;
		}

		public static void set_OPENTYPE(Map _opentype) {
			_OPENTYPE = _opentype;
		}

		public static Map get_VIEWACLIST() {
			return _VIEWACLIST;
		}

		public static void set_VIEWACLIST(Map _viewaclist) {
			_VIEWACLIST = _viewaclist;
		}

		public static Map get_WORKFLOW() {
			return _WORKFLOW;
		}

		public static void set_WORKFLOW(Map _workflow) {
			_WORKFLOW = _workflow;
		}

		public String getName() {
			return name;
		}

		public void setName(String name) {
			this.name = name;
		}

		public int getType() {
			return type;
		}

		public void setType(int type) {
			this.type = type;
		}



		public String getApplication() {
			return application;
		}



		public void setApplication(String application) {
			this.application = application;
		}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -