Free cookie consent management tool by TermsFeed

Build with Plug-in Composer

On This Page
The capabilities described on this page are included in Appian's advanced and premium capability tiers. Usage limits may apply.

After you install Plug-in Composer and authenticate to your Appian site, you can generate new plug-in projects, reuse existing AppMarket plug-ins, enhance a project, ask questions about plug-ins, and fix issues from an error log. This page covers each of these tasks, how Plug-in Composer selects a mode, and the limitations to keep in mind.

How Plug-in Composer selects a mode

Plug-in Composer detects what you want to do from how your request opens and from the project folder that is open in IntelliJ IDEA. Leading with a clear keyword means Plug-in Composer does not have to guess:

  • Generate builds a new plug-in. Start your request with a phrase like "Generate a", "Build a", or "Create a new". Generate mode requires an empty project folder that does not contain an appian-plugin.xml file.
  • Modify changes an existing plug-in. Start your request with a phrase like "Add", "Update", "Change", "Remove", or "Refactor". Modify mode requires the folder that contains the plug-in's appian-plugin.xml file to be open.
  • Fix corrects an error and runs as a modification. Start your request with a phrase like "Fix this error:" and paste the full stack trace. Because Fix runs through Modify mode, the plug-in folder must be open.
  • Question answers a question about plug-in code. Start your request with a phrase like "What", "Which", "Why", or "Explain". Question mode works with or without a project open.

Because the presence of an appian-plugin.xml file sets the default mode, set up the folder to match your intent before you start.

Generate a plug-in from a prompt

Generate a plug-in by describing it in the Plug-in Composer tool window. Plug-in Composer sends the prompt to Appian's managed backend and writes the generated project to your local disk.

To generate a plug-in from a prompt:

  1. In IntelliJ IDEA, open a new, empty folder that does not contain an appian-plugin.xml file.
  2. Open the Plug-in Composer tool window.
  3. Enter a natural-language prompt that describes the plug-in you need. For example: Generate a plug-in that takes documents from Amazon S3, converts them to PDF, and saves them in Appian's Knowledge Base.
  4. Answer any clarifying questions Plug-in Composer asks to refine the requirements before generation.
  5. Review the plan Plug-in Composer creates, then generate the plug-in.
  6. Apply the result to your project. The generated files become available in your local file system.

Plug-in Composer generates secure configuration placeholders for any credentials the plug-in needs. Populate these placeholders locally after generation. Plug-in Composer does not store or persist the values you enter.

Naming the plug-in type is optional. If you name the type, Plug-in Composer locks it in. If you leave it out, Plug-in Composer asks you which type you need. These example prompts generate a new plug-in:

  • Generate a plug-in that merges PDF documents
  • Build a Smart Service plug-in that merges PDF documents
  • Create a new UI Component that renders a signature pad
  • Generate a Connected System plug-in for Google Drive with OAuth
  • Build a Servlet plug-in that serves log files over HTTP GET
  • Create a new Function plug-in that formats phone numbers

To get a more complete result, include a reverse-domain plug-in key such as com.acme.pdfmerge, and state the inputs and the output you expect.

Discover and reuse existing plug-ins

Before generating net-new code, Plug-in Composer evaluates your prompt against plug-ins indexed from the AppMarket and recommends existing plug-ins that match or partially fulfill your requirement. Reusing an existing plug-in prevents redundant development and supports standardization across implementations.

If reuse is constrained—for example, by security or architecture requirements—Plug-in Composer generates a new, complete plug-in instead.

Enhance an existing plug-in

Enhance an existing plug-in project by opening it in IntelliJ IDEA and describing the change you want. Plug-in Composer reads the existing project as context and generates the enhancement based on your follow-up prompt.

To enhance an existing plug-in:

  1. In IntelliJ IDEA, open the existing plug-in project you want to enhance. The folder must contain the plug-in's appian-plugin.xml file.
  2. In the Plug-in Composer tool window, describe the enhancement or modification you need. For example, request bulk processing or audit logging.
  3. For a substantial change, review the plan Plug-in Composer creates before it generates the change. Plug-in Composer applies small, mechanical edits directly.
  4. Review the generated changes in IntelliJ IDEA.

Name the file, function, or component you want changed. Substantial changes produce a plan you approve first. Small, mechanical edits are applied directly. These example prompts modify an existing plug-in:

  • Add a new input parameter locale to the formatPhone function
  • Add a retry count input to the MergePdf smart service and keep current behavior
  • Update the servlet to support HTTP POST in addition to GET
  • Change the component to accept a readOnly boolean parameter
  • Add a new operation listFolders to the Google Drive connected system
  • Refactor the upload method to use try-with-resources
  • Remove the unused imports from this class
  • Rename the class MergePdf to MergeDocuments

Ask questions about a plug-in

Ask Plug-in Composer about plug-in code to understand what a plug-in does, how a specific operation works, or which SDK or API to use for a task. Plug-in Composer answers inline in the tool window without changing your code.

To ask a question, enter it in the Plug-in Composer tool window as a full sentence. For example: Which annotations does a smart service plug-in class require? To search the AppMarket as part of your question, include a phrase like "existing plug-in", "in AppMarket", or "recommend".

Question mode works with or without a project open. To search the AppMarket as part of your question, include a phrase like "existing plug-in", "in AppMarket", or "recommend". These example prompts ask a question about a plug-in:

  • What return types are supported for a Function plug-in?
  • Which annotations does a Smart Service plug-in class require?
  • Explain how a Servlet plug-in maps its URL pattern in appian-plugin.xml
  • Why does a UI Component plug-in package as a ZIP instead of a JAR?
  • Does SimpleTestableConnectedSystemTemplate exist in the Connected System SDK?
  • Is there an existing plug-in for Google Drive in AppMarket?

Fix issues from an error log

Fix a plug-in issue by pasting an Appian error log into Plug-in Composer. Plug-in Composer analyzes the log against your current project and proposes a code fix. Fix requests run through Modify mode, so the plug-in folder must be open.

To fix an issue from an error log:

  1. In the Plug-in Composer tool window, start your request with a phrase like "Fix this error:" and paste the full Appian error log. Include the entire stack trace rather than only the first line, because the full trace is what lets Plug-in Composer identify the root cause.
  2. Review the proposed fix in IntelliJ IDEA's native diff viewer.
  3. Accept, reject, or adjust the proposed changes before applying them to your local files.

Open with a phrase like "Fix this error:" and paste the entire stack trace, not just the first line. Fix requests run through Modify mode, so the plug-in folder must be open. These example prompts fix an issue from an error log:

  • Fix this build error: cannot find symbol Value, followed by the full stack trace.
  • Fix this error: java.lang.NullPointerException at run(), followed by the full stack trace.
  • Fix this compilation error: package javax.servlet does not exist, followed by the full build output.
  • Fix this error: the component fails to load with approval verification failed, followed by the full log.
  • Fix this error: cannot resolve SimpleIntegrationTemplate, followed by the full stack trace.

Best practices for prompting Plug-in Composer

Follow these practices to get better results from Plug-in Composer:

  • Lead with a mode keyword. Start your request with a keyword so Plug-in Composer selects the right mode. For example, "How do I build a plug-in?" is a question, not a build request. To build a plug-in, start with "Generate a".
  • Answer clarifying questions. Plug-in Composer confirms details like plug-in type, operations, dependencies, and authentication. More complete answers produce better results.
  • Let Plug-in Composer check the AppMarket first. If a suitable plug-in already exists, reusing it is faster than rebuilding.
  • Ask questions as full sentences. While Plug-in Composer is asking you clarifying questions, a very short reply is treated as your answer to that question. Ask "Why is that parameter required?" rather than "Why?".

Plug-in Composer limitations

Plug-in Composer has the following limitations:

  • Sessions are not persisted: When you sign out of Plug-in Composer, all session data is cleared. When you sign back in, a new session starts and previous session data is not restored. Capture anything you need to keep before you sign out or reset.
  • One plug-in type per generation: Plug-in Composer generates one plug-in type at a time. Multi-type generation is not supported during the initial generation.
    • Appian Suite plug-ins: You can initially generate either a smart service or a function. To include both in the same plug-in, submit a modification request to add the additional type after generation. This applies only to Appian Suite plug-ins.
    • Connected system plug-ins: One connected system plug-in per generation.
    • Component plug-ins: One component plug-in per generation.
  • Project file limit: Plug-in Composer scans the files in a plug-in project when it processes a modification request for an existing plug-in. A system limit of 1,000 files per request can be included as context. If the plug-in project contains more than 1,000 files, the modification request may fail with a file-context limit error.
  • Pasted-log size limit: Plug-in Composer has a maximum size limit for pasted error logs. If a pasted log exceeds the limit, Plug-in Composer asks you to truncate the log to the most relevant stack trace.
  • No automatic AppMarket submission: Plug-in Composer does not submit generated plug-ins to the AppMarket. You must still review the plug-in code and submit it for approval.
  • No runtime validation or deployment: Plug-in Composer does not perform runtime validation, debug against a live Appian environment, or deploy plug-ins to Appian instances.
  • Plug-in projects only: Plug-in Composer generates only Appian plug-in projects. Plug-in Composer does not generate application designs, SAIL interfaces, or process models.

Caution:  

AI can make mistakes. Plug-in Composer uses generative AI to help you build plug-ins, and AI-generated output may contain errors or inaccuracies. Thoroughly test generated plug-ins before you use them in a production environment.

Feedback