[jBPM] - "error: mail template not found" preventing deployment. Bug?
by Charles Aznavour
Charles Aznavour [http://community.jboss.org/people/charles_a] created the discussion
""error: mail template not found" preventing deployment. Bug?"
To view the discussion, visit: http://community.jboss.org/message/556265#556265
--------------------------------------------------------------
Hi all,
we have deployed multiple version of a process with the same key. After deployment, we suspend all but the latest deployment of a process to ensure only one active version of a process (if running instances exists, we migrate them).
Now, we´ve removed an old mail template used in an old process definitions (it´s not used in the still active definition, it´s in a version "some deployments ago").
We encounter the message "error: mail template not found" which prevents deployment.
I´ve done some debugging and it seems that in class ProcessDeployer the method checkKey loads all existing process definitions for a specific key. During the initialization of the ProcessDefinition object the exception occurs.
How is it supposed to work? Maybe it should only search for still active ProcessDefinitions in the checkKey method? Is probably the jpdl parser too strict here, because the parser seems fine with old processes having usercode defined that also doens´t exist anymore (assignmenthandler classes for example)?
Thanks for your help,
Charles
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/556265#556265]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
15 years, 8 months
Re: [jboss-user] [jBPM] - How to handle SMTP failures in a mail activity
by Jeffrey Anuszczyk
Jeffrey Anuszczyk [http://community.jboss.org/people/jeffgreg] replied to the discussion
"How to handle SMTP failures in a mail activity"
To view the discussion, visit: http://community.jboss.org/message/556250#556250
--------------------------------------------------------------
Hi HuiSheng,
First thanks a ton for replying - so far you are the only person to do so. Your posting is most definitely helpful.
As for my problem, yes the job is most definitely failing. The error in the JBPM4_JOB table is the full java stack trace effectively saying:
javax.mail.MessagingException: Could not connect to SMTP host: localhost, port: 2525;
The fact that ExceptionHandling is not yet implemented wasn't obvious in any of the docs, wiki postings, etc (although I was guessing it :-)
So if I understand you correctly I need to build a mechanism to check the job table looking for state = error and figure out how to handle it. If I decide to try it again I can manually fire it off using the management.executeJob(jobId). I'll have to look into the api's to see if my failure code can manually cause the Process/Job to transition to a different activity - sort of roll my own exception handling. That would be preferable to hard coding this type of logic in the job error handler.
Is there any expected version in which ExceptionHandling will be added to the system?
Thanks,
- Jeff
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/556250#556250]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
15 years, 8 months
Re: [jboss-user] [jBPM Development] - E-mail attachments
by Erki Kriks
Erki Kriks [http://community.jboss.org/people/krixerx] replied to the discussion
"E-mail attachments"
To view the discussion, visit: http://community.jboss.org/message/556207#556207
--------------------------------------------------------------
I found easy solution. It's not nice but it works.
i - number of attachments.
<decision name="sendEmailDecision">
<transition to="sendEmailWith1Attachment">
<condition expr="#{i == 1}"/>
</transition>
<transition to="sendEmailWith2Attachments">
<condition expr="#{i == 2}"/>
</transition>
<transition to="sendEmailWith3Attachments">
<condition expr="#{i == 3}"/>
</transition>
<transition to="end"/>
</decision>
<mail name="sendEmailWith1Attachment">
...
<attachments>
<attachment file="#{attachmentAddresses.get(0)}" mime-type="txt/xml" name="#{attachmentNames.get(0)}"/>
</attachments>
<transition to="end"/>
</mail>
<mail name="sendEmailWith2Attachments">
...
<attachments>
<attachment file="#{attachmentAddresses.get(0)}" mime-type="txt/xml" name="#{attachmentNames.get(0)}"/>
<attachment file="#{attachmentAddresses.get(1)}" mime-type="txt/xml" name="#{attachmentNames.get(1)}"/>
</attachments>
<transition to="end"/>
</mail>
<mail name="sendEmailWith3Attachments">
...
<attachments>
<attachment file="#{attachmentAddresses.get(0)}" mime-type="txt/xml" name="#{attachmentNames.get(0)}"/>
<attachment file="#{attachmentAddresses.get(1)}" mime-type="txt/xml" name="#{attachmentNames.get(1)}"/>
<attachment file="#{attachmentAddresses.get(2)}" mime-type="txt/xml" name="#{attachmentNames.get(2)}"/>
</attachments>
<transition to="end"/>
</mail>
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/556207#556207]
Start a new discussion in jBPM Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
15 years, 8 months