Re: [jboss-dev-forums] [jBPM Development] - how to build email of the service task, better give me a sample
by stone crasy
stone crasy [http://community.jboss.org/people/free] commented on the document
" how to build email of the service task,better give me a sample "
To view all comments on this document, visit: http://community.jboss.org/docs/DOC-17188#comment-7604
--------------------------------------------------
Connection not initialized for Email,Maybe connection is null ,
CustomWorkItemHandlers.conf could not work?(
i have run
ant clean.demoant install.demo
ant start.demo
)
Then,i modify like this:
EmailWorkItemHandler email =new EmailWorkItemHandler();
email.setConnection(("MySMTPHost","MySMTPPort","MyUsername","MyPassword");
ksession.getWorkItemManager().registerWorkItemHandler("Email",email);
there is not error,but it still not work,who could help me?
ksession.getGlobals() is null.
--------------------------------------------------
14 years, 3 months
Re: [jboss-dev-forums] [jBPM Development] - how to build email of the service task, better give me a sample
by stone crasy
stone crasy [http://community.jboss.org/people/free] commented on the document
" how to build email of the service task,better give me a sample "
To view all comments on this document, visit: http://community.jboss.org/docs/DOC-17188#comment-7602
--------------------------------------------------
first:modify $jbpm-installer-dir/conf/META-INF/CustomWorkItemHandlers.conf:
[
"Log": new org.jbpm.process.instance.impl.demo.SystemOutWorkItemHandler(),
"Email": new org.jbpm.process.workitem.email.EmailWorkItemHandler("MySMTPHost","MySMTPPort","MyUsername","MyPassword"),
]
second:bind the WorkItemHandler to the knowledge session
ksession.getWorkItemManager().registerWorkItemHandler("Email",new EmailWorkItemHandler());
third:<task id="_8" name="Email" tns:taskName="Email" >
but when i run ,errors in console:
java.lang.IllegalArgumentException: Connection not initialized for Email
at org.jbpm.process.workitem.email.EmailWorkItemHandler.executeWorkItem(EmailWorkItemHandler.java:63)
at org.drools.process.instance.impl.DefaultWorkItemManager.internalExecuteWorkItem(DefaultWorkItemManager.java:70)
at org.jbpm.workflow.instance.node.WorkItemNodeInstance.internalTrigger(WorkItemNodeInstance.java:105)
at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:122)
at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerConnection(NodeInstanceImpl.java:185)
at org.jbpm.workflow.instance.impl.NodeInstanceImpl.triggerCompleted(NodeInstanceImpl.java:150)
at org.jbpm.workflow.instance.node.StartNodeInstance.triggerCompleted(StartNodeInstance.java:49)
at org.jbpm.workflow.instance.node.StartNodeInstance.internalTrigger(StartNodeInstance.java:41)
at org.jbpm.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:122)
at org.jbpm.ruleflow.instance.RuleFlowProcessInstance.internalStart(RuleFlowProcessInstance.java:35)
at org.jbpm.process.instance.impl.ProcessInstanceImpl.start(ProcessInstanceImpl.java:188)
at org.jbpm.workflow.instance.impl.WorkflowProcessInstanceImpl.start(WorkflowProcessInstanceImpl.java:302)
at org.jbpm.process.instance.ProcessRuntimeImpl.startProcessInstance(ProcessRuntimeImpl.java:154)
at org.jbpm.process.instance.ProcessRuntimeImpl.startProcess(ProcessRuntimeImpl.java:124)
at org.jbpm.process.instance.ProcessRuntimeImpl.startProcess(ProcessRuntimeImpl.java:116)
at org.drools.common.AbstractWorkingMemory.startProcess(AbstractWorkingMemory.java:1090)
at org.drools.impl.StatefulKnowledgeSessionImpl.startProcess(StatefulKnowledgeSessionImpl.java:301)
at com.sample.ProcessTest.main(ProcessTest.java:32)
--------------------------------------------------
14 years, 3 months
[JBoss Web Development] - Force JBoss to refresh cache
by rlutz
rlutz [http://community.jboss.org/people/rlutz] created the discussion
"Force JBoss to refresh cache"
To view the discussion, visit: http://community.jboss.org/message/626325#626325
--------------------------------------------------------------
Hey all, we're running JBoss 2.4.2, and I just finished up working on a simple little password reset system for our portal. Use case is basically
user gives email -> user receives email with session key and clicks it -> user inputs new password. I'm just updating the jbp_users table via JDBC (md5sum'ing their new password and inserting it in the table), and I can verify that the new hash is correct, but JBoss Portal seems to be caching the old login info.
My question is, can I force JBoss to forget its cached logins and recheck the database for changes, or is there a better way to do this? This isn't running inside a portlet, so I can't juse use getPortletContext().getAttribute("UserModule") to find a user by username and update their password that way.
Anyway, I'm sure I'm doing it wrong, but any help would be greatly appreciated. Thanks so much!
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/626325#626325]
Start a new discussion in JBoss Web Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 3 months