Author Message
MichaelDailous_deprecated
Joined: Nov 11, 2013
Messages: 171
Offline
I'd like to know if it's possible to add a library to the tomcat lib directory when a PDC feature package is installed into the Eclipse workspace, similar to how the scertcommon.jar file is added to the tomcat lib directory when the Avaya framework is installed into the Eclipse workspace.

Along the same lines, how will the jar file be handled when the runtime support library zip file is exported.. i.e. will the jar file be added to the zip file automatically, or will I need to add it manually?

Orchestration Designer 7.1
Eclipse 4.4
JDK 1.8

Thanks in advance.
Michael
RossYakulis
Joined: Nov 6, 2013
Messages: 2652
Offline
Yes.

Destination, one of PROJECT_WEBINF, TOMCAT_COMMON_LIB, TOMCAT_COMMON_CLASSES, TOMCAT_WEBAPPS, and PROJECT_RELATIVE

NOTE: Items with a destination of TOMCAT_COMMON_LIB or TOMCAT_COMMON_CLASSES will automatically be included in the Export Runtime Support Files wizard. If the pluggable connector %lt;configuration%gt; element is visible (visible="true"), then the Pluggable Connector will be listed on the wizard and the user has the option to select if they want to include the connector's common files in the runtime support ZIP file. PROJECT_RELATIVE resources will be copied into the project relative to the project root. Therefore the resource name must include path info in addition to the resource name. If the file path does not exist it will be created. That is if the resource name is "data/xml/example.xml", this file example.xml is copied into the project at <project root>/data/xml/example.xml. Example:

<item
destination="TOMCAT_COMMON_LIB"
resourceName="axis/jaxrpc.jar"
updateClasspath="true">
</item>
MichaelDailous_deprecated
Joined: Nov 11, 2013
Messages: 171
Offline
Thank you, Ross. However, that works if I select the particular plugin. I'm looking for a means to add a jar file when the feature pack is added to the workspace. When OD is added to the workspace, the scertcommon.jar file is automatically copied to the tomcat lib directory before any Avaya PDC is enabled. Is this possible? If it's not possible, I can use the above method.

Also, let me know if you want me to open a different thread on this, but I'm getting access restrictions trying to write a new PDC. In looking at the Avaya jar files, I see they all have access restrictions of Forbidden access to "*/**". Unfortunately, this means I can't create any FlowItem classes. How can I update the access rights so I can create a new PDC?

Thanks again,
Michael
RossYakulis
Joined: Nov 6, 2013
Messages: 2652
Offline
You want a jar added to the tomcat lib in general for all plugins. Lets see... try playing with this extension point

<extension
point="com.avaya.sce.core.runtimeSupport">
<staticResource
name="some file in my pdc"
type="lib">
</staticResource>


Note there is also externalResource and wildcardResource and a copyHelper attribute....
RossYakulis
Joined: Nov 6, 2013
Messages: 2652
Offline
I did not follow your issue on the second item. In a pdc when you create a flow item you use this:


public class MyFlowItem extends DataConnectorFlowItem {

...
RossYakulis
Joined: Nov 6, 2013
Messages: 2652
Offline
From the on-line help

------------
Avaya Aura® Orchestration Designer - Self Service > Pluggable Data Connector (PDC) Reference > Orchestration Designer Extension Points Reference
Runtime Support

Identifier: com.avaya.sce.core.runtimeSupport

Since: 5.0

Description: This extension point is used to identify resources (Java executable) that are generated in the runtimesupport ZIP file.

Configuration Markup:

<!ELEMENT extension (staticResource | wildcardResource | externalResource)+>

<!ATTLIST extension

point CDATA #REQUIRED

id CDATA #IMPLIED

name CDATA #IMPLIED

>




<!ELEMENT staticResource EMPTY>

<!ATTLIST staticResource

name CDATA #REQUIRED

type (lib|classes|warlib)

copyHelper CDATA #IMPLIED

>


A static reference to a resource in a plugin that will be part of the runtime support ZIP file.



name - The resource (part of the plugin) that will be part of the runtime support.
type - The resource type:
lib - The resource will be put in the lib directory
classes - The resource will be put in the classes directory.
copyHelper - Optional element that is invoked while preparing the runtime support for handling things like renaming the resource when it is added to the support ZIP file.


<!ELEMENT wildcardResource EMPTY>

<!ATTLIST wildcardResource

name CDATA #REQUIRED

type (lib|classes|warlib)

copyHelper CDATA #IMPLIED

>


A dynamic (useing wildcards) reference to a resource in a plugin that will be part of the runtime support ZIP file.



name - The name of the file that will be included in the runtime support zip. A wild card can be used--i.e. scert-*.jar
type - The resource type:
lib - The resource will be put in the lib directory
classes - The resource will be put in the classes directory.
copyHelper - Optional element that is invoked while preparing the runtime support for handling things like renaming the resource when it is added to the support ZIP file.


<!ELEMENT externalResource EMPTY>

<!ATTLIST externalResource

name CDATA #IMPLIED

type (lib|classes|warlib)

resourceLocator CDATA #REQUIRED

>


A reference to an external file that is added to the runtime support ZIP file.



name - Optional name to describe resources that are copied by the resource locator.
type - The resource type:
lib - The resource will be put in the lib directory
classes - The resource will be put in the classes directory.
resourceLocator - The class that provides the names/paths of the file(s) that are added to the runtime support zip.

Examples:

<extension point="com.avaya.sce.core.runtimeSupport">
<staticResource name="lib/axis.jar" type="lib" />
<wildcardResource name="data/scertcommon-*.jar" type="lib" />
<staticResource name="data/deploy/log4j.properties" type="classes" />
</extension>

This example contributes three different resources (axis.jar, scertcommon-*.jar, and log4j.properties) to the runtime support.
axis.jar - this is a static reference to the axis.jar file that will be included in the runtime support ZIP file for the deployment platform.
scertcommon-*.jar - This is a wildcard reference to the scertcommon JAR file. At runtime, the wildcard is evaluated and any matching files will be included in the runtime support ZIP file for the deployment platform.
log4j.properties - The deploy/log4j.properties file will be included in the runtime support ZIP file for the deployment platform.



MichaelDailous_deprecated
Joined: Nov 11, 2013
Messages: 171
Offline
Thanks again. :) That adds the jar file to the tomcat lib directory. Now, how do I automatically add that jar to the project build path when the project is created, similar to how the [TOMCAT_HOME]\lib\scertcommon-<version>.jar file is added to the project build path.

I've found the newSpeechProject extension point, but can't figure out what to do in the class file. :(

I'll start another thread regarding the access to the Avaya java classes.

Michael
MichaelDailous_deprecated
Joined: Nov 11, 2013
Messages: 171
Offline
I figured out how to add the jar file to the project build path when a new project is created. It took a bit of hunting, but I found the
TomcatUtils.addTomcatJarToProjectClasspath(...)
method. Again, a little bit of digging and trial and error and I've got it working how it needs to work.

Thanks for all the help and pointing me in the right direction. :)
Michael
RossYakulis
Joined: Nov 6, 2013
Messages: 2652
Offline
In the plugin.xml you should just set updateClassPath = true?
RossYakulis
Joined: Nov 6, 2013
Messages: 2652
Offline
Example:

<plugin>
<extension
point="com.avaya.sce.core.pluggableConnector">
<configuration
connectorId="com.avaya.sce.pdc.workflow"
displayName="Avaya Breeze™/ED integration (Workflows and Context Store)"
icon="icons/wf.gif"
class="com.avaya.sce.pdc.workflow.ui.ConnectorConfig"
runtimeLifeCycle="com.avaya.sce.pdc.workflow.LifeCycle"
category="Workflow"
visible="true"
visible_enabled="false">
<item
destination="PROJECT_WEBINF"
versionClass="com.avaya.sce.pdc.workflow.Version"
versionMethod="getVersion"
updateClasspath="true"
resourceName="data/pdcworkflow.jar">
</item>
Go to:   
Mobile view