Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

Check invocation mechanism

Avatar

Level 8
Level 8
Hi all,



In my process I need to know which of my endpoints (email/task manager) has been invoking the process. I have seen a sample that uses a condition on a route:

getDocLength(/process_data/@inWatchFolderDoc) = 0

where inWatchFolderDoc is an in variable, but I do not know if something similar is posible for an email endpoint. Can you point my in the right direction?



Thanks in advance

Kim
4 Replies

Avatar

Level 10
What about if you create a IN String variable in your process and from the Email Endpoint configuration put %SENDER% for the mapping.



If the process is invoked from email, the variable will be popualted with the email address of the sender, otherwise it'll be blank.



You can put a condition on the route that checks whether the value is blank or not, then go the appropriate route.



Jasmin

Avatar

Level 8
Level 8
That might do the trick - I will test it right away and post the results when I have them.



Thank you for your help Jasmin.



Sincerely

Kim

Avatar

Level 8
Level 8
Hi again,



It does the trick - thank you Jasmin.



However now I have another problem. The problem is that the process must be initiated with two different forms according to which endpoint has kicked of the process.



If it is the email endpoint, it must be kicked of with the attached form (with data inside) otherwise if it is the task manager endpoint it must be another form which is empty (and must be filled out by an employee).



How can I achieve this setup?



Sincerely

Kim

Avatar

Level 10
Have a decision point as your first step. If the email address is populated, then fill a Document Form variable with the PDF that was attached to the email otherwise fill the Document Form variable from a blank PDF coming from the repository.



Then assign the Document Form variable to the Form Data Mapping of a User step.



Jasmin