Bug 103667 - task notifications failing
Summary: task notifications failing
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Enterprise CMS
Classification: Retired
Component: other   
(Show other bugs)
Version: 6.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Archit Shah
QA Contact: Jon Orris
URL:
Whiteboard:
Keywords:
Depends On:
Blocks: 100952
TreeView+ depends on / blocked
 
Reported: 2003-09-03 18:09 UTC by Crag Wolfe
Modified: 2007-04-18 16:57 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-10-07 22:07:26 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

Description Crag Wolfe 2003-09-03 18:09:52 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030703

Description of problem:
At least a couple of issues are preventing CMS task notifications from working
correctly in 6.0.

A) One is that ContentSectionSetup.loadAlertPrefs() is only called during
creation of the content section (the first time the server is started), when it
needs to be called at every server start-up.  The reason being that tasks alert
prefs are only stored in memory (in CMSTask.s_alerts).

B) Another issue I had was an ambiguous-column error that occurred while
generating the notification, in particluar, when a content item is created and
the Authoring-enabled task notification is triggered.  I am using oracle 9.0.1.
 See the "Additional Information" for the stack trace.


Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
For B), 

1) make sure the content section you are testing in at least has the following
in enterprise.init:

taskAlerts = {
      { "Authoring",
        { "enable", "finish", "rollback" }
      },

and     sendAlerts = true;
in  com.arsdigita.workflow.simple.Initializer

2)Assign someone as an author.

3)Create an item, which should initialize it's workflow in the authoring step,
and trip the stack trace.

Also, turning on debugging for com.arsdigita.cms.workflow should help.

Additional info:

2003-09-03 11:22:52,845 [032-0] ERROR rdbms.RDBMSEngine - select party_id as c_1,
       comment_id as c_2,
       comment__ctc.task_id as c_3,
       comment_date as c_4,
       task_comment as c_5
from (
        select c.comment_id,
               c.task_id,
               c.task_comment,
               c.comment_date,
               c.party_id
          from cw_task_comments c,
               cw_tasks t1,
               cw_tasks t2
         where t1.task_id = ?
           and t2.parent_task_id = t1.parent_task_id
           and c.task_id = t2.task_id) st_,
     cw_task_comments comment__ctc
where comment__ctc.comment_id(+) = comment_id
order by comment_date desc
java.sql.SQLException: ORA-00918: column ambiguously defined

        at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:180)
        at oracle.jdbc.oci8.OCIDBAccess.check_error(OCIDBAccess.java:1759)
        at oracle.jdbc.oci8.OCIDBAccess.parseExecuteDescribe(OCIDBAccess.java:953)
        at
oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:2110)
        at
oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2324)
        at
oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:421)
        at
oracle.jdbc.driver.OraclePreparedStatement.execute(OraclePreparedStatement.java:486)
        at com.arsdigita.db.PreparedStatement.doExecute(PreparedStatement.java:213)
        at com.arsdigita.db.PreparedStatement.execute(PreparedStatement.java:184)
        at
com.redhat.persistence.engine.rdbms.RDBMSEngine.execute(RDBMSEngine.java:442)
        at
com.redhat.persistence.engine.rdbms.RDBMSEngine.execute(RDBMSEngine.java:394)
        at
com.redhat.persistence.engine.rdbms.RDBMSEngine.execute(RDBMSEngine.java:227)
        at
com.redhat.persistence.engine.rdbms.RDBMSEngine.execute(RDBMSEngine.java:218)
        at com.redhat.persistence.Cursor.execute(Cursor.java:125)
        at com.redhat.persistence.Cursor.next(Cursor.java:109)
        at com.arsdigita.persistence.DataQueryImpl.next(DataQueryImpl.java:456)
        at
com.arsdigita.workflow.simple.Task.getLastCommentInWorkflow(Task.java:776)
        at com.arsdigita.cms.workflow.CMSTask.generateMessage(CMSTask.java:252)
        at com.arsdigita.workflow.simple.UserTask.enableEvt(UserTask.java:295)
        at com.arsdigita.cms.workflow.CMSTask.enableEvt(CMSTask.java:195)
        at com.arsdigita.workflow.simple.Task.enable(Task.java:878)
        at com.arsdigita.workflow.simple.UserTask.enable(UserTask.java:284)

Comment 1 Crag Wolfe 2003-09-09 21:01:57 UTC
So, correcting those 2 things seems to get tasks up.

My diff's are below.  I only renamed select fields in Task.pdl so as to avoid
the ambiguous column error.

--- SectionInitializer.java     Tue Sep  9 13:36:10 2003
+++
/usr/share/ccm-devel/applications/ccm-cms-6.0.0/src/com/arsdigita/cms/installer/SectionInitializer.java
    Tue Aug 19 16\:36:03 2003
@@ -164,8 +164,6 @@
	} else {
             try {
                 section = ContentSection.getSectionFromNode(node);
-                (new ContentSectionSetup(section)).
-                    loadAlertPrefs((List) m_conf.getParameter(TASK_ALERTS));
             } catch (DataObjectNotFoundException de) {
                 throw new InitializationException( (String)
GlobalizationUtil.globalize("cms.installer.could_not_load_sectio\n", new
Object[] {name}).localize(), de);
             }


--- Task.pdl    Tue Sep  9 14:57:29 2003
+++ Task.pdl.old        Tue Sep  9 13:59:33 2003
@@ -98,11 +98,11 @@
     TaskComment comment;

     do {
-        select c.comment_id as the_comment_id,
-               c.task_id as the_task_id,
-               c.task_comment as the_task_comment,
-               c.comment_date as the_comment_date,
-               c.party_id as the_party_id
+        select c.comment_id,
+               c.task_id,
+               c.task_comment,
+               c.comment_date,
+               c.party_id
           from cw_task_comments c,
                cw_tasks t1,
                cw_tasks t2
@@ -110,10 +110,10 @@
            and t2.parent_task_id = t1.parent_task_id
            and c.task_id = t2.task_id
     } map {
-        comment.id = the_comment_id;
-        comment.task = the_task_id;
-        comment.taskComment = the_task_comment;
-        comment.commentDate = the_comment_date;
-        comment.partyID = the_party_id;
+        comment.id = c.comment_id;
+        comment.task = c.task_id;
+        comment.taskComment = c.task_comment;
+        comment.commentDate = c.comment_date;
+        comment.partyID = c.party_id;
     }
 }


Comment 2 Archit Shah 2003-09-17 20:20:41 UTC
The notifier thread for overdue tasks also needs to be started every time.

Comment 3 Archit Shah 2003-09-19 17:00:30 UTC
fixed on trunk (@36062) and on branch (@36146)


Note You need to log in before you can comment on or make changes to this bug.