This page provides a follow-up to developer setup. This page details how to create a project, build it, and deploy it to your Appian site, all in about 30 minutes.
This section guides you through the process of creating a new IntelliJ project from our examples. You can refer back to this section whenever you are creating a new project from one of these examples.
Tip: Throughout the Quick Start, we change "Hello World" to "Hello Appian" to illustrate the idea of updating the project's artifact names. In your project, feel free to use any name. Just be sure to update all the same places we do!
Hello Appian
.Hello Appian
):
settings.gradle
file and change hello-world-csp
to hello-appian-csp
.
In this section, you will update the packages, classes, and annotations to make your project unique.
Start by opening the Project tool window (View > Tool Windows > Project). You will see two folders here: (1) Hello Appian
and (2) External Libraries
.
Navigate to src/main/java
in the Hello Appian [hello-appian-csp]
project.
Within that project you should see a directory created with the name com.mycorp.helloworld.templates
. Modify the following items:
In the Project tool window, navigate to src/main/java
. You will see there is a package called com.mycorp.helloworld.templates
.
com.mycorp.helloworld.templates
, then click refactor > rename, and change mycorp.helloworld
to example.helloappian
.Click Refactor.
mycorp.helloworld
becomes empty in the project directory; delete the helloworld
directory.Navigate to the com.example.helloappian.templates
in the Project
tool window. You will see two java classes: HelloWorldConnectedSystemTemplate
and HelloWorldIntegrationTemplate
.
HelloAppianCSP
and click RefactorHelloAppianIntegrationTemplate
@TemplateId
annotation:
name
of the @TemplateId
annotation.
HelloAppianCSP
, change @TemplateId(name="HelloWorldConnectedSystemTemplate")
annotation to @TemplateId(name="HelloAppianCSP")
HelloAppianIntegrationTemplate
, change @TemplateId(name="HelloWorldIntegrationTemplate")
annotation to @TemplateId(name="HelloAppianIntegrationTemplate")
Note: TemplateId
is the identifier for your template and all its versions. To ensure your ID does not unintentionally conflict with other templates, we recommend using package-structure-style naming, for example com.mycorp.template.
@IntegrationTemplateType
annotation is correct.Integration template type indicates the request policy of your Integration Template. There are three types: READ, WRITE, and READ_AND_WRITE. READ indicates that the template retrieves data from an external service, WRITE indicates that the template modifies data on an external service such as HTTP POST or HTTP DELETE. If the template can modify or query data depending on the designer's intent, then annotate the template with READ_AND_WRITE. If a template is READ_AND_WRITE, the designer can indicate which type of operation they intend to perform.
Since we are not modifying the request type of the HelloWorld template, we will leave the template type as is.
After modifying the configuration of your classes, the class structure should match the following code.
1
2
@TemplateId(name="HelloAppianCSP")
public class HelloAppianCSP extends SimpleConnectedSystemTemplate {...
1
2
3
@TemplateId(name="HelloAppianIntegrationTemplate")
@IntegrationTemplateType(IntegrationTemplateRequestPolicy.READ)
public class HelloAppianIntegrationTemplate extends SimpleIntegrationTemplate {...
src.main.resources.appian-plugin.xml
in the Project tool window.appian-plugin
's name
from My Corp Connected System - Hello World
to My Corp Connected System - Hello Appian
, and the appian-plugin
's key
from hello-world
to hello-appian
.plugin-info
, change the description
to fit your template's description.vendor
to your organization's name and url.version
as 1.0.0.0.
connected-system-template
, change the key and name to HelloAppianConnectedSystem.
integration-template
, change the key and name to HelloAppianIntegrationTemplate.
This information should now look like the code below:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
<appian-plugin name="My Corp - Hello Appian" key="hello-appian">
<plugin-info>
<description>My Corp Connected System - Hello Appian</description>
<vendor name="Example Corp" url="http://www.example.com"/>
<version>1.0.0.0</version>
<application-version min="7.6.0.4"/>
</plugin-info>
<connected-system-template key="HelloAppianConnectedSystem"
name="HelloAppianConnectedSystem"
class="com.example.helloappian.templates.HelloAppianCSP">
<integration-template key="HelloAppianIntegrationTemplate"
name="HelloAppianIntegrationTemplate"
class="com.example.helloappian.templates.HelloAppianIntegrationTemplate" />
</connected-system-template>
</appian-plugin>
src/main/resources_en_US.properties.
HelloWorldConnectedSystemTemplate.name
to HelloAppianCSP.name
.This resource file should look like the code below:
1
2
3
4
5
## Must have [class].name and [class].description for all connected system and integration templates
HelloAppianCSP.name=Hello Appian Connected System
HelloAppianCSP.description=Sample CS for learning how to use plug-in repo CSPs!
HelloAppianIntegrationTemplate.name=Hello Appian Integration
HelloAppianIntegrationTemplate.description=Sample CS for learning how to use plug-in repo CSPs!
Now that all of the configurations meet your template's requirements, the Connected System Template and Integration Template can be modified to contain the internal logic needed for your integration.
Now that you're done updating your template code and artifacts, you're ready to build and deploy the jar.
To create the jar from the command line:
./gradlew jar
.To create the jar from IntelliJ:
Expand Tasks > Build. You should see gradle job structure like this:
If everything is set up correctly, you will see a successful message in the console like this:
You should see your JAR file created under /build/libs.
Then, add the jar file to the <APPIAN_HOME>/_admin/plugins
folder to deploy it.
<Appian.instance>/design
.<Appian.instance>/admin.
On Tomcat, go to <APPIAN_HOME>/logs
. Then run:
1
tail -f tomcat-stdOut.log.<date>
You're looking for the following messages:
Connected System Template
1
[Appian Plugin Hot Deploy] INFO com.appiancorp.connectedsystems.templateframework.osgi.ConnectedSystemTemplateModuleParser - Extracted com.appiancorp.connectedsystems.templateframework.sdk.ConnectedSystemTemplate classes for registration for the 'HelloAppianConnectedSystem' module in 0ms
Integration Template
1
[Appian Plugin Hot Deploy] INFO com.appiancorp.connectedsystems.templateframework.osgi.ConnectedSystemTemplateModuleParser - Extracted com.appiancorp.connectedsystems.templateframework.sdk.IntegrationTemplate classes for registration for the 'HelloAppianConnectedSystem' module in 0ms
Plug-in successfully installed
1
[Appian Plugin Hot Deploy] INFO com.appiancorp.plugins.osgi.AppianOsgiPlugin - Successfully installed Plug-in 'My Corp Connected System - Hello Appian (hello-appian) version 1.0.0.0.
Congratulations! Your plug-in should now be deployed. Follow the steps below to test it out.
Hello
in the Text Property field.Appian
in the Text Property field.Your two text properties should be concatenated and Hello Appian
should display in the Results pane.
Now you're ready develop your own Connected System Plug-in. You can start by reading through the Core Concepts section to learn important concepts about the SDK, or you can jump straight to the Examples, and go back to the over when you want to get a deeper understanding of what's going on.
At any point, if you need help doing something in particular, check the How To section.
Develop Your First Connected System