1

Can an apama_project specify the injection order of user-defined types? It appears the engine_deploy does not automatically resolve the user-defined dependency graph.


Using the apama_project tool, I have setup a project with two *.mon files. 1.mon depends on an event definition in 2.mon.

TestProject
  |-.dependencies
  ...
  |-events
  |-monitors
  |  |-1.mon // depends 2.mon
  |  |-2.mon
  |-.project

The intent was to see if the engine_deploy tool could identify the dependency tree of user-defined types. Unfortunately, it does not appear to:

 engine_deploy -d ../Deployment .
INFO: copying the project file from /home/twanas/base_project to output directory ../Deployment
WARN: Overwriting output deployment directory ../Deployment
ERROR: Failed to generate initialization list as the project has below error(s): 
/home/twanas/base_project/monitors/1.mon: 1: the name rt in the com namespace does not exist
/home/twanas/base_project/monitors/1.mon: 5: "A" does not exist

Full source:

// 1.mon
using com.rt.sub_a;

monitor B {
    action onload() {
        on all A() as a {
            log a.toString();
        }
    }
}

// 2.mon
package com.rt.sub_a;

event A {
    string mystring;
}

Assuming the user is developing on linux so does not use the 'SoftwareAG Designer' - how can this be achieved?

On a separate note - the apama_project and engine_deploy are great additions to toolbase.

awaugh
  • 75
  • 1
  • 6

1 Answers1

0

The issue was actually caused by invalid EPL using com.rt.sub_a;

The tools did indeed resolve the user-defined dependencies which is excellent.

awaugh
  • 75
  • 1
  • 6
  • Hi - I'll add an answer that explains this in more detail as it could be something that someone else looks up. – Caribou Apr 16 '20 at 07:39
  • 1
    Please do: I have noticed that a folder without a .project or .dependencies file which has `engine_deploy` called against it will default to alphabetic ordering of files in the generated `initialisation.yaml` file. Understanding the mechanics of this would be very helpful in diagnosing the output of the tool. – awaugh Apr 17 '20 at 02:51
  • Also , is the --exclude parsed before or after the EPL dependency tree is built? I.e. if a file A.mon will have invalid dependencies, but has been added to the exclude list will it still cause a `engine_deploy` error?\ – awaugh Apr 17 '20 at 03:05
  • I'm checking out what you have said here as we want to make sure the alphabetical ordering isn't an issue - will include that in my reply. – Caribou Apr 17 '20 at 13:39