Overview

This document covers all the aspects which user needs to configure a workflow. This document focusses on the preparation of content, i.e. plugins and their respective dependencies, needed by any workflow and criteria on which these plugin will be working.

Features

This tab is visible only to the admin and provides feature for adding a plugin and configuring its dependencies. On clicking the “Workflow Management” tab or accessing the “http ://<Server-name>:<port number>/dcma/CustomWorkflowManagement.html”, the user will see a screen containing the following as shown in the screenshot:

  • “Plugins List”: List of plugins already present.
  • “Add New Plugin” button: For adding or updating a plugin.
  • “Dependencies” button: On being clicked it will take user to a screen where it can manage the dependencies among the plugins.
  • “Help” button: User will be shown a pop-up message containing the information about the how to information on new plugin upload.

 

 

400px-3.1_WorkflowManagement_10001

 

Plugins list

Landing screen for the workflow management tab will contain the list of already installed plugins. The list displayed will support the default Ephesoft UI functionalities of pagination and sorting. The list will display the following for each plugin:

  • Plugin name
  • Plugin description

Add New Plugin

View

On clicking on “Add New Plugin” button, a file upload widget will open up with the following options. See the screenshot below:

 

400px-3.1_WorkflowManagement_10002

 

  • “Browse”: a file selection window will open up.
  • “Save”: this will save the plugin to the DB after validating the files.
  • “Cancel”: this will cancel the operation.

Working

Working of this functionality depends on the following conditions:

  • This widget will accept a .zip file for uploading. Contents of the zip file:
    • .Jar file: The Jar for the plugin to be added.
    • .Xml file: containing the plugin information. Please see below for structure of this XML file.
    • .Zip file must only contain these two files i.e. .Jar and .Xml.
    • .Zip file and .Jar file must have the same name.
    • .Jar file content cannot be verified, so the user must make sure that they are as required.
  • In order for this plugin to take effect, user needs to restart the tomcat server.
  • Note:
    • This Zip file after successful validation of its contents will be stored in the configurable location specified in “<Ephesoft installation path>\Application\WEB-INF\classes\META-INF\application.properties” file under the property named “plugin_upload_folder_path”.
    • The JPDL file for the uploaded plugin will be stored at <Ephesoft installation build>\Application \WEB-INF\classes\META-INF\dcma-workflows\plugins\<PLUGIN_NAME>

Plugin XML structure

<?xml version=”1.0″ encoding=”UTF-8″?>

<plugin>

<jar-name></jar-name>

<plugin-name></plugin-name>

<plugin-desc></plugin-desc>

<plugin-workflow-name></plugin-workflow-name>

<plugin-service-instance></plugin-service-instance>

<method-name></method-name>

<is-scripting></is-scripting>

<back-up-file-name></back-up-file-name>

<script-name></script-name>

<override-existing></override-existing>

<application-context-path></application-context-path>

<plugin-properties>

<plugin-property>

<operation></operation>

<name></name>

<type></type>

<description></description>

<is-mandatory></is-mandatory>

<is-multivalue></is-multivalue>

<sample-values>

<sample-value></sample-value>

</sample-values>

</plugin-property>

</plugin-properties>

<dependencies>

<dependency>

<type-of-dependency></type-of-dependency>

<dependency-name></dependency-name>

</dependency>

</dependencies>

</plugin>

Validation on XML

  • All tags are compulsory and will have any string value, except for “is-scripting”,” is-mandatory”, “is-multivalue” AND “override-existing” tags which will have Boolean values (TRUE, FALSE).
  • “jar-name” tag value must match the name of the jar file present in the zip file.
  • If “is-scripting” tag has a value “TRUE”, only then the values of “back-up-file-name” and “script-name” tag will be taken into account.
  • “plugin-property” and “dependency” tag can have multiple instances and have the values for plugin configs and dependencies respectively.
  • “override-existing” tag decides whether to add the new plugin or update an existing one. If value is “true”, then the existing plugin will be updated else it will be added as new.
  • Three operations can be done on the plugin properties and will be defined by the “operations” tag inside “plugin-property” tag. Following are the supported operations:
    • Add: adds a plugin property. An error is shown if it exists already.
    • Update: updates a plugin property identified by its name and if it doesn’t exist, creates a new one.
    • Delete: deletes a plugin property identified by its name. An error is shown if no such property exists.
  • Default values for the plugin properties:

 

Property data type Default value
String Default
Integer 0
Boolean Yes

 

These properties will be assigned for properties which are mandatory. Also if a property is multivalued, the first value from the list will be the default value.

Assumptions

  • “plugin-service-instance” and “method-name” tags must be correct as they cannot be validated.
  • “application-context-path” refers to the application context file name for the plugin.
  • For the dependencies tag:
    • For a new plugin, with dependencies as
    • ORDER_BEFORE : P2,P3/P4,P6/P7/P8
    • UNIQUE : TRUE

 

<dependencies>

<dependency>

<type-of-dependency> ORDER_BEFORE </type-of-dependency>

<dependency-name> P2</dependency-name>

</dependency>

<dependency>

<type-of-dependency> ORDER_BEFORE </type-of-dependency>

<dependency-name> P3/P4</dependency-name>

</dependency>

<dependency>

<type-of-dependency> ORDER_BEFORE </type-of-dependency>

<dependency-name> P6/P7/P8</dependency-name>

</dependency>

<dependency>

<type-of-dependency> UNIQUE </type-of-dependency>

<dependency-name> TRUE </dependency-name>

</dependency>

</dependencies>

Dependencies management

On clicking the “Dependencies” button, the dependency management screen will open up. It contains the following:

  • “Plugin” List Drop Down: Allows the user to select the plugin whose dependencies it wants to see.
    • “Dependency List”: List of Dependencies with the following attributes:
      • Plugin Name: Name of the plugin.
  • Dependency Type: Type of dependency it shares with the dependent plugins.
  • Dependency: List of dependent plugins.
  • Add” Button: Allows the user to add a dependency for a plugin.
  • Edit” Button: Allows the user to edit an already existing dependency for a plugin.
  • Delete” Button: Allows the user to delete an already existing dependency for a plugin.
  • Save” Button: Saves the current state of dependencies of all the dirty plugins and takes the user to the “Workflow Management” Screen.
  • Apply” Button: Saves the current state of dependencies of all the dirty plugins and stays on the current Screen.
  • Cancel” Button: Discards the current state of dependencies of all the dirty plugins and takes the user to the “Workflow Management” Screen.

 

400px-3.1_WorkflowManagement_10003

 

Add Dependencies

This screen shows the following:

  • Plugin Name: name of the plugin selected on the previous screen.
  • Dependency type: List of available dependency types. Only single select is allowed.
  • Dependencies List: this list contains the list of available plugins minus the plugin selected on the previous screen. This list will be enabled only when “ORDER_BEFORE” is chosen as dependency type. Only single select is allowed.
  • Selected Dependencies: List of dependencies selected by the user.
  • And Button: on being clicked, adds the dependency selected in the “Dependencies List” as an “and” dependency to the “Selected Dependencies” text box.
  • Or Button: on being clicked, adds the dependency selected in the “Dependencies List” as an “or” dependency to the “Selected Dependencies” text box.
  • Ok Button: Saves the dependency to the plugin.
  • Reset Button: Resets all the fields to their initial values.

 

400px-3.1_WorkflowManagement_10004

 

 

Edit Dependencies

This allows the user to edit a particular dependency record.

Delete Dependencies

This allows the user to delete a particular dependency record.

Help Content

  • On being clicked it will display a pop-up message providing information on how to upload and use a new plugin.

 

400px-3.1_WorkflowManagement_10005

 

Dependencies database table structure

 

Id plugin_id dependency_type dependency
1 P1 ORDER_BEFORE P3,P5
2 P2 ORDER_BEFORE P1/P8
3 P3 ORDER_BEFORE P4
5 P1 UNIQUE

 

Fields:

  • Id:
    • Data type: Long
    • The unique Id for the table
  • plugin_id:
    • Data type: Long
    • Plug-in id mapped directly to the Plug-in table.
  • dependency_type:
    • Data type: ENUM(ORDER_BEFORE,UNIQUE)
    • Defines the type of dependency between the plug-in and list of plug-ins in dependency column.
  • dependency:
    • Data type: String
    • List of plug-ins which on which the plug-in depends.
    • Format of values in the delimiter separated values.

 

Delimiter Meaning
, AND
/ OR

 

 

  • Example: P1,P2,P3/P4,P5,P6/P7/P8
  • Above example means that plug-in needs the following:
    • P1
    • P2
    • P3 OR P4
    • P5
    • P6 OR P7 OR P8
  • NOTE: if dependency_type = UNIQUE, then this field will be empty.
  • Type of dependencies:
    • Ordering of plugins:
      • This type of dependency signifies a dependency where a plugin requires a plugin to run before it.
      • Example:
        • For 1st plugin in workflow: no dependency.
        • For any other plug-in: All of its ancestor plug-ins.
  • Uniqueness:
    • This type of dependency signifies a plugin’s uniqueness in the workflow, i.e. it should only run once in the workflow. E.g. clean up plug-in.

 

Was this article helpful to you?

wikiadmin

Comments are closed.