public abstract class SimpleIntegrationTemplate extends ConfigurableTemplate implements IntegrationTemplate
Each new type of integration should represent a single operation in the external system. Create a new IntegrationTemplate for each operation.
Every SimpleIntegrationTemplate must be associated with exactly one SimpleConnectedSystemTemplate
Each implementation of this class must have the TemplateId
annotation to be successfully deployed
Use the IntegrationTemplateType
annotation to express whether this integration modifies or queries data
getConfiguration(SimpleConfiguration, SimpleConfiguration, PropertyPath, ExecutionContext)
determines the UI that designers use to configure the integration for execution.
execute(SimpleConfiguration, SimpleConfiguration, ExecutionContext)
uses the integration and connected system's configurations to make a call to an external system.
SimpleIntegrationTemplates are re-instantiated per request. Therefore, each call to execute(SimpleConfiguration, SimpleConfiguration, ExecutionContext)
or getConfiguration(SimpleConfiguration, SimpleConfiguration, PropertyPath, ExecutionContext)
is on a new instance of the class.
typePropertyFactory
Constructor and Description |
---|
SimpleIntegrationTemplate() |
Modifier and Type | Method and Description |
---|---|
IntegrationResponse |
execute(ConfigurationDescriptor integrationConfigDescriptor,
ConfigurationDescriptor connectedSystemConfigDescriptor,
ExecutionContext executionContext) |
protected abstract IntegrationResponse |
execute(SimpleConfiguration integrationConfiguration,
SimpleConfiguration connectedSystemConfiguration,
ExecutionContext executionContext)
Completes the operation in the external system and returns the result to the designer
This method is called when a designer hits the test-request button in the Integration Designer, or when an integration
is executed from a process, a SAIL form, or a Web API.
|
protected abstract SimpleConfiguration |
getConfiguration(SimpleConfiguration integrationConfiguration,
SimpleConfiguration connectedSystemConfiguration,
PropertyPath updatedProperty,
ExecutionContext executionContext)
Returns a configuration that defines the UI and values of an Appian integration object.
|
ConfigurationDescriptor |
getConfigurationDescriptor(ConfigurationDescriptor integrationConfigDescriptor,
ConfigurationDescriptor connectedSystemConfigDescriptor,
PropertyPath updatedProperty,
ExecutionContext executionContext) |
PropertyDescriptorBuilder |
localTypeProperty(LocalTypeDescriptor localType) |
PropertyDescriptorBuilder |
localTypeProperty(LocalTypeDescriptor localType,
String key) |
booleanProperty, deroot, documentProperty, doubleProperty, dropdownProperty, encryptedTextProperty, folderProperty, integerProperty, listTypeProperty, localType, textProperty
protected abstract SimpleConfiguration getConfiguration(SimpleConfiguration integrationConfiguration, SimpleConfiguration connectedSystemConfiguration, PropertyPath updatedProperty, ExecutionContext executionContext)
integrationConfiguration
.
Every call to this method must call SimpleConfiguration.setProperties(PropertyDescriptor[])
Example: Text field for entering customer ID and toggle for retrieving additional information
return configuration.setProperties( textProperty("customerID").label("Customer ID").build(), booleanProperty("additionalInfo").label("Get Additional Info").build() );
This method is called in the following scenarios:
property
that has a refresh policy
of ALWAYS
.integrationConfiguration
- The current configuration
This will never be null
connectedSystemConfiguration
- The configuration of the designer-selected Appian connected system object associated
with the Appian Integration object.
This will never be null
updatedProperty
- Field that has been modified by the designer.
For a field to trigger the getConfiguration(SimpleConfiguration, SimpleConfiguration, PropertyPath, ExecutionContext)
method,
its RefreshPolicy must be set to RefreshPolicy.ALWAYS
.
Use this path to find the new, designer-updated value in the integrationConfiguration.
This parameter will be null
when a new Appian Integration object is created,
when a saved Appian Integration object is reloaded in the designer, and when a new Appian connected system is selected.executionContext
- Contains all of the contextual information needed to configure the Appian Integration object,
including Designer information, Designer locale, and proxy configuration. ExecutionContext
SimpleConfiguration
integrationConfigurationprotected abstract IntegrationResponse execute(SimpleConfiguration integrationConfiguration, SimpleConfiguration connectedSystemConfiguration, ExecutionContext executionContext)
This method is called when a designer hits the test-request button in the Integration Designer, or when an integration is executed from a process, a SAIL form, or a Web API.
Use the SimpleConfiguration.getValue(String)
method to retrieve values from the integration and connected system.
These values can then be sent to the external system.
integrationConfiguration
- The configuration of the integration.
This will never be null
connectedSystemConfiguration
- The configuration of the connected system associated with the integration.
This will never be null
executionContext
- Contains all of the contextual information needed to execute the integration and configure diagnostics,
including Designer information, Designer locale, and proxy configuration. ExecutionContext
public ConfigurationDescriptor getConfigurationDescriptor(ConfigurationDescriptor integrationConfigDescriptor, ConfigurationDescriptor connectedSystemConfigDescriptor, PropertyPath updatedProperty, ExecutionContext executionContext)
getConfigurationDescriptor
in interface IntegrationTemplate
public IntegrationResponse execute(ConfigurationDescriptor integrationConfigDescriptor, ConfigurationDescriptor connectedSystemConfigDescriptor, ExecutionContext executionContext)
execute
in interface IntegrationTemplate
public PropertyDescriptorBuilder localTypeProperty(LocalTypeDescriptor localType)
localTypeProperty
in class ConfigurableTemplate
localType
- Data structure composed of propertiespublic PropertyDescriptorBuilder localTypeProperty(LocalTypeDescriptor localType, String key)
localTypeProperty
in class ConfigurableTemplate
localType
- Data structure composed of propertieskey
- Unique identifier to get and set the value of the property in SimpleConfiguration
Copyright © 2018-present Appian Corporation. All Rights Reserved.