Expand my Community achievements bar.

Question about article on "Initiating a workflow process via an email"

Avatar

Former Community Member
I have a question about this article: http://partners.adobe.com/public/developer/en/livecycle/lc_wf_initiate_process_tip.pdf



It statest that "Only user who are registered in the appropriate LDAP directory and have logged in to LiveCycle Form Manager at least once can initiate a workflow process in this way."



Why is that? I've been ignoring giving this method a try because of this statement, but after reading the steps in more detail, I don't understand why only LC account users can initiate a workflow this way?



One other question - and maybe this is related to the above - I tried to quickly test this and my workflow is not being triggered. I did specify the process type and set the email address to the same one set up under the workflow server settings.



Thanks,

Jennifer
5 Replies

Avatar

Level 9
Hi Jennifer



If the user initiating wasn't a registered user, then the behavior of the workflow could break. For example, what would happen if you had a User QPAC that assigned the task to "Creator"? If the creator didn't exist, then the QPAC would fail. There are other areas, such as the adminui, that assume that each process has a creator that is a valid user, and which will break if the creator is invalid.



A second issue is one of security - since anyone can send an email to any address, I presume the Adobe engineers wanted to ensure that only "authorized" users could initiate a workflow - you wouldn't want spammers to be initiating workflows.



You could argue that if the user isn't known, then the workflow should still start, but the creator should be set to some sort of default user or the administator or something, but I guess this was a design decision.



If you do want anyone to be able to initiate a workflow, you can create a little "email watcher" process. This process uses EmailREceiver to wait for an incoming email in a designated inbox - when an email arrives, EmailReceiver extracts the attachment, and then uses the Chain QPAC to launch the "real" process, passing the attachment as a parameter. It then loops back around to wait for the next email. We've done this quite regularly, and it works extremely well.



Howard

http://www.avoka.com

Avatar

Former Community Member
Thank you Chris and Howard



In both what you wrote (and from your Email Receiver Example) and in the Adobe article, I still do not see/understand where any user is initially specified/required.



The way I understand the article is that there is a form configured and that form is "offline" (i.e. not a part of the FM). A person has this form (via whatever method), fills it out and submits the button, this button brings up his email client where it attaches the form and already has the To: email address populated. This TO: email address will be the LC email (the article says "polling address" is this the same as the one configured under the Workflow settings?), but the person submitting the form can be anyone. After this, I assume my workflow starts off with an Email Receiver to catch this incoming email ? The second thing I am confused about it is how this workflow ever gets triggered? I know the process type is set in the form, but I still don't see the how the Email Receiver QPAC in the workflow gets turned is "on" to watch the emails? I am guessing per the example from Howard, is that you invoked the Email Receiver workflow via the web services and once it gets turned on you are constantly looping back to it if it processes an email?



Sorry for so many questions. I understand the reasoning behind your explanations regarding security matters with requiring the user being a LC account holder, but I don't see where it is being checked on. On to more testing...



Thank you,

Jennifer

Avatar

Former Community Member
The technique described by Howard is an alternative approach from the generic "initiate via email" approach. What you are trying to do is send an email to the email address that has been configured in the Workflow server. The server will poll this address and start the process defined in the form. This technique requires that the email address the email is received from be the email address for a valid user defined in the Server. There is no need for an email receiver qpac with this approach.



What Howard has mentioned is a good approach for bypassing the need for a valid user to start the workflow. You design a completely seperate workflow that will use the email receiver QPAC to poll an email address (Different from the one the server is polling). When an email is received it uses the Chain QPAC to kick off the other process and then loops back to polling. With this technique the polling process needs to be started when the server is started, after this it will continue to run until the server is stopped. Because the chain QPAC will initiate teh process using an internal server account the need for a valid user to email in the form is removed.



Chris

Adobe Enterprise Developer Support

Avatar

Former Community Member
Thanks Chris,



I would like to get at least get something working according to that article so I understand that part at least.



What I am trying to figure out now is step 4; it says: "Select the form's Submit button, and then select Object palette > Submit"



I don't understand that step - am I changing the button TYPE (otherwise which type is it - Email Submit Button?) or am I changing the "Control Type" to Submit? I am guessing that the Type remains a "button" and that I am changing the "Control Type" to Submit since the next instruction is to set the "Submit Format" and I only get that option if I change the Control Type to Submit.

If that is the case, what do I provide in the "Submit to URL"? That is a required field and I get an error if I don't populate it. I tried doing a mailto:myworkflowemail@address.com, but the workflow was never triggered (the same email address I provided in the AWS_MAILTO field), so I am obviously doing something wrong.



Thank you,

Jennifer

Avatar

Former Community Member
Hello Chris,



My slow brain just got it. I just noticed in your message saying that the email being received must be from a valid email address from a user defined in the Workflow Server.



Thanks again, now onto the approach suggested by Howard :D



-Jennifer