Foros de discusión

Email Notification Using Activiti plugin

thumbnail
Danial Habibi, modificado hace 12 años.

Email Notification Using Activiti plugin

Regular Member Mensajes: 141 Fecha de incorporación: 1/11/11 Mensajes recientes
Hi There , I'm trying to use my workflow definition to send email notification, I've done it when I'm using Kaleo
like this ,
 <task>
        <name>ADMIN_REVIEW</name>
       <actions>
           <notification>
               <name>ADMIN_REVIEW</name>
               <description>TASK ADMIN REVIEW</description>
                <execution-type>onAssignment</execution-type>
                <template>TES DONG</template>
                <template-language>text</template-language>
                <notification-type>email</notification-type>
                <recipients>
                    yogifahmihakimi@gmail.com
                </recipients>
            </notification>
        </actions></task>
   


how i can send email using activiti plugin workflow??which part i must Modified in task definition??and where after i'm modified my definition xml, which class i should modified?and how ??
I've managed to send email using this
<servicetask id="sendMail" activiti:type="mail">
  <extensionelements>
    <activiti:field name="from" stringValue="danztensai@gmail.com" />
    <activiti:field name="to" expression="anggam2000@yahoo.com" />
    <activiti:field name="subject" expression="Your order YE has been shipped" />
    <activiti:field name="html">
      <activiti:expression>
        
          &lt;html&gt;
            &lt;body&gt;
             TESSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSs
              TheCompany.
            &lt;/body&gt;
          &lt;/html&gt;
        
      </activiti:expression>
    </activiti:field>      
  </extensionelements>
</servicetask>     

in my xml definition, but it still static,, i want to dynamically input the values,,how to do that?
thanks
sorry for my bad english,,hope u can understant my problem,,,
Thank's

regards,

Danial
Joaquin Bertet, modificado hace 10 años.

RE: Email Notification Using Activiti plugin

New Member Mensajes: 4 Fecha de incorporación: 15/03/13 Mensajes recientes
Hi there

Did you solve the problem at last. I am trying to do the same thing, just a task to send an e-mail, but the problem is that when I set it up to the documents and settings porlet, it sends the e-mail, but let the document in pending state, without being able to pass it to approved.

Thanks in advance.
Joaquin
thumbnail
tinu c p, modificado hace 10 años.

RE: Email Notification Using Activiti plugin

Junior Member Mensajes: 78 Fecha de incorporación: 7/01/10 Mensajes recientes
Hi,

I have enable workflow for web content using activity liferay web war & created workflow definition to enable to single approver flow which is working fine along with mail notification but just with hard coded values for mail.

I need to have dynamic values in service task for email to include values from workFlowContext and user's email
1. In email from field I need to get email id of user assigned in specific role
2. In email body display comment which was added by approval which I think its available in workflowContext but I am unable to use it in service task as it throws error.

<servicetask id="mailtask1" name="Send Mail Notification" activiti:type="mail">
	       <extensionelements>
	       	<activiti:field name="from" expression="test@liferay.com"></activiti:field>
	         <activiti:field name="to" expression="[b]admin@liferay.com[/b]"></activiti:field>
	         <activiti:field name="subject" expression="Asset Review"></activiti:field>
	         <activiti:field name="html">
	           <activiti:expression>
	           				&lt;html&gt;&lt;body&gt;
					            	 User has submitted webcontent
				           		 	${serviceContext.getAttribute("articleURL")
								    &lt;p&gt;
                                                                    [b]${workflowContext}[/b]
									   	Please review the webcontent waiting for you in your workflow tasks.
									   &lt;br /&gt;Assignment comment says:[b] $(taskComment)[/b] &lt;strong&gt;
									&lt;/p&gt;
								    &lt;!-- signature --&gt;
								   	&lt;p&gt;Sincerely,&lt;br /&gt;&lt;strong&gt;Asset Reviewer&lt;/strong&gt;&lt;/p&gt;
							   &lt;/body&gt;&lt;/html&gt;
			           
			           	
	           </activiti:expression>
	         </activiti:field>
	       </extensionelements>
	</servicetask>


Can you please give some input I am sure you would have come across such needs.

awaiting for your response.


Thanks,