Apama Designer Can Export Event Definitions To Digital Event Definitions

Introduction

This article is written assuming you have basic knowledge on apama projects.

We have two ways to export Apama event definitions to Digital event definitions,
  • Export using Designer
  • Export using engine_deploy (CLI)

Steps to export using Designer:

  1. Create apama project including Digital Event service bundle.
  2. Create evtDefinition (which includes apama field types, constants and actions) under eventdefinition folder of Apama project.
  3. For your information, constants and actions are not exported to Digital event definitions. They are ignored silently while exporting.
  4. Please note you need to provide package name in this eventdefinition file without which you cannot export Apama Event definitions to Digital event definitions.
  5. Under Digital Event service bundle, double click on EventTypeList.apamades. You will see two sections, 
    • Import types from DES.
      • Lists all digital event definitions fetched from DES repository.
      • Green check mark indicates, these event types are of publishable types.
      • Red cross mark indicates, these are of non-publishable types.
    • Export types to DES.
      • Click on "Add Event" "+" icon.
      • Select the event definition to export and click ok.
      • Here you can see event definition added to exported list. Save it.
  6. Go to event definitation file which you already created, and you can notice autogenerated boiler plate code.At the end of eventdefinition file you can also see apama channel associated with this type.
  7. We can verify exported digital event definitation under DES repository.
  8. Go to <installDir>\common\DigitalEventServices\TypeRepository\eventtypes\ , under this you can see an autogenerated folder, inside which you can see .dx and .json files. 
  9. Open the .dx file, you will see types exported. As mentioned earlier constants and actions are not exported, they are ignored.
  10. By default delivery mode is set to "Non -Persistent" when you export Apama event definition to Digital Event definition. You can see this property in .json file.
  11. To set delivery mode to persistent, you need to add an annotation for the event,
Open event definitation file, add following line before "event <eventdefinition> {",
@com.softwareag.connectivity.MessageId("msg")
And add string type for this "msg" after line "event <eventdefinition> {",
string msg;
Save it.
If any modifications is done for already exported event definition, then need not to re export again.
Veify .json file again, you will see delivery mode is set to persistent.
 
 
 
Non-Supported Apama field types (error at export time)
  • Decimal
  • optional<Anything that isn't an event types>
  • Chunk
  • Listener
  • Stream
  • Exception
  • Channel
  • Context
  • StackTraceElement
  • Location
These are specific to Apama and are not supported by DES.
If we add any of these field types to Apama event definition, then while exporting it will throw an error saying "DES has no equivalent for ..."
 
 
Export Using engine_deploy (CLI):
a. --outputDeployDir: engine_deploy.exe --outputDeployDir <outputDir> <projectDir>
b. --outputList: engine_deploy.exe --outputList <outputFileName> <projectDir>
c. --outputCDP: engine_deploy.exe --outputCDP <outputFileName> <projectDir>
 
  • engine_deploy.exe is found under  <installDir>\Apama\bin.
  • If you run command --outputDeployDir: engine_deploy.exe --outputDeployDir <outputDir> <projectDir>,
    • Under <outputDir> you will find exported apama project. And in DES repository you will find exported Digital event definitions.
  • This the same with next two commands --outputList, --outputCDP which will export apama event definitions to Digital event definitions.