Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Corrected links that should have been relative instead of absolute.

...

...

...

...

You can create a custom plugin using the following three options:

  • Script
  • Custom APIs
  • Spring Bean

To create a custom plugin activity:

...

Click Configure > EXTENSIONS > Custom Plugin.

...

Data Security enables you to define the action, which can be either Encryption or Decryption that you want to apply to your Adeptia Connect services. This service uses the keys created by using the Key Manager.

Steps to create Data Security: 

  1. Click Configure > SECURITY > Data Security.

  2. Click Create Data Security.

  3. Provide the name and description of the new

...

String getname =service.getValueByName("username");
System.out.println("USERNAME" + getname);

 

...

Expand
titleScript

In this option, you need to define the Java code which is parsed and executed during the process flow execution.

The following list gives you a clear idea about the pros and cons associated with this approach.

Pros:

  • Dynamic execution of the full Java syntax, Java code fragments, as well as loosely typed Java and additional scripting conveniences.
  • Easy and rapid prototyping of the business logic.
  • No restart of Adeptia services is required after you make any update to the script.

Cons:

  • Under heavy load, when multiple instances of the custom plugin script are running concurrently, the performance is degraded.

...

titleCustom API

Using this option enhances the performance of the process flow execution. In this option, you need to select the class and its method for the execution of the process flow. The process flow will be executed on the basis of the code implemented in the selected method.

Info
The Custom API approach uses the traditional Java Reflection technique to load the class dynamically, instantiate it, and invoke the specified method. This technique has a performance impact under heavy load and therefore has been marked as deprecated. This option is available in the custom plugin activity for backward compatibility purpose only.

To create a custom plugin using custom APIs, first create a class with method(s) and put that in the .../<AdeptiaInstallFolder>/ServerKernel/customClasses/<ClassPackage> folder where <ClassPackage> is the package where you have defined the Java class. For example, if you have defined the Java class in the org.custom package then first create the org/custom folder in the .../<AdeptiaInstallFolder>/ServerKernel/customClasses folder and put the class in the custom folder. Ensure that the following conditions are fulfilled:

The class must implement PluginExecutor interface.

Code Block
public class <class_name> implements PluginExecutor

The method should accept only one parameter and that must have an object of ExecutionEvent.

Code Block
public boolean <method_name>(ExecutionEvent event) throws Exception

...

The following list gives you a clear idea about the pros and cons associated with this approach.

Pros:

  • Works better than the script approach under high load. However, Adeptia recommends to use spring bean approach as it is more optimized and works better than a custom plugin.

Cons:

  • Every time you need to either develop a new or update the existing Java bean class.
  • You must restart Adeptia services to bring the changes into effect.
  • It is slower in execution than Spring Bean approach.

...

titleSpring Bean

In this option, you need to define the spring bean file and place that in customClasses\custom\beans folder. This option improves the execution of custom plugin under heavy load of concurrent execution of process flows.

To use Spring Bean in Custom Plugin, you first need to create a Custom Class file and place it customClasses\custom\beans folder.

Follow the steps below to create the custom class:

...

Info
This class should define the execute method that accepts ExecutionEvent instance as an argument. The ExecutionEvent instance will be passed that contains information about the runtime variables that are required to execute the business logic. The variables are:
  • Process Flow Context - contains all the variables present in the Process Flow Context
  • Service instance - contains information like name and id of the custom plugin activity
  • Input Data Stream - a reference to the input data stream to the custom plugin activity
  • Logger - a reference to the Process Flow logger instance

...

Compile the class.

Info
Ensure that you have the following Jars in the class path to successfully compile the above class.
  • BPMServer.jar (present in web/libs folder).
  • spring-context-xxx.RELEASE.jar (present in web/libs/spring folder)

...

Put this class into the customClasses folder.

Once you have created a custom class, perform the following steps to use it in Custom Plugin:

  • Create a custom\beans folder in the  .../<AdeptiaInstallFolder>/ServerKernel/customClasses path and place the spring bean file in customClasses\custom\beans folder which you can use as Spring Bean.

...

Info
Restart the Adeptia services to bring the changes into effect.

Once defined, this bean name will be displayed in the Spring Bean Name drop-down list.

The following list gives you a clear idea about the pros and cons associated with this approach.

Pros:

  • High performance under heavy load of concurrent execution of process flows.

Cons:

...

Info

In case of high-performance needs under heavy load, Adeptia recommends using the Spring Bean option where the class instantiation and management is done by Adeptia Spring container which is highly optimized.

...

  1. data security service in the Name and Description text boxes.

...

titleEncrypting the variables using Vault

...

  • Following an opening curly parentheses, 'Vault' is a keyword (V in 'Vault' is UPPERCASE).
  • aliasName is the Vault Alias, where the parameter is defined.
  • key is the parameter which stores the Variable Value.
  • Finally closed by a closing curly parentheses.
  • A period is used as a separator between Vault and aliasName; and aliasName and key.

...

titleFetching the variables in the script

Once the variables are defined in Step 5 above, you can fetch their values in the script through following syntax-

...


  1. Image Added
  2. Select the manager type as PGP from the Type drop-down list. Adeptia Connect only supports PGP key manager type.
  3. Select the type of action : Encryption or Decryption. 
    Encryption - To encrypt the data.
    Decryption - To decrypt the encrypted data.
  4. Select the key manager. This drop-down list will display the Key Manager activities based on the type of action that you have selected in the previous step. For instance, if you have selected Encryption from the Action drop-down list, then the Key Manager will display all the Key Manager activities created using the Public Keys, that is, created for encryption. You can also create a key manager from this window by clicking Image Added. For more information, click here.

    You can also edit the selected key manager by clicking Image Added.

  5. Expand Advanced Properties and select the Project from the drop-down list of Project.
  6. Click Save.