how to send mail automatically everyday when workflow completed successfully and also send an email when it run long - informatica

I want to receive an email when
1)The workflow will be successfully completed in time and a completion Notification will be sent to the respective person(e-mail id) or support group(distribution list) via the email task or the post-session e-mail notification in the session task.
The workflow will be continuing to run in excess of the expected time due to some issues (like network, data, etc).In such cases the “STILL RUNNING” notification will be sent to the respective person (e-mail id) or support group(distribution list) via the email task or the post-session e-mail notification in the session task.

For the scenario 1 just follow the guide linked by #rownum-highart.
For the scenario 2 use a parallel flow with a timer. Combine the two flows with Decision Task. Remember to use Treat the input links as set to OR. followed by Email Task with a condition of your session status.

Related

Get success status AWS SES

Prerequisites
I use AWS SES to send an email with event publishing to track the delivery status.
Problem
I'm looking for an event to make sure that an email is successfully sent to the end-user.
Description
Following AWS documentation, this type is suitable:
Deliveries – Amazon SES successfully delivered the email to the
recipient's mail server.
However, this event I get also in case Hard bounces.
For example, email status flow is:
Sends -> Deliveries - in case of successfull delivery
Sends -> Deliveries -> Hard bounces - in case I provide invalid recipient name, e.g. invalid#domain.com or 1234567890#domain.com
I don't expect Hard bounces after Deliveries.
If this behavior is correct then I need some additional event for sure success.
Something like this is expected in case of successfull delivery:
Sends -> Deliveries -> Success
I know that there are other "success" events like Opens, Clicks, Subscriptions, but they require additional action from the end-user.
Implementation details
I use Verified identity as an email sender.
A configuration set is used to redirect status events to SNS.
Finally, SQS is subscribed to this SNS to have all events in one place.
I tried several ways to send an email:
Java code using AWS SES SDK
Sending simulator with predefined and custom recipient's
The result is the same (as described above)
I think it is impossible to have a Success status because AWS cannot guarantee when the recipient mail server will reply with a Hard Bounce. You yourself have to define how long to you want to wait until you consider a delivery as successful. For example, if no hard bounce after 5 minutes, then it is a success.
If your use case is for analytics, I will simply capture more event types (for example log both Deliveries and Hard Bounces), and then count my success as Count of Deliveries - Count of Hard Bounces.
If your use case is for event-driven workloads, we need to define first what is considered a Success. For example, if we define Success as no Hard Bounce after 5 minutes, we can configure a Lambda function to trigger 5 minutes after a Delivery event. In the function, check if a subsequent Bounce event occurred. If not, the delivery is considered successful and then you can proceed to do what you want to do.
This is what I got from aws support about delivery status of an email.
Amazon SES will continue making several delivery attempts until
receiving a successful response from the recipient mail server, or
until 840 minutes elapse. If Amazon SES is still unable to deliver
the email/message during this period, it stops sending the email and
will then return a bounce message/notification.
According to this you can't be sure about the bounce or any other status within 5 minutes.
AWS does not have visibility to confirm if the Recipient Mail Server was able to deliver the message to the recipient email address when you get a 250 OK(it's confirmation that aws has delivered the message to recipient's mail server).
So there is no way you can be sure.

How to configure Dialogflow CX agent to receive multiple messages before replying to user

I've built a custom integration for Dialogflow CX which allows the user to send multiple messages to the Agent. However, the Agent doesn't understand what the user is trying to say when it receives more than one message.
How can I configure my Agent to wait a predetermined amount of time (allowing the user to send as many messages as possible) before trying to reply so that the Agent can make sense of all the text that was sent?
Unfortunately, that's not how Dialogflow-CX agents work. You can't wait a predetermined amount of time before answering: to each prompt from the user the agent will provide a fulfilment if it's specified.
The only way to achieve what you're asking is to develop an integration starting from the API they provide. You could develop an integration which waits a determined interval, joins all text received and sends it to the API via detectIntent request. This way you could have the user input multiple texts and only return a response when needed, but you'd need to handle the logic yourself (meaning a basic to intermediate knowledge of a programming language probably).

Applied Eventually Consistency and Race Conditions

I have a question regarding the effect of eventually consistent (EC) microservice systems.
Imagine we have a booking system - a user-service A and booking-service B. Each service has its own database. Imagine the system does a concurrent booking of the same resource for distinct users at the same time. Lets assume we have a Runtime Verification System checking the concurrent booking.
Would it be possible that the monitor does not realize the concurrent booking at B, because the update in the database is done delayed because of the EC mechanism?
In your example, the Booking Service is the source of truth (presumably) for whether or not the resource is available to book. So, that service should be pretty clear on allowing the first booking request to happen and rejecting the second.
In a case like this, where "first come first served" is the requirement, you'd want an intermediate state that would wait for a response from the Booking Service and update the User Service only when a response has been received.
If your architecture is set up right, User Service shouldn't be calling Booking Service directly anyway - it should be communicating through a messaging plane. As such, when the User clicks "Book Now," you could generate a resourceBookingRequested message and submit it to the queue. You'd acknowledge this request has been queued to the user and update their UI to "Awaiting Booking Confirmation..." or something similar.
Once the booking is accepted, or rejected, the User Service subscribes to the resulting message and updates the UI (and/or takes other actions like sending an email) to let the user know their request succeeded or didn't.

How send mail to group on task assignment

I am trying to send mail to all user in a group on task assignment(in below example to the group - service). I am using the task listener but when the task is assigned by flow execution no mail is triggered to any members of the group neither the notify method in tasklistner is executed. But when the assignment is manually done to any user then the send mail code in task listener is triggered. Moreover if any user claims the task then also the mail code is triggered. Its is not getting triggered when assigned as a part of flow execution
I am using embeded forms and i deploy a war file containing the bpmn
The xml in bpmn is :
<bpmn:userTask id="serviceusertask"
camunda:formKey="embedded:app:forms/task-service.html" name="Service"
camunda:candidateGroups="service">
<bpmn:extensionElements>
<camunda:taskListener
class="com.test.project.TaskAssignmentListener" event="assignment" />
</bpmn:extensionElements>
<bpmn:incoming>SequenceFlow_0ug32e1</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_0w763dv</bpmn:outgoing>
</bpmn:userTask>
Can anyone help me to overcome this
Thanks
The "assignee" of a task is the user who is actual working in the task. This is known as "claim". So yes, the assignment-TaskListener
When you set a candidateGroup to route a task to a group of users, this is not handled by a special lifecycle event.
You can use the "#create" event to get notify when the task is created and use that to send the email.

How to use Akka with transactions across email and database?

I have a situation where I have a component with a list of users. I need to send an email to each user, and then update the user's record to indicate the time when the email was sent.
This seems like a good first use-case for Akka. I was thinking the component that gets the list of users would be an Actor, and a separate Actor would be created for each outbound email-sending Actor, which could be multithreaded. The email-sending Actor would be responsible for updating the date in the user record.
If the email-sending Actor failed, the user's record wouldn't be done, and the supervising Actor would be able to reschedule it.
Is that the right model? Or should the supervisor be responsible for updating the user record?
Or is this a bad use-case for Akka completely?
BTW, I could send mail via SMTP or a web service. I don't think it matters much for the discussion, but I thought I'd mention it.
I don't think you should get hung up on transactionality when there's IO involved. You have no guarantees that the emails will be read, received, received by the right person, received within a certain period of time, be understood etc.
Just send the email and then update the database.
Happy hAkking!