Skip to main content

Creating Your Own Plugins

This section explains how to create custom plugins that extend actor-IaC functionality.

Plugin Types

actor-IaC supports different types of plugins depending on the use case.

TypePurposeImplementation
General PluginAny functionality callable from workflowsPOJO + IIAR
SectionBuilderReport sections for ReportBuilderSectionBuilder implementation + IIAR

Documentation Structure

1. Principles

Basic principles common to all plugins:

  • POJO + IIAR architecture
  • pom.xml configuration
  • Build and deployment

2. General Plugin

Implement arbitrary functionality callable from workflows:

  • Data aggregation using DB connections
  • External API integration
  • Custom processing

3. SectionBuilder Plugin

Implement report sections for ReportBuilder:

  • SectionBuilder interface
  • generate(), getTitle()
  • Registration with ReportBuilder

Common Prerequisites

Loading and Creating with Actor Names

Plugins are loaded and created through the loader actor.

# Load JAR
- actor: loader
method: loadJar
arguments: ["plugins/my-plugin-1.0.0.jar"]

# Create actor
- actor: loader
method: createChild
arguments: ["parentActorName", "actorName", "fully.qualified.ClassName"]

Available System Resources

Major resources available from plugins:

ResourceHow to ObtainPurpose
DB ConnectionDistributedLogStore.getInstance().getConnection()Log DB queries
Session IDnodeGroup.callByActionName("getSessionId", "")Current workflow session
Actor SystemConstructor argumentAccess to other actors

Reference Implementations

Standard implementations included in actor-IaC serve as references for plugin development:

PackageContents
com.scivicslab.actoriac.report.sections.basicStandard SectionBuilders
com.scivicslab.actoriac.reportReportBuilder itself