Party invitation, emails?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Party invitation, emails?

Luca Zago
Hi,
I didn't find any documentation, or notes about the Party Invitation
functionality.
Actually from the code i can see that creating an invitation is just
creating a PartyInvitation record,
and nothing send an email. I thought that it could be a way to invite an
external user to the system.
What is the reason for this such functionality? what is a party invitation?
Probably i didn't get the idea behind it.
thanks in advance,

Luca
Reply | Threaded
Open this post in threaded view
|

Re: Party invitation, emails?

pankaj savita
 Hi Luca,
 For Sending Party Invitation via email you also need to create email
template that you want to send. May be this code could help you.
 First Create your email template...say
D:\workspace\ofbiz\hot-deploy\testproject\templates\email\testEmailTemplate.ftl
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml">
<head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>

<div class="logo"> LOGO HERE... </div>
 </head>
<body>
<p class="tabletext">Simply click the link below to sign up!</p>
 <a
href="${baseUrl}/control/verifyemail?partyInvitationId=${parameters.partyInvitationId}">${baseUrl}/control/verifyemail</a>
 <p class="tabletext">Privacy Policy</p>
</body>
 </html>

Controller entry:
    <request-map uri="createTestInvitation">
        <security https="false" auth="true"/>
        <event type="service" invoke="createTestInvitation"/>
        <response name="success" type="view" value="testInvites"/>
    </request-map>
Service Definition entry:
    <service name="createTestInvitation" engine="simple"
            location="com/invites/TestInviteServices.xml"
invoke="createTestInvitation">
        <attribute name="emailAddress" type="String" mode="IN"
optional="false"/>
        <attribute name="toName" type="String" mode="IN" optional="false"/>
        <attribute name="partyIdFrom" type="String" mode="IN"
optional="false"/>
    </service>
Simple Method entry:
<simple-method method-name="createTestInvitation" short-description="Creates
a Invitation">
        <set field="findPartyCtx.address"
from-field="parameters.emailAddress"/>
        <call-service service-name="findPartyFromEmailAddress"
in-map-name="findPartyCtx">
            <result-to-field result-name="partyId"
field-name="parameters.partyId"/>
        </call-service>
        <if-not-empty field-name="parameters.partyId">
            <entity-one entity-name="PartyRole" value-name="partyRole">
                <field-map field-name="partyId"
env-name="parameters.partyId"/>
                <field-map field-name="roleTypeId" value="TESTTYPE"/><!--
Here plz change ur roletypeid-->
            </entity-one>
        </if-not-empty>
        <if-empty field-name="partyRole">
            <set field="createTestInvitationCtx.partyId"
from-field="parameters.partyId"/>
            <set field="createTestInvitationCtx.partyIdFrom"
from-field="parameters.partyIdFrom"/>
            <set field="createTestInvitationCtx.emailAddress"
from-field="parameters.emailAddress"/>
            <set field="createTestInvitationCtx.toName"
from-field="parameters.toName"/>
            <set field="createTestInvitationCtx.statusId"
value="PARTYINV_SENT"/>
            <call-service service-name="createPartyInvitation"
in-map-name="createTestInvitationCtx">
                <result-to-field result-name="partyInvitationId"
field-name="parameters.partyInvitationId"/>
            </call-service>
            <set field="createPartyInvRoleAssocCtx.partyInvitationId"
from-field="parameters.partyInvitationId"/>
            <set field="createPartyInvRoleAssocCtx.roleTypeId"
value="TESTTYPE"/><!-- Here plz change ur roletypeid-->
            <call-service service-name="createPartyInvitationRoleAssoc"
in-map-name="createPartyInvRoleAssocCtx"/>

            <!-- Send Invitation Email -->
            <entity-and entity-name="ProductStoreEmailSetting"
list-name="productStoreEmailSettings">
                 <field-map field-name="emailType"
value="PRDS_PARTYINV_EMAIL"/>
            </entity-and>
            <first-from-list list-name="productStoreEmailSettings"
entry-name="storeEmail"/>
            <if-not-empty field-name="bodyScreenLocation"
map-name="storeEmail">
                <set field="bodyParameters.partyInvitationId"
from-field="parameters.partyInvitationId"></set>
                <set field="emailParams.sendTo"
from-field="parameters.emailAddress"/>
                <set field="emailParams.subject"
from-field="storeEmail.subject"/>
                <set field="emailParams.sendFrom"
from-field="storeEmail.fromAddress"/>
                <set field="emailParams.sendCc"
from-field="storeEmail.ccAddress"/>
                <set field="emailParams.sendBcc"
from-field="storeEmail.bccAddress"/>
                <set field="emailParams.contentType"
from-field="storeEmail.contentType"/>
                <set field="emailParams.bodyParameters"
from-field="bodyParameters"/>
                <set field="emailParams.bodyScreenUri"
from-field="storeEmail.bodyScreenLocation"/>
                <map-to-map to-map-name="emailParams.bodyParameters"
map-name="bodyParameters"/>
                <call-service-asynch service-name="sendMailFromScreen"
in-map-name="emailParams"/>
            </if-not-empty>
        </if-empty>
    </simple-method>
----
Now do the email settings in general.properties file..
https://cwiki.apache.org/OFBTECH/apache-ofbiz-technical-production-setup-guide.html
 Hope this could help you..

--
Thanks & Regards,
Pankaj Savita
Mob: +91 9890262476
Mail to: [hidden email]

On Mon, Mar 28, 2011 at 8:26 AM, Luca Zago <[hidden email]> wrote:

> Hi,
> I didn't find any documentation, or notes about the Party Invitation
> functionality.
> Actually from the code i can see that creating an invitation is just
> creating a PartyInvitation record,
> and nothing send an email. I thought that it could be a way to invite an
> external user to the system.
> What is the reason for this such functionality? what is a party invitation?
> Probably i didn't get the idea behind it.
> thanks in advance,
>
> Luca
>
Reply | Threaded
Open this post in threaded view
|

Re: Party invitation, emails?

Luca Zago
really thanks a lot!
I supposed i should write some code to make it working, and i imagine, i can
'extend'
in this way the default application, not to re write the screens.  Is it a
bad practice?
One additional question, what is the productStoreEmailSettings you used in
the code,
is it the map where the email configuration settings are stored?

regards,
Luca


On Mon, Mar 28, 2011 at 9:19 AM, pankaj savita <[hidden email]>wrote:

>  Hi Luca,
>  For Sending Party Invitation via email you also need to create email
> template that you want to send. May be this code could help you.
>  First Create your email template...say
>
> D:\workspace\ofbiz\hot-deploy\testproject\templates\email\testEmailTemplate.ftl
>  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
> http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
>  <html xmlns="http://www.w3.org/1999/xhtml">
> <head>
>  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
>
> <div class="logo"> LOGO HERE... </div>
>  </head>
> <body>
> <p class="tabletext">Simply click the link below to sign up!</p>
>  <a
>
> href="${baseUrl}/control/verifyemail?partyInvitationId=${parameters.partyInvitationId}">${baseUrl}/control/verifyemail</a>
>  <p class="tabletext">Privacy Policy</p>
> </body>
>  </html>
>
> Controller entry:
>    <request-map uri="createTestInvitation">
>        <security https="false" auth="true"/>
>        <event type="service" invoke="createTestInvitation"/>
>        <response name="success" type="view" value="testInvites"/>
>    </request-map>
> Service Definition entry:
>    <service name="createTestInvitation" engine="simple"
>            location="com/invites/TestInviteServices.xml"
> invoke="createTestInvitation">
>        <attribute name="emailAddress" type="String" mode="IN"
> optional="false"/>
>        <attribute name="toName" type="String" mode="IN" optional="false"/>
>        <attribute name="partyIdFrom" type="String" mode="IN"
> optional="false"/>
>    </service>
> Simple Method entry:
> <simple-method method-name="createTestInvitation"
> short-description="Creates
> a Invitation">
>        <set field="findPartyCtx.address"
> from-field="parameters.emailAddress"/>
>        <call-service service-name="findPartyFromEmailAddress"
> in-map-name="findPartyCtx">
>            <result-to-field result-name="partyId"
> field-name="parameters.partyId"/>
>        </call-service>
>        <if-not-empty field-name="parameters.partyId">
>            <entity-one entity-name="PartyRole" value-name="partyRole">
>                <field-map field-name="partyId"
> env-name="parameters.partyId"/>
>                <field-map field-name="roleTypeId" value="TESTTYPE"/><!--
> Here plz change ur roletypeid-->
>            </entity-one>
>        </if-not-empty>
>        <if-empty field-name="partyRole">
>            <set field="createTestInvitationCtx.partyId"
> from-field="parameters.partyId"/>
>            <set field="createTestInvitationCtx.partyIdFrom"
> from-field="parameters.partyIdFrom"/>
>            <set field="createTestInvitationCtx.emailAddress"
> from-field="parameters.emailAddress"/>
>            <set field="createTestInvitationCtx.toName"
> from-field="parameters.toName"/>
>            <set field="createTestInvitationCtx.statusId"
> value="PARTYINV_SENT"/>
>            <call-service service-name="createPartyInvitation"
> in-map-name="createTestInvitationCtx">
>                <result-to-field result-name="partyInvitationId"
> field-name="parameters.partyInvitationId"/>
>            </call-service>
>            <set field="createPartyInvRoleAssocCtx.partyInvitationId"
> from-field="parameters.partyInvitationId"/>
>            <set field="createPartyInvRoleAssocCtx.roleTypeId"
> value="TESTTYPE"/><!-- Here plz change ur roletypeid-->
>            <call-service service-name="createPartyInvitationRoleAssoc"
> in-map-name="createPartyInvRoleAssocCtx"/>
>
>            <!-- Send Invitation Email -->
>            <entity-and entity-name="ProductStoreEmailSetting"
> list-name="productStoreEmailSettings">
>                 <field-map field-name="emailType"
> value="PRDS_PARTYINV_EMAIL"/>
>            </entity-and>
>            <first-from-list list-name="productStoreEmailSettings"
> entry-name="storeEmail"/>
>            <if-not-empty field-name="bodyScreenLocation"
> map-name="storeEmail">
>                <set field="bodyParameters.partyInvitationId"
> from-field="parameters.partyInvitationId"></set>
>                <set field="emailParams.sendTo"
> from-field="parameters.emailAddress"/>
>                <set field="emailParams.subject"
> from-field="storeEmail.subject"/>
>                <set field="emailParams.sendFrom"
> from-field="storeEmail.fromAddress"/>
>                <set field="emailParams.sendCc"
> from-field="storeEmail.ccAddress"/>
>                <set field="emailParams.sendBcc"
> from-field="storeEmail.bccAddress"/>
>                <set field="emailParams.contentType"
> from-field="storeEmail.contentType"/>
>                <set field="emailParams.bodyParameters"
> from-field="bodyParameters"/>
>                <set field="emailParams.bodyScreenUri"
> from-field="storeEmail.bodyScreenLocation"/>
>                <map-to-map to-map-name="emailParams.bodyParameters"
> map-name="bodyParameters"/>
>                <call-service-asynch service-name="sendMailFromScreen"
> in-map-name="emailParams"/>
>            </if-not-empty>
>        </if-empty>
>    </simple-method>
> ----
> Now do the email settings in general.properties file..
>
> https://cwiki.apache.org/OFBTECH/apache-ofbiz-technical-production-setup-guide.html
>  Hope this could help you..
>
> --
> Thanks & Regards,
> Pankaj Savita
> Mob: +91 9890262476
> Mail to: [hidden email]
>
> On Mon, Mar 28, 2011 at 8:26 AM, Luca Zago <[hidden email]> wrote:
>
> > Hi,
> > I didn't find any documentation, or notes about the Party Invitation
> > functionality.
> > Actually from the code i can see that creating an invitation is just
> > creating a PartyInvitation record,
> > and nothing send an email. I thought that it could be a way to invite an
> > external user to the system.
> > What is the reason for this such functionality? what is a party
> invitation?
> > Probably i didn't get the idea behind it.
> > thanks in advance,
> >
> > Luca
> >
>



--
Inviato da Commodore 64
Reply | Threaded
Open this post in threaded view
|

Re: Party invitation, emails?

pankaj savita
Yes  Luca you can customize it using OFBiz. Its all there in OFBiz.

Sorry I missed to mention this....

Basically *ProductStorePaymentSetting *is an Entity that stores information
and some configuration settings needed to send mail. Based on productStoreId
and emailType we fetch all this informations.



FYI all other configuration settings to send mail done in general.properties
file.

You need to prepare demo store data for that first.

Reffer : ofbiz-10.04\specialpurpose\ecommerce\data\DemoProduct.xml



To load demo data you also need to do entry in your ofbiz-component.xml

<entity-resource type="data" reader-name="demo" loader="main"
location="data/DemoProduct.xml"/>



If you want you can also write Event in java to send mail : Reffer *
tellAFriend* event in
ofbiz-10.04\applications\product\src\org\ofbiz\product\product\ProductEvent.java



You can study *sendMailFromScreen* Service in EmailServices class

ofbiz-10.04\framework\common\src\org\ofbiz\common\email\EmailServices.java



--
Thanks & Regards,
Pankaj Savita
Mob: +91 9890262476
Mail to: [hidden email]



On Mon, Mar 28, 2011 at 8:54 PM, Luca Zago <[hidden email]> wrote:

> really thanks a lot!
> I supposed i should write some code to make it working, and i imagine, i
> can 'extend'
> in this way the default application, not to re write the screens.  Is it a
> bad practice?
> One additional question, what is the productStoreEmailSettings you used in
> the code,
> is it the map where the email configuration settings are stored?
>
> regards,
> Luca
>
>
> On Mon, Mar 28, 2011 at 9:19 AM, pankaj savita <[hidden email]>wrote:
>
>>  Hi Luca,
>>  For Sending Party Invitation via email you also need to create email
>> template that you want to send. May be this code could help you.
>>  First Create your email template...say
>>
>> D:\workspace\ofbiz\hot-deploy\testproject\templates\email\testEmailTemplate.ftl
>>  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
>> http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
>>  <html xmlns="http://www.w3.org/1999/xhtml">
>> <head>
>>  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
>>
>> <div class="logo"> LOGO HERE... </div>
>>  </head>
>> <body>
>> <p class="tabletext">Simply click the link below to sign up!</p>
>>  <a
>>
>> href="${baseUrl}/control/verifyemail?partyInvitationId=${parameters.partyInvitationId}">${baseUrl}/control/verifyemail</a>
>>  <p class="tabletext">Privacy Policy</p>
>> </body>
>>  </html>
>>
>> Controller entry:
>>    <request-map uri="createTestInvitation">
>>        <security https="false" auth="true"/>
>>        <event type="service" invoke="createTestInvitation"/>
>>        <response name="success" type="view" value="testInvites"/>
>>    </request-map>
>> Service Definition entry:
>>    <service name="createTestInvitation" engine="simple"
>>            location="com/invites/TestInviteServices.xml"
>> invoke="createTestInvitation">
>>        <attribute name="emailAddress" type="String" mode="IN"
>> optional="false"/>
>>        <attribute name="toName" type="String" mode="IN" optional="false"/>
>>        <attribute name="partyIdFrom" type="String" mode="IN"
>> optional="false"/>
>>    </service>
>> Simple Method entry:
>> <simple-method method-name="createTestInvitation"
>> short-description="Creates
>> a Invitation">
>>        <set field="findPartyCtx.address"
>> from-field="parameters.emailAddress"/>
>>        <call-service service-name="findPartyFromEmailAddress"
>> in-map-name="findPartyCtx">
>>            <result-to-field result-name="partyId"
>> field-name="parameters.partyId"/>
>>        </call-service>
>>        <if-not-empty field-name="parameters.partyId">
>>            <entity-one entity-name="PartyRole" value-name="partyRole">
>>                <field-map field-name="partyId"
>> env-name="parameters.partyId"/>
>>                <field-map field-name="roleTypeId" value="TESTTYPE"/><!--
>> Here plz change ur roletypeid-->
>>            </entity-one>
>>        </if-not-empty>
>>        <if-empty field-name="partyRole">
>>            <set field="createTestInvitationCtx.partyId"
>> from-field="parameters.partyId"/>
>>            <set field="createTestInvitationCtx.partyIdFrom"
>> from-field="parameters.partyIdFrom"/>
>>            <set field="createTestInvitationCtx.emailAddress"
>> from-field="parameters.emailAddress"/>
>>            <set field="createTestInvitationCtx.toName"
>> from-field="parameters.toName"/>
>>            <set field="createTestInvitationCtx.statusId"
>> value="PARTYINV_SENT"/>
>>            <call-service service-name="createPartyInvitation"
>> in-map-name="createTestInvitationCtx">
>>                <result-to-field result-name="partyInvitationId"
>> field-name="parameters.partyInvitationId"/>
>>            </call-service>
>>            <set field="createPartyInvRoleAssocCtx.partyInvitationId"
>> from-field="parameters.partyInvitationId"/>
>>            <set field="createPartyInvRoleAssocCtx.roleTypeId"
>> value="TESTTYPE"/><!-- Here plz change ur roletypeid-->
>>            <call-service service-name="createPartyInvitationRoleAssoc"
>> in-map-name="createPartyInvRoleAssocCtx"/>
>>
>>            <!-- Send Invitation Email -->
>>            <entity-and entity-name="ProductStoreEmailSetting"
>> list-name="productStoreEmailSettings">
>>                 <field-map field-name="emailType"
>> value="PRDS_PARTYINV_EMAIL"/>
>>            </entity-and>
>>            <first-from-list list-name="productStoreEmailSettings"
>> entry-name="storeEmail"/>
>>            <if-not-empty field-name="bodyScreenLocation"
>> map-name="storeEmail">
>>                <set field="bodyParameters.partyInvitationId"
>> from-field="parameters.partyInvitationId"></set>
>>                <set field="emailParams.sendTo"
>> from-field="parameters.emailAddress"/>
>>                <set field="emailParams.subject"
>> from-field="storeEmail.subject"/>
>>                <set field="emailParams.sendFrom"
>> from-field="storeEmail.fromAddress"/>
>>                <set field="emailParams.sendCc"
>> from-field="storeEmail.ccAddress"/>
>>                <set field="emailParams.sendBcc"
>> from-field="storeEmail.bccAddress"/>
>>                <set field="emailParams.contentType"
>> from-field="storeEmail.contentType"/>
>>                <set field="emailParams.bodyParameters"
>> from-field="bodyParameters"/>
>>                <set field="emailParams.bodyScreenUri"
>> from-field="storeEmail.bodyScreenLocation"/>
>>                <map-to-map to-map-name="emailParams.bodyParameters"
>> map-name="bodyParameters"/>
>>                <call-service-asynch service-name="sendMailFromScreen"
>> in-map-name="emailParams"/>
>>            </if-not-empty>
>>        </if-empty>
>>    </simple-method>
>> ----
>> Now do the email settings in general.properties file..
>>
>> https://cwiki.apache.org/OFBTECH/apache-ofbiz-technical-production-setup-guide.html
>>  Hope this could help you..
>>
>> --
>> Thanks & Regards,
>> Pankaj Savita
>> Mob: +91 9890262476
>> Mail to: [hidden email]
>>
>> On Mon, Mar 28, 2011 at 8:26 AM, Luca Zago <[hidden email]> wrote:
>>
>> > Hi,
>> > I didn't find any documentation, or notes about the Party Invitation
>> > functionality.
>> > Actually from the code i can see that creating an invitation is just
>> > creating a PartyInvitation record,
>> > and nothing send an email. I thought that it could be a way to invite an
>> > external user to the system.
>> > What is the reason for this such functionality? what is a party
>> invitation?
>> > Probably i didn't get the idea behind it.
>> > thanks in advance,
>> >
>> > Luca
>> >
>>
>
>
>
> --
> Inviato da Commodore 64
>



--
Thanks & Regards,
Pankaj Savita
Mob: +91 9890262476
Mail to: [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Party invitation, emails?

Luca Zago
Again thanks a lot, for your help.
I succeeded in sending invitation email! it works fine.
It's a bit tricky because ProductStoreEmailSetting is something related to
ecommerce webapp, so i was confused since we are talking about the back-end
party app, but anyway i read in the mailing list, and developers want to
move this logic for email settings to some common component.
a last question, the url you specify in the template email example, point to
a service which doesn't exist actually and should be implemented,
correct? Thanks again.

Best Regards,

Luca


On Mon, Mar 28, 2011 at 11:02 PM, pankaj savita <[hidden email]>wrote:

> Yes  Luca you can customize it using OFBiz. Its all there in OFBiz.
>
> Sorry I missed to mention this....
>
> Basically *ProductStorePaymentSetting *is an Entity that stores
> information and some configuration settings needed to send mail. Based on
> productStoreId and emailType we fetch all this informations.
>
>
>
> FYI all other configuration settings to send mail done in
> general.properties file.
>
> You need to prepare demo store data for that first.
>
> Reffer : ofbiz-10.04\specialpurpose\ecommerce\data\DemoProduct.xml
>
>
>
> To load demo data you also need to do entry in your ofbiz-component.xml
>
> <entity-resource type="data" reader-name="demo" loader="main"
> location="data/DemoProduct.xml"/>
>
>
>
> If you want you can also write Event in java to send mail : Reffer *
> tellAFriend* event in
> ofbiz-10.04\applications\product\src\org\ofbiz\product\product\ProductEvent.java
>
>
>
> You can study *sendMailFromScreen* Service in EmailServices class
>
> ofbiz-10.04\framework\common\src\org\ofbiz\common\email\EmailServices.java
>
>
>
> --
>
> Thanks & Regards,
> Pankaj Savita
> Mob: +91 9890262476
> Mail to: [hidden email]
>
>
>
> On Mon, Mar 28, 2011 at 8:54 PM, Luca Zago <[hidden email]> wrote:
>
>> really thanks a lot!
>> I supposed i should write some code to make it working, and i imagine, i
>> can 'extend'
>> in this way the default application, not to re write the screens.  Is it a
>> bad practice?
>> One additional question, what is the productStoreEmailSettings you used in
>> the code,
>> is it the map where the email configuration settings are stored?
>>
>> regards,
>> Luca
>>
>>
>> On Mon, Mar 28, 2011 at 9:19 AM, pankaj savita <[hidden email]>wrote:
>>
>>>  Hi Luca,
>>>  For Sending Party Invitation via email you also need to create email
>>> template that you want to send. May be this code could help you.
>>>  First Create your email template...say
>>>
>>> D:\workspace\ofbiz\hot-deploy\testproject\templates\email\testEmailTemplate.ftl
>>>  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
>>> http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
>>>  <html xmlns="http://www.w3.org/1999/xhtml">
>>> <head>
>>>  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
>>>
>>> <div class="logo"> LOGO HERE... </div>
>>>  </head>
>>> <body>
>>> <p class="tabletext">Simply click the link below to sign up!</p>
>>>  <a
>>>
>>> href="${baseUrl}/control/verifyemail?partyInvitationId=${parameters.partyInvitationId}">${baseUrl}/control/verifyemail</a>
>>>  <p class="tabletext">Privacy Policy</p>
>>> </body>
>>>  </html>
>>>
>>> Controller entry:
>>>    <request-map uri="createTestInvitation">
>>>        <security https="false" auth="true"/>
>>>        <event type="service" invoke="createTestInvitation"/>
>>>        <response name="success" type="view" value="testInvites"/>
>>>    </request-map>
>>> Service Definition entry:
>>>    <service name="createTestInvitation" engine="simple"
>>>            location="com/invites/TestInviteServices.xml"
>>> invoke="createTestInvitation">
>>>        <attribute name="emailAddress" type="String" mode="IN"
>>> optional="false"/>
>>>        <attribute name="toName" type="String" mode="IN"
>>> optional="false"/>
>>>        <attribute name="partyIdFrom" type="String" mode="IN"
>>> optional="false"/>
>>>    </service>
>>> Simple Method entry:
>>> <simple-method method-name="createTestInvitation"
>>> short-description="Creates
>>> a Invitation">
>>>        <set field="findPartyCtx.address"
>>> from-field="parameters.emailAddress"/>
>>>        <call-service service-name="findPartyFromEmailAddress"
>>> in-map-name="findPartyCtx">
>>>            <result-to-field result-name="partyId"
>>> field-name="parameters.partyId"/>
>>>        </call-service>
>>>        <if-not-empty field-name="parameters.partyId">
>>>            <entity-one entity-name="PartyRole" value-name="partyRole">
>>>                <field-map field-name="partyId"
>>> env-name="parameters.partyId"/>
>>>                <field-map field-name="roleTypeId" value="TESTTYPE"/><!--
>>> Here plz change ur roletypeid-->
>>>            </entity-one>
>>>        </if-not-empty>
>>>        <if-empty field-name="partyRole">
>>>            <set field="createTestInvitationCtx.partyId"
>>> from-field="parameters.partyId"/>
>>>            <set field="createTestInvitationCtx.partyIdFrom"
>>> from-field="parameters.partyIdFrom"/>
>>>            <set field="createTestInvitationCtx.emailAddress"
>>> from-field="parameters.emailAddress"/>
>>>            <set field="createTestInvitationCtx.toName"
>>> from-field="parameters.toName"/>
>>>            <set field="createTestInvitationCtx.statusId"
>>> value="PARTYINV_SENT"/>
>>>            <call-service service-name="createPartyInvitation"
>>> in-map-name="createTestInvitationCtx">
>>>                <result-to-field result-name="partyInvitationId"
>>> field-name="parameters.partyInvitationId"/>
>>>            </call-service>
>>>            <set field="createPartyInvRoleAssocCtx.partyInvitationId"
>>> from-field="parameters.partyInvitationId"/>
>>>            <set field="createPartyInvRoleAssocCtx.roleTypeId"
>>> value="TESTTYPE"/><!-- Here plz change ur roletypeid-->
>>>            <call-service service-name="createPartyInvitationRoleAssoc"
>>> in-map-name="createPartyInvRoleAssocCtx"/>
>>>
>>>            <!-- Send Invitation Email -->
>>>            <entity-and entity-name="ProductStoreEmailSetting"
>>> list-name="productStoreEmailSettings">
>>>                 <field-map field-name="emailType"
>>> value="PRDS_PARTYINV_EMAIL"/>
>>>            </entity-and>
>>>            <first-from-list list-name="productStoreEmailSettings"
>>> entry-name="storeEmail"/>
>>>            <if-not-empty field-name="bodyScreenLocation"
>>> map-name="storeEmail">
>>>                <set field="bodyParameters.partyInvitationId"
>>> from-field="parameters.partyInvitationId"></set>
>>>                <set field="emailParams.sendTo"
>>> from-field="parameters.emailAddress"/>
>>>                <set field="emailParams.subject"
>>> from-field="storeEmail.subject"/>
>>>                <set field="emailParams.sendFrom"
>>> from-field="storeEmail.fromAddress"/>
>>>                <set field="emailParams.sendCc"
>>> from-field="storeEmail.ccAddress"/>
>>>                <set field="emailParams.sendBcc"
>>> from-field="storeEmail.bccAddress"/>
>>>                <set field="emailParams.contentType"
>>> from-field="storeEmail.contentType"/>
>>>                <set field="emailParams.bodyParameters"
>>> from-field="bodyParameters"/>
>>>                <set field="emailParams.bodyScreenUri"
>>> from-field="storeEmail.bodyScreenLocation"/>
>>>                <map-to-map to-map-name="emailParams.bodyParameters"
>>> map-name="bodyParameters"/>
>>>                <call-service-asynch service-name="sendMailFromScreen"
>>> in-map-name="emailParams"/>
>>>            </if-not-empty>
>>>        </if-empty>
>>>    </simple-method>
>>> ----
>>> Now do the email settings in general.properties file..
>>>
>>> https://cwiki.apache.org/OFBTECH/apache-ofbiz-technical-production-setup-guide.html
>>>  Hope this could help you..
>>>
>>> --
>>> Thanks & Regards,
>>> Pankaj Savita
>>> Mob: +91 9890262476
>>> Mail to: [hidden email]
>>>
>>> On Mon, Mar 28, 2011 at 8:26 AM, Luca Zago <[hidden email]> wrote:
>>>
>>> > Hi,
>>> > I didn't find any documentation, or notes about the Party Invitation
>>> > functionality.
>>> > Actually from the code i can see that creating an invitation is just
>>> > creating a PartyInvitation record,
>>> > and nothing send an email. I thought that it could be a way to invite
>>> an
>>> > external user to the system.
>>> > What is the reason for this such functionality? what is a party
>>> invitation?
>>> > Probably i didn't get the idea behind it.
>>> > thanks in advance,
>>> >
>>> > Luca
>>> >
>>>
>>
>>
>>
>> --
>> Inviato da Commodore 64
>>
>
>
>
> --
> Thanks & Regards,
> Pankaj Savita
> Mob: +91 9890262476
> Mail to: [hidden email]
>



--
Inviato da Commodore 64