cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

We are happy to announce the new Windchill Customization board! Learn more.

Workflow Notifications, dynamic "sender" address?

grocha
1-Newbie

Workflow Notifications, dynamic "sender" address?

Hello Gurus,


scenario:


I am facing a problem with the behavior of the notifications from workflows, when you have notifications in the WF, the sender (from) of the notification is always the creator of the document, my problem is that the actors in some of the workflows cannot interact with each other, actually they can't even know each other.


For example in a particular workflow theres the internal engineering team, in the other side theres the suppliers and subcontractors (external users), and in the middle there's the procurement team, each action from one side to another pass trough procurement so engineering and suppliers can't interact directly, but now we have this problem that the mail notifications of documents created by suppliers are being sent to the engineering team with the supplier as the sender and vice versa, but contractually that can't happen.


Requirement:


With that being said I would like to know if is there a way to change this behavior of the notifications so the mail is sent with the sender as the participant who completed the activity before that notification.



Guilherme Rocha


8 REPLIES 8
MikeLockwood
22-Sapphire I
(To:grocha)

Who would you propose that the email come from?

- The system

- The initiator of the workflow process (various mechanisms involved for this)

- Someone who has completed a Task already in the Process

- Someone from a specific Role on the Context team

- Other

We've struggled with this many times also - especially when Tasks are re-assigned, people in team instances are swapped out, users leave, the user who revises and starts a new process is not the "creator " etc., etc.

Would be interesting to have a discussion on this with others' viewpoints.

We're leaning toward having all emails from "the system" actually being the least confusing.

grocha
1-Newbie
(To:grocha)

In the particular cases affected by this which I have so far all requires
that the person who completed the activity before the notification must be
the sender of the mails.



As a temporary solution I could use the sender of everything as the system,
but I could not find any way to achieve it either, do you have any advice on
that?







Estou a disposição para qualquer esclarecimento.






MikeLockwood
22-Sapphire I
(To:grocha)

Not aware of any way for the system to send emails based on the person who completed the previous Task. Complex because there may be situations where this is ambiguous:

- Could be multiple approvers in parallel and an AND at the end of that before the current Task

- Could be a branch based on a conditional between the last completed Task and the current one

- Etc.

Doesn't seem like something that really can be developed easily.

If really needed, I would focus on an expression robot that manipulates the team instance (e.g. populate a Role from which email will be sent) at the needed point(s) in the process. Then configure the notification robot(s) to send from that Role. May need to have multiple sets of these. If it's important that the Task be from someone, can't select to use the Notification checkmark for the Task - which then has the disadvantage that users don't have a link to their Task.

Seems simple but not so much 🙂

"...disadvantage that users don't have a link to their Task"



ddemay
1-Newbie
(To:grocha)

These all require customization
or system level configuration, but they are
possible if one really wants to pursue it.



When a work item is reassigned – you can develop a listener, a queue, or
workflow that doesn’t terminate that queries for reassigned items and sends
email.



The other issue on sender address is readily solved by using JavaMail for
programming or the mail API in PTC’s code (not supported officially) or
using a third party operating system level script to intercept the emails
via a email proxy server and adjusting applicable emails before they are
routed off to their actual destination.










David,


suspected these would be reasonably involved customizations. Thanks for the tips.


Darren

g_prajeesh
4-Participant
(To:grocha)

All,


Many people are requesting for custom workflow notifications in many posts. I am attaching the java code as well as a test workflow for your help.


This code can be used even in Sub process Level. Ofcourse it is not supported by PTC and involved customization to trick the system. If you have time, you can go through the code and re use some part to customize such as Sender etc..



As of now , I didn't incorporate it for reassign. You can achieve the same



Best Regards


Prajeesh Kumar



The Zip file contain the workflow zip file and Java code. There is a property file inside com.generic package

g_prajeesh
4-Participant
(To:grocha)

Hi,


I forgot to attach two more java files. I am adding that to the zip file. Please use the attached one


Sorry for the inconvenience


Best Regards


Prajeesh Kumar

Top Tags