Email Activity Creation Problem

I m new in MS Dynamic CRM 2013. I m trying to make a email activity on the update of a issue (case). but I m getting error at:
 CreateResponse resp = (CreateResponse)slos.Execute(reqActivity);
I m attaching the whole code here:
// <copyright file="PostIssueUpdate.cs" company="">
// Copyright (c) 2015 All Rights Reserved
// </copyright>
// <author></author>
// <date>1/29/2015 2:37:35 PM</date>
// <summary>Implements the PostIssueUpdate Plugin.</summary>
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.1
// </auto-generated>
namespace CrmVSSolution1.Plugins
using System;
using System.ServiceModel;
using Microsoft.Xrm.Sdk;
using System.ServiceModel.Description;
using System.Text;
using System.Collections.Generic;
using System.Linq;
// These namespaces are found in the Microsoft.Xrm.Sdk.dll assembly
// found in the SDK\bin folder.
using Microsoft.Xrm.Sdk.Query;
using Microsoft.Xrm.Sdk.Discovery;
using Microsoft.Xrm.Sdk.Messages;
using Microsoft.Xrm.Sdk.Client;
using Microsoft.Crm.Sdk.Messages;
/// <summary>
/// PostIssueUpdate Plugin.
/// Fires when the following attributes are updated:
/// All Attributes
/// </summary>
public class PostIssueUpdate: Plugin
/// <summary>
/// Initializes a new instance of the <see cref="PostIssueUpdate"/> class.
/// </summary>
public PostIssueUpdate()
: base(typeof(PostIssueUpdate))
base.RegisteredEvents.Add(new Tuple<int, string, string, Action<LocalPluginContext>>(40, "Update", "incident", new Action<LocalPluginContext>(ExecutePostIssueUpdate)));
// Note : you can register for more events here if this plugin is not specific to an individual entity and message combination.
// You may also need to update your RegisterFile.crmregister plug-in registration file to reflect any change.
/// <summary>
/// Executes the plug-in.
/// </summary>
/// <param name="localContext">The <see cref="LocalPluginContext"/> which contains the
/// <see cref="IPluginExecutionContext"/>,
/// <see cref="IOrganizationService"/>
/// and <see cref="ITracingService"/>
/// </param>
/// <remarks>
/// For improved performance, Microsoft Dynamics CRM caches plug-in instances.
/// The plug-in's Execute method should be written to be stateless as the constructor
/// is not called for every invocation of the plug-in. Also, multiple system threads
/// could execute the plug-in at the same time. All per invocation state information
/// is stored in the context. This means that you should not use global variables in plug-ins.
/// </remarks>
protected void ExecutePostIssueUpdate(LocalPluginContext localContext)
if (localContext == null)
throw new ArgumentNullException("localContext");
// TODO: Implement your custom Plug-in business logic.
IPluginExecutionContext context = localContext.PluginExecutionContext;
IOrganizationService service = localContext.OrganizationService;
if (context.InputParameters.Contains("Target") &&
context.InputParameters["Target"] is Entity)
// Obtain the target entity from the input parmameters.
Entity entity = (Entity)context.InputParameters["Target"];
if (entity.LogicalName == "incident")
string entityDescription = "There is no note found";
try
if (entity.Attributes.Contains(""))
entity.Attributes["description"] = entityDescription;
CreateRequest reqActivity = new CreateRequest();
Entity newEmail = new Entity("email");
newEmail["subject"] = "This is for testing";
newEmail["description"] = entityDescription;
Entity ap = new Entity();
Entity ap2 = new Entity();
ap = new Entity("activityparty");
ap["addressused"] = "[email protected]";
Entity[] aryTo = { ap };
newEmail["to"] = aryTo;
ap2 = new Entity("activityparty");
ap2["partyid"] = new EntityReference("systemuser", new Guid(""));
Entity[] aryFrom = { ap2 };
newEmail["from"] = aryFrom;
newEmail["regardingobjectid"] = new EntityReference("account", new Guid(""));
reqActivity.Target = newEmail;
CreateResponse resp = (CreateResponse)slos.Execute(reqActivity);
catch (FaultException ex)
throw new InvalidPluginExecutionException("An error occurred in the plug-in.", ex);

Hello,
Could you please point to the part of your code where you have declared "slos"? I rechecked it twice and I see nothing. Also could you please provide an exception message that you are getting?
Dynamics CRM MVP/ Technical Evangelist at
SlickData LLC
My blog

Similar Messages

  • Problem with Email Activity in BPEL

    I am relatively new to BPEL, and I'm trying to add an Email Activity. My problem is this:
    I can get the email to send, but I have to shut down the SOA Suite to make that happen.
    Any ideas on what could be causing this?
    Any help in this matter would be greatly appreciated.
    Thanks...

    Yes. The messages do seem to be all accumulating until the shutdown until the suite is shut down.
    I'm just beginning to play around with the Email activity, so I'm hard-coding all the parameters. We're currently using SOA Suite 10.1.3.1. I'm not using any attachments in the email, however, it seems that I can't turn the multi-part check box off. I un-check it, and apply, but when I go back into that screen, it's checked again.
    Here's the code for the email activity:
    <scope name="Email_1">
    <bpelx:annotation>
    <bpelx:pattern patternName="bpelx:email"></bpelx:pattern>
    </bpelx:annotation>
    <variables>
    <variable name="varNotificationReq"
    messageType="ns1:EmailNotificationRequest"/>
    <variable name="varNotificationResponse"
    messageType="ns1:ArrayOfResponse"/>
    <variable name="NotificationServiceFaultVariable"
    messageType="ns1:NotificationServiceErrorMessage"/>
    </variables>
    <sequence name="Sequence_1">
    <assign name="EmailParamsAssign">
    <copy>
    <from expression="string('Default')"/>
    <to variable="varNotificationReq" part="EmailPayload"
    query="/EmailPayload/ns1:FromAccountName"/>
    </copy>
    <copy>
    <from expression="string('')"/>
    <to variable="varNotificationReq" part="EmailPayload"
    query="/EmailPayload/ns1:Bcc"/>
    </copy>
    <copy>
    <from expression="string('')"/>
    <to variable="varNotificationReq" part="EmailPayload"
    query="/EmailPayload/ns1:Cc"/>
    </copy>
    <copy>
    <from expression="string('')"/>
    <to variable="varNotificationReq" part="EmailPayload"
    query="/EmailPayload/ns1:ReplyToAddress"/>
    </copy>
    <copy>
    <from expression="string('Testing BPEL Email Activity')"/>
    <to variable="varNotificationReq" part="EmailPayload"
    query="/EmailPayload/ns1:Subject"/>
    </copy>
    <copy>
    <from expression="string('[email protected]')"/>
    <to variable="varNotificationReq" part="EmailPayload"
    query="/EmailPayload/ns1:To"/>
    </copy>
    <copy>
    <from expression="string('Test')"/>
    <to variable="varNotificationReq" part="EmailPayload"
    query="/EmailPayload/ns1:Content/ns1:ContentBody"/>
    </copy>
    <copy>
    <from expression="string('text/html; charset=UTF-8')"/>
    <to variable="varNotificationReq" part="EmailPayload"
    query="/EmailPayload/ns1:Content/ns1:MimeType"/>
    </copy>
    </assign>
    <invoke name="InvokeNotificationService"
    partnerLink="NotificationService"
    portType="ns1:NotificationService"
    operation="sendEmailNotification"
    inputVariable="varNotificationReq"
    outputVariable="varNotificationResponse"/>
    </sequence>
    </scope>
    Thanks for your continued help.

  • Email Activity not sending emails for one domain - 10.1.3.4 MLR#10

    I have four domains in my BPELConsole. My evey BPEL process has CatchAll block and I'm sending email notification with fault details.
    Somehow, my BPEL processes from three domains are sending emails properly but myDomain4 is not sending emails even after successful execution of Email Activity.
    1) I have compared the Email code with processes in other domain and they are similar.
    2) orabpel.bpelnotification is not logging any error for this notification.
    3) I never received any email from this domain. There was no error in logs during domain creation.
    3) I am getting following in logs that sending email was successfully executed. It received Notification ID too
    <2010-09-22 07:24:44,530> <DEBUG> <myDomain4.collaxa.cube.services> <oracle.bpel.services.notification.queue.QueueConnectionPool::QueueConnectionPool> Fetched a queue connection from pool java:comp/env/jms/Queue/NotificationSenderQueueConnectionFactory, available connections=4
    <2010-09-22 07:24:44,534> <DEBUG> <myDomain4.collaxa.cube.services> <oracle.bpel.services.notification.queue.sender.Publisher::init> Start of send(type,caller,message) type = email caller = BPEL
    <2010-09-22 07:24:44,534> <DEBUG> <myDomain4.collaxa.cube.services> <oracle.bpel.services.notification.queue.sender.Publisher::init> Notification ID 12834c63e81c20d0:-71064af1:42b35e5dab4:-7283
    Please help/hint for any possible solution/debugging.

    sometimes i have seen emails not being sent when the async invokes takes more time than the overall completion.. And yes, we might still see successful log as emails sent. FYI - I am with 10.1.3.3.1 MLR #8.
    did you try just creating a email only process? switch off all other processes in that domain and initiate only this email process to see what happens..

  • Variable passing to an email activity

    Hi,
    In my simple process flow I have:
    START--------TRANSFORMATION (procedure call)--------EMAIL ACTIVITY--------END
    My procedure has an output parameter (which consists of an email address).
    In the transformation, the output parameter is passed into a variable VAR1.
    In my EMAIL activity, the TO_ADDRESS parameter is assigned VAR1.
    My problem is, when I validate the processflow it comes up with the error:
    "VLD-10034: Parameter TO_ADDRESS is bound to variable VAR1, but VAR1 has no default value set. For a processflow to be valid the bound parameter or variable should have a default value."
    So I assigned the variable VAR1 a default value (I entered a valid email address), the processflow validates successfully, but when I run it, it fails with an error.
    It's the variable that's causing a problem as when I hard-code an email address in the TO_ADDRESS parameter it runs without a problem.
    Do you have any ideas why the variable is failing when a default value is set?
    Thanks for any replies
    Ansel

    Hi Armands
    I managed to sort this one out.
    I stripped out the transformation from the processflow to simplify it as much as possible.
    So I had:
    START-------- EMAIL ACTIVITY--------END
    The problem was where it was forcing me to enter a default value for the variable VAR1 (where VAR1 was assigned to the TO_ADDRESS parameter in the email activity).
    I entered an email address as the default value in VAR1, and it failed. So I changed the value to 'aaa', and it failed.
    But it DIDN'T fail when I entered '1' (even though the variable is of a string type).
    So it's working now.
    Thank you for taking the time to try to understand my problem.
    Ansel

  • Automatic Partner Determination Std Contact Person during Activity Creation

    Hi ,
    There is a requirement in my project where the Standard Contact Person of the Sold to Party  should be automatically determined during Activity Creation .I have completed the Partner Function configurations and now the Standard Contact Person is  being successfully determined as the Partner.
    However, there is a problem in a scenario where in another Contact Person other than the Standard Contact Person is to be determined during Activity Creation . In that case, the option to select the other Person is not being offered through a pop up window, but the System automatically populates the next Contact Person based on the BP Id ( Next on the Number Range )
    Is there any way , so that the normal procedure of selecting one Contact Person from a list in the Pop Window can be incorporated , once the standard Contact Person is being removed from the Contact Person field in the Business Transaction .
    << Moderator message - Please do not promise points >>
    Regards,
    Maroof
    Edited by: Rob Burbank on Jan 5, 2011 5:06 PM

    Hello Maroof,
    you should check first the standard relationship flag of the account. Means check the account and go to the
    relationship contact person.
    There you will find the standard Relationship Flag, which is relevant for the system to determine the main CP.
    Furthermore please check the partner procedure:
    For each partner function you can enter a value in field Maximum and Selection Limit. Please consider the F1 help
    for the field Selection Limit where you can find the explanation when and how the selection popup is triggered:
    Example 1
    You enter 3 in this field.
    When the system finds three or more partners who could fulfill this partner function, it displays a selection list.
    You choose from the list which partners to enter in the transaction.
    Example 2
    You do not mark this field, but enter 5 as the Maximum for this partner function.
    When the system finds six or more appropriate partners it displays a selection list.
    Hopefully this information helps you.
    Regards
    Rene

  • How to edit the value in the email activity in process flow

    I have an email activity in my process flow.
    I want to change the value for the message body of the email activity. But it is not editable. While creation all the columns are in editable mode and after deploying and testing, i want to change the body of the email to be sent.
    How can i do it now? Please advice. This issue is in 6.0.4 release.
    Edited by: 910070 on Feb 17, 2012 12:48 AM

    got the solution after so much research !
    in 6.0.4, only way we can change the value for the message body or subject is to change the associate email procedure. which is something like edx_rpt_email.

  • No options for internet email activation

    I'm very new to bb phones, so I'm hoping if someone can help me with this problem. I do know that 9360 requires a bb plan + 3g plan to be able to surf the net and stuffs. As of now, I do not have any problems with those but I just can't find the option to set up my internet email. Can anyone help me? Whenever i go to the set up email option, it automatically shows me an enterprise email activation. 
    PS: Sorry if someone already posted such a thread before. 

    I suggest the following steps, in order, even if they seem redundant to what you have already tried (steps 1 and 2 each should result in a message coming to your BB...please wait for that before proceeding to the next step):
    1) Register HRT
    KB00510 How to register a BlackBerry smartphone with the wireless network
    2) Delete and Resend Service Books
    KB05000Delete the service book for the BlackBerry Internet Service email account from the BlackBerry smartphone
    KB02830 Send the service books for the BlackBerry Internet Service
    3) Batt Pull Reboot
    Anytime random strange behavior or sluggishness creeps in, the first thing to do is a battery pop reboot. With power ON, remove the back cover and pull out the battery. Wait about a minute then replace the battery and cover. Power up and wait patiently through the long reboot -- ~5 minutes. See if things have returned to good operation. Like all computing devices, BB's suffer from memory leaks and such...with a hard reboot being the best cure.
    Hopefully that will get things going again for you! If not, then you can try, from your BB browser, this link:
    www.blackberry.com/integrate
    That may allow you to configure it. Otherwise, you need to work with your mobile service provider as they are responsible for delivering ALL of your services and providing ALL of your formal support.
    Good luck!
    Occam's Razor nearly always applies when troubleshooting technology issues!
    If anyone has been helpful to you, please show your appreciation by clicking the button inside of their post. Please click here and read, along with the threads to which it links, for helpful information to guide you as you proceed. I always recommend that you treat your BlackBerry like any other computing device, including using a regular backup schedule...click here for an article with instructions.
    Join our BBM Channels
    BSCF General Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • I need help with an email WiFi sending problem on my iPad 2

    I’m having an email WiFi sending problem on my iPad 2     Model:  MC774C/A;  IOS VERSION: 6.1.3 (10B329). 
    While I use 4 email accounts on the iPad -- Hotmail, Gmail, iCloud and ns.sympatico.ca ( a division of BellAliant) – the sending difficulty only relates to the ns.sympatico.ca.  The settings for this account are:         pop.bellaliant.net            and      smtp.bellaliant.net
    I first noticed the problem about 3 weeks ago while travelling across the country (Canada).  (I do recall about that time there was an update of my IOS and I also for my wife purchased from the Bell store an iPhone which shares my Apple account.)  Prior to that everything worked well for a couple of years.
    I noticed earlier this month that the iPad received mail fine but would not send at night using the motels’ WiFi.  During the day, using my 3G account, all worked fine.  I phoned Bell but was told that my experience was normal so I thought no more about it until I returned home and found the same problem at the house.  I called Bell again and worked for 2 hours with 3 Bell technicians who succeeded in getting the iPad to neither send nor receive and gave up advising me to take the iPad into a Bell store to have it looked at.  I did that and the young technician got the iPad sending and receiving by changing the        smtp.bellaliant.net      to         mail.1xbell.ca
    However, when I returned home again, I realized that it was working on my 3G and still doesn’t send on my WiFi
    I’m looking for any suggestions that might solve this annoying problem?

    iOS: Unable to send or receive email
    http://support.apple.com/kb/TS3899
    Can’t Send Emails on iPad – Troubleshooting Steps
    http://ipadhelp.com/ipad-help/ipad-cant-send-emails-troubleshooting-steps/
    Setting up and troubleshooting Mail
    http://www.apple.com/support/ipad/assistant/mail/
    Server does not allow relaying email error, fix
    http://appletoolbox.com/2012/01/server-does-not-allow-relaying-email-error-fix/
    Why Does My iPad Say "Cannot Connect to Server"?
    http://www.ehow.co.uk/info_8693415_ipad-say-cannot-connect-server.html
    iOS: 'Mailbox Locked', account is in use on another device, or prompt to re-enter POP3 password
    http://support.apple.com/kb/ts2621
    iPad Mail
    http://www.apple.com/support/ipad/mail/
    Configuration problems with IMAP e-mail on iOS with a non-standard SSL port.
    http://colinrobbins.me/2013/02/09/configuration-problems-with-imap-e-mail-on-ios -with-a-non-standard-ssl-port/
    Try this first - Reset the iPad by holding down on the Sleep and Home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider - let go of the buttons. (This is equivalent to rebooting your computer.)
    Or this - Delete the account in Mail and then set it up again. Settings->Mail, Contacts, Calendars -> Accounts   Tap on the Account, then on the red button that says Remove Account.
     Cheers, Tom

  • Email Activity Not sending email when BPEL process fails

    In 11g SOASuite I have a BPEL process which does the following,
    1) Receive response from client
    2) Email activity - Notify with an id received in the request as content
    3) Insert data into a table using db adapter
    Whenever db adapter has some key violations or issues, I notice that no emails are getting dispatched. When I look at EM console it displays that txn has been rolled back after 3rd step. I understand that but it makes me ask this question,
    How can I make the process to send an email at step2 irrespective of an error that happens down stream at step-3? How to make email activity not part of this Txn scope?
    It works as expected(emails are dispatched) when there are no issues at step-3.

    Hi,
    In order to not rollback your transactions, you need to hit a dehydration point, meaning, save your process into the db store and perform a commit until that point.
    It sounds like a simple process, so you can drag a checkpoint activity after the email activity.
    That is one option. Try, and see if it works for you.
    Arik

  • Email activity not working on Clients site

    Hi,
    I created a Bpel process that contains an email activity, It works fine when I am connected to the Oracle network through VPN and while i am in the Oracle office.
    But when I am at the clients site or connected through VPN, it doesnt work at all.
    when I configure my ns_emails.xml to Oracle's info, it works fine but when its configured to clients info, it doesnt work.
    I have configured ns_emails.xml and wf_config.xml
    This is my ns_emails.xml when I am at the clients site._
    note:_ Since I am not using the Default domain for deployment, I changed the &lt;Name&gt; under &lt;EmailAccount&gt; to cdmsd since I am deploying my Bpel processes to the cdmsd domain.
    ^&lt;EmailAccounts xmlns="http://xmlns.oracle.com/ias/pcbpel/NotificationService"^
    ^ EmailMimeCharset=""^
    ^ NotificationMode="EMAIL"&gt;^
    ^ &lt;EmailAccount&gt;^
    ^ *&lt;Name&gt;cdmsd&lt;/Name&gt;*^
    ^ &lt;GeneralSettings&gt;^
    ^ &lt;FromName&gt;Oracle BPM&lt;/FromName&gt;^
    ^ &lt;FromAddress&gt;[email protected]&lt;/FromAddress&gt;^
    ^ &lt;/GeneralSettings&gt;^
    ^ &lt;OutgoingServerSettings&gt;^
    ^ &lt;SMTPHost&gt;mail.co.la.ca.us&lt;/SMTPHost&gt;^
    ^ &lt;SMTPPort&gt;25&lt;/SMTPPort&gt;^
    ^ &lt;/OutgoingServerSettings&gt;^
    ^ &lt;IncomingServerSettings&gt;^
    ^ &lt;Server&gt;mail.co.la.ca.us&lt;/Server&gt;^
    ^ &lt;Port&gt;25&lt;/Port&gt;^
    ^ &lt;Protocol&gt;SMTP&lt;/Protocol&gt;^
    ^ &lt;UserName&gt;[email protected]&lt;/UserName&gt;^
    ^ &lt;Password ns0:encrypted="false" xmlns:ns0="http://xmlns.oracle.com/ias/pcbpel/NotificationService"&gt;Temp123&lt;/Password&gt;^
    ^ &lt;UseSSL&gt;true&lt;/UseSSL&gt;^
    ^ &lt;Folder&gt;Inbox&lt;/Folder&gt;^
    ^ &lt;PollingFrequency&gt;1&lt;/PollingFrequency&gt;^
    ^ &lt;PostReadOperation&gt;^
    ^ &lt;MarkAsRead/&gt;^
    ^ &lt;/PostReadOperation&gt;^
    ^ &lt;/IncomingServerSettings&gt;^
    ^ &lt;/EmailAccount&gt;^
    ^&lt;/EmailAccounts&gt;^
    and for wf_config.xml I only add one line_
    ^&lt;property name="oracle.bpel.services.notification.publisher_interval" value="1" /&gt;^
    I dont understand why its not working while I am on the clients site ?? any ideas ??
    could it be a network issue on their side ??

    I pinged my email server and I got the following:
    {size:12pt}
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),{size}
    Edited by: user9976478 on Jan 30, 2009 2:09 PM

  • My daughters have Iphones and both are registered to my email. The problem with that is that one get the others messages. I have to make one account for each their phones. How do I do that?

    My daughters got Iphones a couple of years. I do not have an Apple-phone. I registered both phones on my email. The problem is that one of them get the others messages. I therefore need to make two different accounts for their apple-products. How do I do that?

    On each of the phones you're gonna use a new Apple ID for iCloud: turn off Contacts, Calendars, etc. for iCloud. You'll be prompted to keep the data or delete it from the phone, then turn off iMessage, FaceTime & delete the iCloud account...Settings>iCloud...scroll down...delete account. Then, setup iCloud using the new Apple ID, turn on iMessage & Facetime.
    This will have no affect on the ID you share for iTunes content, & you can continue to do so.

  • How do I get around the email Apple ID problem on iCloud?

    My Primary Apple ID is not an email address. After following Apple's prompts on my iPhone after installing IOS5 I (and I regret this emmensely), created a new ID with my primary email, the same one that is the email linked to my other Apple ID. It allowed me to do this.
    Since iCloud would be fairly unmanageable on my iPhone and Macs with 2 IDs, I'd like to figure out the best way to trick the system to merge all this mess into one account.
    Here's my problem.
    My primary Apple ID is a simple username.
    The email for it is my primary email
    The secondary Apple ID account I created for iCloud is that same email.
    The email for it is that email.
    What I want to do is change my primary Apple ID with the username to the primary email name, in order to make all my iTunes purchases synchable with iCloud.
    I do know that Apple does not allow an ID to be cancelled, so I can't go this route to get rid of the current email one.
    Dropbox? ;-)
    TIA

    I signed to iCloud using a [email protected] email address as the username. It's the same email address as my primary ID's email.
    The problem is not buying apps or music using the iCloud ID, it's managing them later.
    You'll end up with a big mess of apps and music all over the place. You won't be able to sync to iCloud all the music you have on your primary ID.
    I made the mistake of buying an expensive app using the iCloud ID on my phone, only to not have it be able to sync to my computer, which uses my primary Apple ID. I had to go through Apple to have them void that purchase and buy it again using my primary Apple ID.
    All my issues would have been avoided if Apple had allowed me sign up for iCloud using my current Apple ID.
    It's because of their requirement that the ID username needs to be an email address.

  • Error while using Email Activity

    Env:
    Win XP SP2
    SOA Dev Preview 10.1.3.1
    Jdev
    Prob: Am trying to send an email notification to my email id. I create a new BPEL Synchronous process and drag and drop the email activity into the process. I set the details into "to", "subject" and "body" parameters.
    And then I try to deploy the process.
    It throws an error "URI is not hierarchical"
    Can some one let me know the reasons for it.
    Thanx
    AJ

    Thanx Clemens,
    The xml that you had mentioned is same as the one I am working with. When I double click on the error in the error panel displayed in JDev, the cursor moves to the first line in the bpel file which says "<?xml version = "1.0" encoding = "UTF-8" ?>".
    I am still unclear as to what is the issue with the code that I am using. Following is my bpel file. Also, please let me know if there are any libraries or jar files to be included for using email activity in the bpel process.
    <?xml version = "1.0" encoding = "UTF-8" ?>
    <!--
    Oracle JDeveloper BPEL Designer
    Created: Fri Aug 25 15:11:47 IST 2006
    Author: ashutoj
    Purpose: Synchronous BPEL Process
    -->
    <process name="SendEmailNotification"
    targetNamespace="http://xmlns.oracle.com/SendEmailNotification"
    xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
    xmlns:xp20="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.Xpath20"
    xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
    xmlns:ns1="http://xmlns.oracle.com/ias/pcbpel/NotificationService"
    xmlns:ldap="http://schemas.oracle.com/xpath/extension/ldap"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:client="http://xmlns.oracle.com/SendEmailNotification"
    xmlns:bpelx="http://schemas.oracle.com/bpel/extension"
    xmlns:ora="http://schemas.oracle.com/xpath/extension"
    xmlns:orcl="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.ExtFunc">
    <!--
    PARTNERLINKS
    List of services participating in this BPEL process
    -->
    <partnerLinks>
    <!--
    The 'client' role represents the requester of this service. It is
    used for callback. The location and correlation information associated
    with the client role are automatically set using WS-Addressing.
    -->
    <partnerLink name="client" partnerLinkType="client:SendEmailNotification"
    myRole="SendEmailNotificationProvider"/>
    <partnerLink name="NotificationService"
    partnerRole="NotificationServiceProvider"
    partnerLinkType="ns1:NotificationServiceLink"/>
    </partnerLinks>
    <!--
    VARIABLES
    List of messages and XML documents used within this BPEL process
    -->
    <variables>
    <!-- Reference to the message passed as input during initiation -->
    <variable name="inputVariable"
    messageType="client:SendEmailNotificationRequestMessage"/>
    <!-- Reference to the message that will be returned to the requester-->
    <variable name="outputVariable"
    messageType="client:SendEmailNotificationResponseMessage"/>
    </variables>
    <!--
    ORCHESTRATION LOGIC
    Set of activities coordinating the flow of messages across the
    services integrated within this business process
    -->
    <sequence name="main">
    <!-- Receive input from requestor. (Note: This maps to operation defined in SendEmailNotification.wsdl) -->
    <receive name="receiveInput" partnerLink="client"
    portType="client:SendEmailNotification" operation="process"
    variable="inputVariable" createInstance="yes"/>
    <!-- Generate reply to synchronous request -->
    <scope name="Email_1">
    <bpelx:annotation>
    <bpelx:pattern patternName="bpelx:email"></bpelx:pattern>
    </bpelx:annotation>
    <variables>
    <variable name="varNotificationReq"
    messageType="ns1:EmailNotificationRequest"/>
    <variable name="varNotificationResponse"
    messageType="ns1:ArrayOfResponse"/>
    <variable name="NotificationServiceFaultVariable"
    messageType="ns1:NotificationServiceErrorMessage"/>
    </variables>
    <sequence name="Sequence_1">
    <assign name="EmailParamsAssign">
    <copy>
    <from expression="string('Default')"/>
    <to variable="varNotificationReq" part="EmailPayload"
    query="/EmailPayload/ns1:FromAccountName"/>
    </copy>
    <copy>
    <from expression="string('')"/>
    <to variable="varNotificationReq" part="EmailPayload"
    query="/EmailPayload/ns1:Bcc"/>
    </copy>
    <copy>
    <from expression="string('')"/>
    <to variable="varNotificationReq" part="EmailPayload"
    query="/EmailPayload/ns1:Cc"/>
    </copy>
    <copy>
    <from expression="string('')"/>
    <to variable="varNotificationReq" part="EmailPayload"
    query="/EmailPayload/ns1:ReplyToAddress"/>
    </copy>
    <copy>
    <from expression="string('hi')"/>
    <to variable="varNotificationReq" part="EmailPayload"
    query="/EmailPayload/ns1:Subject"/>
    </copy>
    <copy>
    <from expression="string('[email protected]')"/>
    <to variable="varNotificationReq" part="EmailPayload"
    query="/EmailPayload/ns1:To"/>
    </copy>
    <copy>
    <from expression="string('checking mail from bpel pm')"/>
    <to variable="varNotificationReq" part="EmailPayload"
    query="/EmailPayload/ns1:Content/ns1:ContentBody"/>
    </copy>
    <copy>
    <from expression="string('text/html; charset=UTF-8')"/>
    <to variable="varNotificationReq" part="EmailPayload"
    query="/EmailPayload/ns1:Content/ns1:MimeType"/>
    </copy>
    </assign>
    <invoke name="InvokeNotificationService"
    partnerLink="NotificationService"
    portType="ns1:NotificationService"
    operation="sendEmailNotification"
    inputVariable="varNotificationReq"
    outputVariable="varNotificationResponse"/>
    </sequence>
    </scope>
    <assign name="Assign_1">
    <copy>
    <from expression="'Mail Sent'"/>
    <to variable="outputVariable" part="payload"
    query="/client:SendEmailNotificationProcessResponse/client:result"/>
    </copy>
    </assign>
    <reply name="replyOutput" partnerLink="client"
    portType="client:SendEmailNotification" operation="process"
    variable="outputVariable"/>
    </sequence>
    </process>

  • Attachments in Email Activity ?

    Hello Experts,
    I have a requirement where i need to get the records from database and send those records as an attachment in the email activity. I got the attachment slightly working...I assigned the Database output to the String Variable and attached that string to the Attachments...
    But the records are not in a correct aligned way in the file. Is there any way to align the data in a good aligned format ?
    i need to add an attachment may be in an xml or txt or csv...but the data should be atleast in an aligned way...
    Please help me...
    Thanks,
    Naresh

    Hi Anuj,
    But if i do that, the data is completely empty in the file...If i see in the flow trace, the data is getting assigned to the attachment variable...but in the email attachment, the file is completely empty....
    And as the above person said, if i need to write the file and read the same file; that wouldn't work i guess because, my BPEL would be polling the table , after getting the records it needs to send an email with the records it got as an attachment....
    I have a question here. So if we want to add attchments, is ora:readFile the only option of attaching the file ?
    Please help...i need to copy the records inthe input of my BPEL to the attachments in the email activity in BPEL..
    Thanks,
    Naresh

  • How to create Incoming Email Activity using BAPI or Function module

    To create an Incoming Email Activity using BAPI 'BAPI_ACTIVITYCRM_CREATEMULTI' or using 'CRM_ORDER_MAINTAIN' . what parameters i need to pass to a bapi.
    Suggest me with a solution.
    Regards,
    Sanjani

    For activity you must fill the following structures of 'CRM_ORDER_MAINTAIN'...
      CALL FUNCTION 'CRM_ORDER_MAINTAIN'
        EXPORTING
          it_activity_h             = t_activity_h
          iv_collect_exceptions = ''
        CHANGING
          ct_orderadm_h         = t_orderadm_h
          ct_input_fields       = t_input_fields
        EXCEPTIONS
          error_occurred        = 1
          document_locked       = 2
          no_change_allowed     = 3
          no_authority          = 4
          OTHERS                = 5.
    And at the end you must use also 'CRM_ORDER_SAVE' to performe the save.
    Regards.

Maybe you are looking for

  • Security concern regarding my iTunes gift card

    I have never used a iTune gift card, so my question may be silly. This is a little bit complicated situation: I have a gift card of a few hundreds, and it was accidentally exposed online. As you know, at the back of card, there are 16 digits code, wh

  • Nike+  website is temp. unavailable

    I've been having problem synching my workout runs for close to 2 weeks now, I've contacted support twice and was still not able to resolve the issue. In reading post I discovered that the recorded workout XML file could be bad, and sure enough it was

  • Somewhat OT:  MP3 vs. WMA Compression Ratio

    Sorry that this is a little off-topic, but do any of you know where I could find information about typical compression ratios, at a given level of (admittedly subjective) audio quality, between MP3, AAC, and WMA? I couldn't find much via Google. I as

  • Tiles on home page gone :(

    when I opened my firefox there were tiles that were links that I assigned... bank, netflix xfinity... Now they are gone and I have no idea how to get them back. All I had to do was right click on the screen and add the url... now... nothing!!!! Pleas

  • Covert a pdf of a Powerpoint presentation back to  Powerpoint?

    I have a PDF of a Powerpoint containing both text and Excel files...can I convert this back to a modifiable Powerpoint ??