public void testGetTableName() { boolean pigeOnHole = StringUtil.getBoolean(processEngineConfiguration.getPigeonholeConfig().getIsEnable()); String tableName = QueryTableUtil.getTableSelect("fixflow_run_processinstance", QueryLocation.RUN); assertEquals("FIXFLOW_RUN_PROCESSINSTANCE", tableName); if (pigeOnHole) { String hisTableName = QueryTableUtil.getTableSelect("fixflow_run_processinstance", QueryLocation.HIS); assertEquals("FIXFLOW_HIS_PROCESSINSTANCE", hisTableName); String runHisTableName = QueryTableUtil.getTableSelect("fixflow_run_processinstance", QueryLocation.RUN_HIS); assertNotNull(runHisTableName); } else { String hisTableName = QueryTableUtil.getTableSelect("fixflow_run_processinstance", QueryLocation.HIS); assertEquals("FIXFLOW_RUN_PROCESSINSTANCE", hisTableName); String runHisTableName = QueryTableUtil.getTableSelect("fixflow_run_processinstance", QueryLocation.RUN_HIS); assertEquals("FIXFLOW_RUN_PROCESSINSTANCE", runHisTableName); } try { tableName = QueryTableUtil.getTableSelect("fixflow_run_processinstance11", QueryLocation.RUN); fail(); } catch (Exception ex) { if (ex instanceof FixFlowException) { return; } } fail(); }
public String createComponent(SvgBaseTo svgTo) { String result = null; try { SvgMessageTo stevent = (SvgMessageTo) svgTo; InputStream in = SvgBench.class.getResourceAsStream(comPath); Document doc = XmlUtil.read(in); String str = doc.getRootElement().asXML(); str = FlowSvgUtil.replaceAll(str, local_x, StringUtil.getString(stevent.getX())); str = FlowSvgUtil.replaceAll(str, local_y, StringUtil.getString(stevent.getY())); str = FlowSvgUtil.replaceAll(str, id, stevent.getId()); str = FlowSvgUtil.replaceAll(str, text, stevent.getLabel()); result = str; } catch (DocumentException e) { throw new FixFlowException("", e); } return result; }
/** * 获取组的名称 * * @return */ public String getGroupName() { try { boolean booleanTemp = StringUtil.getBoolean( ProcessEngineManagement.getDefaultProcessEngine() .getProcessEngineConfiguration() .getInternationalizationConfig() .getIsEnable()); // 用户名称国际化处理 if (booleanTemp) { FixFlowResources fixFlowResources = ProcessEngineManagement.getDefaultProcessEngine() .getProcessEngineConfiguration() .getFixFlowResources(); String nameTemp = fixFlowResources.getResourceName( FixFlowResources.OrganizationResource, "FixFlow_" + groupType + "_Name_Key"); if (nameTemp == null || nameTemp.equals("")) { return groupName; } else { Object otherName = this.getPropertyValue(nameTemp); if (otherName == null || otherName.equals("")) { return groupName; } else { return StringUtil.getString(otherName); } } } else { return groupName; } } catch (Exception e) { return groupName; } }
/** * * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated */ public String getName() { Boolean booleanTemp = StringUtil.getBoolean( ProcessEngineManagement.getDefaultProcessEngine() .getProcessEngineConfiguration() .getInternationalizationConfig() .getIsEnable()); if (booleanTemp) { DefinitionsBehavior definitionsBehavior = (DefinitionsBehavior) this.eResource().getContents().get(0).eContents().get(0); String processId = definitionsBehavior.getProcessId(); String nameTemp = ResourcesUtil.getResourcesValue(processId, id); if (nameTemp == null) { return name; } return nameTemp; } else { return name; } }
public int getLevelNum() { return StringUtil.getInt(getPropertyValue("LEVELNUM")); }