public MicroflowService(
      String microflowname,
      String roleOrMicroflow,
      HttpMethod httpMethod,
      String pathTemplateString,
      String description)
      throws CoreException {
    checkNotNull(microflowname);
    checkNotNull(roleOrMicroflow);
    checkNotNull(httpMethod);

    this.microflowname = microflowname;
    this.roleOrMicroflow = roleOrMicroflow;
    this.description = description;
    this.httpMethod = httpMethod;

    if (pathTemplateString != null)
      this.relativeUrl = Utils.removeLeadingAndTrailingSlash(pathTemplateString);
    else this.relativeUrl = microflowname.split("\\.")[1].toLowerCase();

    this.consistencyCheck();

    register();
  }