org.jbpm.workflow.core.impl.WorkflowProcessImpl.getImports()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(5.4k)|赞(0)|评价(0)|浏览(98)

本文整理了Java中org.jbpm.workflow.core.impl.WorkflowProcessImpl.getImports()方法的一些代码示例,展示了WorkflowProcessImpl.getImports()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WorkflowProcessImpl.getImports()方法的具体详情如下:
包路径:org.jbpm.workflow.core.impl.WorkflowProcessImpl
类名称:WorkflowProcessImpl
方法名:getImports

WorkflowProcessImpl.getImports介绍

暂无

代码示例

代码示例来源:origin: kiegroup/jbpm

  1. public Object start(final String uri,
  2. final String localName,
  3. final Attributes attrs,
  4. final ExtensibleXmlParser parser) throws SAXException {
  5. parser.startElementBuilder( localName,
  6. attrs );
  7. WorkflowProcessImpl process = ( WorkflowProcessImpl ) parser.getParent();
  8. final String name = attrs.getValue( "name" );
  9. emptyAttributeCheck( localName, "name", name, parser );
  10. java.util.Set<String> list = process.getImports();
  11. if ( list == null ) {
  12. list = new HashSet<String>();
  13. process.setImports( list );
  14. }
  15. list.add( name );
  16. return null;
  17. }

代码示例来源:origin: kiegroup/jbpm

  1. private String generateRules(final Process process) {
  2. StringBuffer builder = new StringBuffer();
  3. if ( process instanceof WorkflowProcessImpl ) {
  4. WorkflowProcessImpl ruleFlow = (WorkflowProcessImpl) process;
  5. builder.append( "package " + ruleFlow.getPackageName() + "\n" );
  6. Set<String> imports = ruleFlow.getImports();
  7. if ( imports != null ) {
  8. for ( String importString: imports ) {
  9. builder.append( "import " + importString + ";\n" );
  10. }
  11. }
  12. List<String> functionImports = ruleFlow.getFunctionImports();
  13. if ( functionImports != null ) {
  14. for ( String importString: functionImports ) {
  15. builder.append( "import function " + importString + ";\n" );
  16. }
  17. }
  18. Map<String, String> globals = ruleFlow.getGlobals();
  19. if ( globals != null ) {
  20. for ( Map.Entry<String, String> entry: globals.entrySet()) {
  21. builder.append( "global " + entry.getValue() + " " + entry.getKey() + ";\n" );
  22. }
  23. }
  24. Node[] nodes = ruleFlow.getNodes();
  25. generateRules(nodes, process, builder);
  26. }
  27. return builder.toString();
  28. }

代码示例来源:origin: kiegroup/jbpm

  1. public Object start(final String uri, final String localName,
  2. final Attributes attrs, final ExtensibleXmlParser parser)
  3. throws SAXException {
  4. parser.startElementBuilder(localName, attrs);
  5. WorkflowProcessImpl process = (WorkflowProcessImpl) parser.getParent();
  6. final String name = attrs.getValue("name");
  7. final String type = attrs.getValue("importType");
  8. final String location = attrs.getValue("location");
  9. final String namespace = attrs.getValue("namespace");
  10. emptyAttributeCheck(localName, "name", name, parser);
  11. if (type != null && location != null && namespace != null) {
  12. Map<String, String> typedImports = (Map<String, String>) process.getMetaData(type);
  13. if (typedImports == null) {
  14. typedImports = new HashMap<String, String>();
  15. process.setMetaData(type, typedImports);
  16. }
  17. typedImports.put(namespace, location);
  18. } else {
  19. java.util.Set<String> list = process.getImports();
  20. if (list == null) {
  21. list = new HashSet<String>();
  22. process.setImports(list);
  23. }
  24. list.add(name);
  25. }
  26. return null;
  27. }

代码示例来源:origin: org.jbpm/jbpm-flow-builder

  1. public Object start(final String uri,
  2. final String localName,
  3. final Attributes attrs,
  4. final ExtensibleXmlParser parser) throws SAXException {
  5. parser.startElementBuilder( localName,
  6. attrs );
  7. WorkflowProcessImpl process = ( WorkflowProcessImpl ) parser.getParent();
  8. final String name = attrs.getValue( "name" );
  9. emptyAttributeCheck( localName, "name", name, parser );
  10. java.util.Set<String> list = process.getImports();
  11. if ( list == null ) {
  12. list = new HashSet<String>();
  13. process.setImports( list );
  14. }
  15. list.add( name );
  16. return null;
  17. }

代码示例来源:origin: org.jbpm/jbpm-flow-builder

  1. private String generateRules(final Process process) {
  2. StringBuffer builder = new StringBuffer();
  3. if ( process instanceof WorkflowProcessImpl ) {
  4. WorkflowProcessImpl ruleFlow = (WorkflowProcessImpl) process;
  5. builder.append( "package " + ruleFlow.getPackageName() + "\n" );
  6. Set<String> imports = ruleFlow.getImports();
  7. if ( imports != null ) {
  8. for ( String importString: imports ) {
  9. builder.append( "import " + importString + ";\n" );
  10. }
  11. }
  12. List<String> functionImports = ruleFlow.getFunctionImports();
  13. if ( functionImports != null ) {
  14. for ( String importString: functionImports ) {
  15. builder.append( "import function " + importString + ";\n" );
  16. }
  17. }
  18. Map<String, String> globals = ruleFlow.getGlobals();
  19. if ( globals != null ) {
  20. for ( Map.Entry<String, String> entry: globals.entrySet()) {
  21. builder.append( "global " + entry.getValue() + " " + entry.getKey() + ";\n" );
  22. }
  23. }
  24. Node[] nodes = ruleFlow.getNodes();
  25. generateRules(nodes, process, builder);
  26. }
  27. return builder.toString();
  28. }

代码示例来源:origin: org.jbpm/jbpm-bpmn2

  1. public Object start(final String uri, final String localName,
  2. final Attributes attrs, final ExtensibleXmlParser parser)
  3. throws SAXException {
  4. parser.startElementBuilder(localName, attrs);
  5. WorkflowProcessImpl process = (WorkflowProcessImpl) parser.getParent();
  6. final String name = attrs.getValue("name");
  7. final String type = attrs.getValue("importType");
  8. final String location = attrs.getValue("location");
  9. final String namespace = attrs.getValue("namespace");
  10. emptyAttributeCheck(localName, "name", name, parser);
  11. if (type != null && location != null && namespace != null) {
  12. Map<String, String> typedImports = (Map<String, String>) process.getMetaData(type);
  13. if (typedImports == null) {
  14. typedImports = new HashMap<String, String>();
  15. process.setMetaData(type, typedImports);
  16. }
  17. typedImports.put(namespace, location);
  18. } else {
  19. java.util.Set<String> list = process.getImports();
  20. if (list == null) {
  21. list = new HashSet<String>();
  22. process.setImports(list);
  23. }
  24. list.add(name);
  25. }
  26. return null;
  27. }

相关文章