Sending emails to Queue members in salesforce on task object - email

Currently, I want Queue members to get mail based on the task type which is created.
Task_type__c is the Picklist field on the Task object. I have 8 values in that Picklist field. i.e 8 Task type. According to each task type, one Queue should be assigned to them. So I have created 8 Queues. If the Task type is 1 then Queue 1 should be assigned and Queue members of that Queue 1 should get an email.
I have tried all the possible ways but couldn't find out why email is not going to queue members. I want this feature.
Can anyone please help?

Related

Kogito - wait until data from multiple endpoints is received

I am using Kogito with Quarkus. I have set on drl rule and am using a bpmn configuration. As can be seen below, currently one endpoint is exposed, that starts the process. All needed data is received from the initial request, it is then evaluated and process goes on.
I would like to extend the workflow to have two separate endpoints. One to provide the age of the person and another to provide the name. The process must wait until all needed data is gathered before it proceeds with evaluation.
Has anybody come across a similar solution?
Technically you could use a signal or message to add more data into a process instance before you execute the rules over the entire data, see https://docs.kogito.kie.org/latest/html_single/#ref-bpmn-intermediate-events_kogito-developing-process-services.
In order to do that you need to have some sort of correlation between these events, otherwise, how do you map that event name 1 should be matched to event age 1. If you can keep the process instance id, then the second event can either trigger a rest endpoint to the specific process instance or send it a message via a message broker.
You also have your own custom logic to aggregate the events and only fire a new process instance once your criteria of complete data is met, and there is also plans in Kogito to extend the capabilities of how correlation is done, allowing for instance to use variables of the process as the identifier. For example, if you have person.id as correlation and event to name and age of the same id would signal the same process instance. HOpe this info helps.

Create collection of agents already in queue in Anylogic

I'm simulating abandonment by waiting customers in a queue environment. I'm assuming that a person will abandon a queue if they notice that people who were in the queue ahead of them have left the queue (amongst other things like their own time in queue). To do this, I need to capture the details of the people already waiting in a queue when a new person joins the queue. I figure I need a collection created in the customer agent that i can store agent details of those ahead of them in queue. I can then use code to "populate" this collection via the on enter action of the queue block. but I'm not sure how to progress. I am struggling with how to find the IDs of agents in a queue and collect values of their parameters. Any help will be appreciated! Thank you.
When a new agent enters the queue you can use a for loop to cycle through all the agents in the queue and add it to a variable inside the agent.
Take the following simple example.
There is a custom agent type MyAgent it has a collection of type ArrayList accepting objects of type MyAgent.
Now when an agent enters a queue I can store the agents ahead of it in the queue in the following way
Please note the limit of the for loop is i < self.size()-1, if you don't add the -1 the agent will add itself to the list. (assuming your queue is FIFO (First in first out) the new agent will be the last in the list.

Agent receiving several messages at the same time in AnyLogic

Suppose you have two agent types:
Agent Type 1 with a population of 10
Agent Type 2 with a population of 1
Suppose Type 2 has a statechart with two states as follows:
Agent Type 2 statechart
If all 10 agents of Type 1 send the same message simultaneously or at least with intervals smaller than the timeout transition shown in the image, what happens to the messages received while the the agent of Type 2 is in the state "evaluateLenderDecision"? Are the messages discarded or queued until the state "waitingForLender" is reached again?
First I suggest you watch this youtube video I made that explains how messages are sent. https://www.youtube.com/watch?v=Fe2U8IAhlHM
The messages using send or deliver are received in the connections object where the message is redirected to the different state charts that you define there.
In your case, you should maybe generate a queue yourself with all the messages that have been received (using a collection maybe)
If your messages are sent at the same time, 9 of your 10 agents will have their message discarded from your statechart point of view since there will be no statechart waiting for a message after the first one is received, but not from your connections point of view... All messages are received effectively.

Resequencing of workflow events

Looking for suggestion or solution on the following usecase
Application receives messages ordered by change time identified by a
functional key (e.g. employee id). There can be multiple messages
for a functional key
Each message triggers a workflow. If there is a pending workflow for an employee would like to queue the new messages until the
pending workflow is complete.
Is there any way in cadence to resequence the messages to process them as a group identified by a functional key in the message?
I would have a single workflow per employee which receives a message (possibly with SignalWithStart) and queues it up in a variable if there is already processing going for a message. The processing can be implemented as a child workflow or directly as part of the employee workflow. When the processing is done the new one is kicked off if there is a buffered request. If there are no buffered requests and processing is done the employee workflow can exit.

How to send queue message to multipule receiver in freeRTOS?

I'm looking for a method to broadcast a message using queue in freeRTOS and i come up with different ideas but each one has a different problem.
what i have:
the item type for the queue is a struct with an attribute to indicate if the message is a broadcast or for a specific task.
a broadcast task that will write a message to the queue.
a queue manager task that will peek on the queue if any new message was received and if the message has a destination then it will resume that specific task or resume all tasks if it's an broadcast.
and for the Receiver task i come up with those ideas:
if i used the receive function xQueueReceive only the first task in task-queue will read the message and remove it from queue and with this, the other tasks will not be able to read that broadcast message. in the other hand, it's the perfect why for directed message (message for a specific task).
if i use the peedk function xQueuePeek the message will never be removed from queue unless i use xQueueReceive which is kinda redundant (peek and receive in the same task, meeh, ugly coding) and i can't use any other delete function because it will remove the whole queue. but that will solve the message for a specific task, and to solve the broadcast message i need to set a priority for each receive task and only the task with the lowest priority will use xQueueReceive to remove that message from queue and all receive tasks will suspend themselves after peeking or reading so they don't read again the message (i'm not sure what to do about the queue manager task because i can't suspend it and it will keep notified about a new message in queue until the last task receive it), but the whole system will need to wait for that low priority task to run to remove that message and any new message received in that time, it will not be read in the real time.
i'm still thinking about other methods like using new queue or a queue for each receive task but i'm not sure yet which method is the best one. and i don't know if there any other why to broadcast a message even without using the queue technique.
i need to tell you that this program is not for a specific project. i'm just trying to use the Queue technique in different ways. and i already found other post about broadcasting a message but it was for a specific problem where they solve it without using the queue technique. i just want to send "this is a broadcast message" to the queue and all receiver be able to read it once (just one time).
thank you.
Event groups are the only broadcast mechanism in FreeRTOS. You could use an event group to unblock all tasks that should read from a queue using the queue peek function, then xEventGroupSync() to know when all tasks had read the data so the data should them be removed.