This site has moved to the integrated Appfire documentation and information site for our apps.

From February 2024 this site is no longer updated.

Take a look here! If you have any questions please email support@appfire.com

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Overview

Follow the steps below to add the Comala Workflows API to your app.

(warning) You must be already familiar with developing Confluence apps to be able to use the Workflows API

1. Add the comalatech-public maven repository in your .m2/settings.xml:

<repository>
    <id>comalatech-public</id>
    <url>https://nexus.comalatech.com/content/groups/public/</url>
    <snapshots>
        <enabled>true</enabled>
    </snapshots>
    <releases>
        <enabled>true</enabled>
    </releases>
</repository>

2. Add a dependency to the Comala Workflows API in your pom.xml

(info) From Comala Document Management 5.1.0 onwards, there will always be a corresponding API library with the same version available.

The new Comala Workflows API library coordinates:

<dependency>
    <groupId>com.comalatech.workflow</groupId>
    <artifactId>workflows-api</artifactId>
    <version>[replace with Comala Workflows version of your choice]</version>
    <scope>provided</scope>
</dependency>

Previous API library, now deprecated (as of Comala Document Management version 5.1), dependency:

 Click here to expand...
<dependency>
    <groupId>com.comalatech.workflow</groupId>
    <artifactId>adhocapi</artifactId>
    <version>1.17.0</version>
    <scope>provided</scope>
</dependency>

3. Import the required components

In your atlassian-plugin.xml:

<component-import name="Comala Workflows Services" key="workflowService"
           interface="com.comalatech.workflow.WorkflowService"/>

<component-import name="Comala State Services" key="stateService"
           interface="com.comalatech.workflow.StateService"/>

<component-import name="Comala Tasks Services" key="taskService"
           interface="com.comalatech.workflow.TaskService"/>

<component-import name="Comala Approvals Services" key="approvalService"
           interface="com.comalatech.workflow.ApprovalService"/>

or if you are using atlassian spring scanner right inside your plugin component:

    @ComponentImport
    private WorkflowService workflowService;
    @ComponentImport
    private StateService stateService;
    @ComponentImport
    private TaskService taskService;
    @ComponentImport
    private ApprovalService approvalService;

The components will be injected in your plugin components.

4. Use it!

You can now use the API Services, or handle Workflow Events.

  • No labels