Avaya Support Forums

Avaya Support Forums (http://support.avaya.com/forums/index.php)
-   Avaya Breeze™ Collaboratory (http://support.avaya.com/forums/forumdisplay.php?f=77)
-   -   Debugging Dynamic Task (http://support.avaya.com/forums/showthread.php?t=11999)

ander548 09-27-2016 06:51 AM

Debugging Dynamic Task
1 Attachment(s)
What is the best way to debug a dynamic task? It seems you can only create a test instance of actual workflows, and I can't seem to find a way to quickly test the dynamic task? It takes quite awhile to load and install the svar, and all I can do is plug it into a new workflow and debug that workflow. Currently I'm getting an error (attached image) and I have no idea where to look for details about what the problem is? Any help in this regard would be appreciated!

ander548 09-27-2016 08:09 AM

I am logging things with Logger and have it set to log ALL, but I can't recall what server you have to connect to to view the logs? Does anyone have any details on how to view logs for a dynamic task?

agrace 09-27-2016 08:22 AM

The task type logging is rolled into the EngagementDesigner logs (even though the system creates logging files for them separately, probably for any aux services that are in the snap-in)

`ce dlogon EngagementDesigner`
`ce dlogv EngagementDesigner`

ander548 09-27-2016 08:26 AM

Yeah, I had found this online:

Log in to the Avaya Breeze™ server and run this command: ce dlogv <serviceName>.

But which server do I connect to? My Collaboratory docs don't list an "Avaya Breeze Server" :)

ander548 09-27-2016 08:46 AM

I connect into the server listed as EDP and I get this. Not sure what I'm doing, but if my task is named "MyTask", how would I see what it is logging? It still has this generated line in the execute java class that I'm trying to find: logger.info("HelloExecution started....");

[cust18779@edpamgmt022 ~]$ ce dlogon EngagementDesigner
log4j.logger.EngagementDesigner/EngagementDesigner: changing state to ALL/ALL
[cust18779@edpamgmt022 ~]$ ce dlogv EngagementDesigner
2016-02-09 21:40:42,896 [AriesJavaEEExtenderThreadPool : 0] EngagementDesigner INFO - EngagementDesigner- - SchedulerSchemaBuilder.build(): loading DDLs ...
2016-02-09 21:40:43,231 [AriesJavaEEExtenderThreadPool : 0] EngagementDesigner INFO - EngagementDesigner- - SchedulerSchemaBuilder.build(): successfully executed DDLs ...
2016-02-09 21:40:43,233 [AriesJavaEEExtenderThreadPool : 0] EngagementDesigner INFO - EngagementDesigner- - DBIndexBuilder.build(): invoked ...
2016-02-09 21:40:43,240 [AriesJavaEEExtenderThreadPool : 0] EngagementDesigner INFO - EngagementDesigner- - DBIndexBuilder.getConnection(): Connection retrieved successfully ...
2016-02-09 21:40:43,240 [AriesJavaEEExtenderThreadPool : 0] EngagementDesigner INFO - EngagementDesigner- - DBIndexBuilder.build(): loading DDLs ...
2016-02-09 21:40:43,258 [AriesJavaEEExtenderThreadPool : 0] EngagementDesigner INFO - EngagementDesigner- - DBIndexBuilder.build(): successfully executed DDLs ...
Type :quit<Enter> to exit Vim
016-02-09 21:40:42,859 [AriesJavaEEExtenderThreadPool : 0] EngagementDesigner INFO - EngagementDesigner- - SchedulerSchemaBuilder.build(): invoked

agrace 09-27-2016 09:02 AM

It doesn't get shown any different way. If your task runs, the logger output will show in that log. I haven't tried anything on a "cluster" with more than one server so it might be different with multiple.

I'm thinking that spinning up a new thread might be needed to do any real work so that I can return a value in the original thread in a timely manner.

ander548 09-27-2016 09:09 AM

You may be getting a little over my head with that :) I can't believe there isn't a way to view the logs from System Manager somewhere! Here is the code I added to my execute class that builds but is most likely causing my error. Any ideas what could be causing an error with this? If I just do an obj.put and return obj that passes the output back to my workflow fine. After adding the http post code it gets the attached error, but no idea what's going on.

try {
String url = "http://www.google.com";
InputStream in = null;
HttpClient client = new HttpClient();
PostMethod method = new PostMethod(url);

//Add any parameter if u want to send it with Post req.
method.addParameter("p", "apple");

int statusCode = client.executeMethod(method);

if (statusCode != -1) {
in = method.getResponseBodyAsStream();


obj.put("STTId","Resp(" + statusCode + "): " + in);
} catch(Exception ex){
obj.put("STTId","ERR:" + ex.getMessage());

vishals 09-28-2016 09:38 AM

Logs will get printed in EngagementDesigner.log

ander548 09-28-2016 10:05 AM

Thanks, I am now able to view the logs in EngagementDesigner.log. As best I can tell, my errors have been ClassNotFound type errors, and it seems that adding classes to this in pom.xml have fixed most of those errors.

<ImportPackage>javax.persistence,org.json,com.avay a.app.entity,com.avaya.workflow.*,com.roob

vishals 09-29-2016 10:37 AM

Awesome glad to hear!

All times are GMT -7. The time now is 12:40 AM.