Package pl.net.bluesoft.rnd.processtool.model

Examples of pl.net.bluesoft.rnd.processtool.model.ProcessInstanceAttribute


        Matcher matcher = PROCESS_ATTRIBUTE_PATTERN.matcher(message);
        int pos = 0;
        while (matcher.find()) {
            String processAttributeKey = matcher.group(1);

            ProcessInstanceAttribute attribute = processInstance.findAttributeByKey(processAttributeKey);
            if (attribute != null) {
                int start = matcher.start(0);
                if (pos < start) {
                    builder.append(message.substring(pos, start));
                }

                builder.append(attribute.toString());
                pos = matcher.end(0);
            }
        }

        if (pos < message.length()) {
View Full Code Here


public class JasperReportingUtil {

    private static final Logger logger = Logger.getLogger(JasperReportingUtil.class.getName());
   
  public static Object attributeByKeyPath(ProcessInstance pi, String key, String path) {
    ProcessInstanceAttribute attributeByKey = findAttributeByKey(pi, key);
    return expandPath(path, attributeByKey);
  }
View Full Code Here

  public static Object attributeByKeyPath(ProcessInstance pi, String key, String path) {
    ProcessInstanceAttribute attributeByKey = findAttributeByKey(pi, key);
    return expandPath(path, attributeByKey);
  }
  public static Object attributeByClassPath(ProcessInstance pi, String name, String path) {
    ProcessInstanceAttribute attributeByKey = findAttributeByClassName(pi, name);
    return expandPath(path, attributeByKey);
  }
View Full Code Here

    }
  }

  private void initLocale(ProcessInstance processInstance) {
    if (hasText(localeAttributeKey)) {
      ProcessInstanceAttribute attr = processInstance.findAttributeByKey(localeAttributeKey);
      if (attr != null && attr instanceof ProcessInstanceSimpleAttribute) {
        locale = getLocaleFromString(((ProcessInstanceSimpleAttribute)attr).getValue());
      }
    }
  }
View Full Code Here

                    }
                    Object payload = muleMessage.getPayload();
                    if (payload instanceof String) {
                        return (String)payload;
                    } else if (payload instanceof ProcessInstanceAttribute) {
                        ProcessInstanceAttribute pia = (ProcessInstanceAttribute) payload;
                        ProcessInstanceAttribute attributeByKey = processInstance.findAttributeByKey(pia.getKey());
                        if (attributeByKey != null) {
                            processInstance.removeAttribute(attributeByKey);
                        }
                        processInstance.addAttribute(pia);
                        return pia.toString();
                    } else if (payload instanceof ProcessInstanceAttribute[]) {
                        ProcessInstanceAttribute[] pias = (ProcessInstanceAttribute[]) payload;
                        for (ProcessInstanceAttribute pia : pias) {
                            ProcessInstanceAttribute attributeByKey = processInstance.findAttributeByKey(pia.getKey());
                            if (attributeByKey != null) {
                                processInstance.removeAttribute(attributeByKey);
                            }
                            processInstance.addAttribute(pia);
                        }
                    } else if (payload instanceof Iterable) {
                        Iterable pias = (Iterable) payload;
                        for (Object o : pias) {
                            if (o instanceof ProcessInstanceAttribute) {
                                ProcessInstanceAttribute pia = (ProcessInstanceAttribute) o;
                                ProcessInstanceAttribute attributeByKey = processInstance.findAttributeByKey(pia.getKey());
                                if (attributeByKey != null) {
                                    processInstance.removeAttribute(attributeByKey);
                                }
                                processInstance.addAttribute(pia);
                            }
View Full Code Here

 
    @Override
    protected void showValidationErrorsOrSave(final WidgetContextSupport support, final Map<ProcessToolDataWidget, Collection<String>> validationErrors) {
    if(url.matches("#\\{.*\\}")){
          String urlKey = url.replaceAll("#\\{(.*)\\}", "$1");
          ProcessInstanceAttribute attr = task.getProcessInstance().findAttributeByKey(urlKey);
          if(attr != null)
            url = ((ProcessInstanceSimpleAttribute)attr).getValue();
        }
        getApplication().getMainWindow().open(new ExternalResource(url), "_new");
    }
View Full Code Here

TOP

Related Classes of pl.net.bluesoft.rnd.processtool.model.ProcessInstanceAttribute

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.