I am trying to add the approval feature in my workflow in which i want to run the workflow if manager sends an approval email.First of all is it possible to do it?And if yes then give idea and if it is not possible then suggest the workaround what I can do in approval points?
6 REPLIES 6
There is no need of any code on MVEL. Just adding an approval point itself blocks at that point and waits for approval.
Once approver provides the approval, the workflow will resume.
If you want, you can provide any comment or description.
Approval by email is not supported in the product but here is one way it could work. A workflow that is waiting for approval can be approved by calling the REST api
You could add a rule on your mail server to call this REST api whenenver an email from the manager/approver is recieved with a particular format. The api needs the jodId which can be obtained by enabling email notification from WFA. Alternatively you could also use the "Send email" command to mail the job id to the manager just before the approval point.
Here is a bit more about REST apis in WFA.
You can also see the apis avialable by pointing to the url http://<WFA-Server>/rest/docs/ or http://<WFA-Server>/rest/ . This might be one of the two depending on which version of WFA you are using.
One of the ways you can set up the Rule to invoke the REST api is to configure the rule to run a powershell script with the cmdlet Invoke-RestMethod. More information here https://technet.microsoft.com/en-us/library/hh849971.aspx
Hey I tried to implement a webservice script in perl to integrate Servicenow and WFA using REST APIs. We can get the required records from tables of servicenow and can pass these values to WFA using REST APIs of servicenow and WFA.Thanks for the WFA REST APIs link.
Check this post if you are interested :