[JBoss jBPM] - mail node issue
by debnathm
Hi
I have written the following code:
ProcessDefinition processDefinition = ProcessDefinition.parseXmlString(
| "<process-definition> " +
| " <start-state name='start'>" +
| " <transition to='mailnode1' name='to_mailnode'></transition>" +
| " </start-state> " +
| " <mail-node name='mailnode1' to='<email address>' >" +
| " <subject>a</subject> " +
| " <text>This is regarding</text>" +
| " <transition to='end' name='to_end'></transition> " +
| " </mail-node> " +
| "<end-state name='end'></end-state>" +
| "</process-definition>");
|
|
| ProcessInstance processInstance = new ProcessInstance(processDefinition);
However, the above code gives a warning on parsing:
13:23:38,166 WARN [JpdlXmlReader] process xml warning: transition to='mailnode1
' on node 'start' cannot be resolved
On signalling the start node, I get the runtime exception:
org.jbpm.JbpmException: transition 'to_mailnode' doesn't have destination. check
your processdefinition.xml
Please let me know what is going wrong.
Thanks,
Debnath
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4123945#4123945
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4123945
18 years, 3 months
[JBoss Seam] - Re: Force method to be run before page redirect (no pages.xm
by w17chm4n
Using interceptor didn`t help :|
| @Interceptor
| public class QuestionRemovedInterceptor {
|
| @AroundInvoke
| public Object aroundInvoke(InvocationContext invocation) throws Exception {
| Contexts.removeFromAllContexts("questionCategoryList");
| return invocation.proceed();
| }
| }
|
| @Target(ElementType.TYPE)
| @Retention(RetentionPolicy.RUNTIME)
| @Interceptors(QuestionRemovedInterceptor.class)
| public @interface QuestionRemoved {}
|
Logs look almost allright (doubled reciving questionCategoryList, but this is because the questionCategoryController is stateless)
| 09:00:15,046 INFO [QuestionCategoryManagerBean] Reciving QuestionCategory list
| 09:00:15,118 INFO [QuestionCategoryManagerBean] Reciving QuestionCategory list
| 09:00:15,312 INFO [QuestionManagerBean] Removing question [afgdfgsdfg]
| 09:00:15,362 INFO [QuestionCategoryManagerBean] Reciving QuestionCategory list
| 09:00:15,429 INFO [QuestionCategoryManagerBean] Reciving QuestionCategory list
|
I`ve also tryed to change annotation type to method
| @Target(ElementType.METHOD)
| @Retention(RetentionPolicy.RUNTIME)
| @Interceptors(QuestionRemovedInterceptor.class)
| public @interface QuestionRemoved {}
|
and than use it on removeQuestion
| @QuestionRemoved
| public void removeQuestion(Question question) {
| if(question.getQuestionType().getId().equals(questionTypeManager.getQuestionTypeByName(propertiesManager.get("questiontype.input")).getId())) {
| questionManager.removeQuestion(question);
| } else {
| answerManager.removeAnswers(question.getAnswers());
| questionManager.removeQuestion(question);
| }
| }
|
But that didn`t work either. Any other ideas?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4123941#4123941
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4123941
18 years, 3 months