Interface ProcessPluginDefinition


public interface ProcessPluginDefinition
A provider configuration file named "dev.dsf.ProcessPluginDefinition" containing the canonical name of the class implementing this interface needs to be part of the process plugin at "/META-INF/services/". For more details on the content of the provider configuration file, see ServiceLoader.
  • Field Details

  • Method Details

    • getName

      String getName()
      Returns:
      process plugin name, same as jar name excluding suffix -<version>.jar
    • getVersion

      String getVersion()
      Returns:
      version of the process plugin, must match "(?<pluginVersion>(?<resourceVersion>\\d+\\.\\d+)\\.\\d+\\.\\d+)"
    • getResourceVersion

      default String getResourceVersion()
      Placeholder #{version} in FHIR and BPMN files will be replaced with the returned value.
      Returns:
      version of FHIR and BPMN resources, must match "(?<resourceVersion>\\d+\\.\\d+)"
    • getReleaseDate

      LocalDate getReleaseDate()
      Returns:
      the release date of the process plugin
    • getResourceReleaseDate

      default LocalDate getResourceReleaseDate()
      Placeholder #{date} in FHIR and BPMN files will be replaced with the returned value.
      Returns:
      the release date of FHIR resources and BPMN files
    • getProcessModels

      List<String> getProcessModels()
      Return List.of("foo.bpmn"); for a foo.bpmn file located in the root folder of the process plugin jar. The returned files will be read via ClassLoader.getResourceAsStream(String).

      Occurrences of #{version} will be replaced with the value of getResourceVersion()
      Occurrences of
      #{date} will be replaced with the value of getResourceReleaseDate()
      Occurrences of
      #{organization} will be replaced with the local organization DSF identifier value, or "null" if no local organization can be found in the allow list
      Other placeholders of the form
      #{property.name} will be replaced with values from equivalent environment variable, e.g. PROPERTY_NAME

      Returns:
      *.bpmn files inside the process plugin jar, paths relative to root folder of process plugin
      See Also:
    • getFhirResourcesByProcessId

      Map<String,List<String>> getFhirResourcesByProcessId()
      Return Map.of("testcom_process", List.of("foo.xml")); for a foo.xml file located in the root folder of the process plugin jar needed for a process called testcom_process. The returned files will be read via ClassLoader.getResourceAsStream(String).

      Supported metadata resource types are ActivityDefinition, CodeSystem, Library, Measure, NamingSystem, Questionnaire, StructureDefinition, Task and ValueSet.

      Occurrences of #{version} will be replaced with the value of getResourceVersion()
      Occurrences of
      #{date} will be replaced with the value of getResourceReleaseDate()
      Occurrences of
      #{organization} will be replaced with the local organization DSF identifier value, or "null" if no local organization can be found in the allow list
      Other placeholders of the form
      #{property.name} will be replaced with values from equivalent environment variable, e.g. PROPERTY_NAME

      Returns:
      *.xml or *.json files inside the process plugin jar per process, paths relative to root folder of process plugin
      See Also:
    • getSpringConfigurations

      List<Class<?>> getSpringConfigurations()
      List of Configuration annotated spring configuration classes.

      All services defined in ProcessPluginApi and ProcessPluginApi itself can be Autowired in Configuration classes.

      All implementations used for BPMN service tasks, message send tasks and throw events as well as task- and user task listeners need to be declared as spring Beans with Scope "prototype". Other classes not directly used within BPMN activities should be declared with the default singleton scope.

      Configuration classes that defined private fields annotated with Value defining property placeholders, can be configured via environment variables. A field private boolean specialFunction; annotated with @Value("${org.test.process.special:false}") can be configured with the environment variable ORG_TEST_PROCESS_SPECIAL. To take advantage of the "dsf-tools-documentation-generator" maven plugin to generate a markdown file with configuration options for the plugin also add the ProcessDocumentation annotation.

      Returns:
      Configuration annotated classes, defining Bean annotated factory methods
      See Also: