sivakumarss
Enthusiast
Enthusiast

Manual user action - Email approval question

Can any one help on how to approve a manual user action from the email?

In our workflow, there is a 'user interaction' element which sends mail and also adds a 'Manual User Action' entry in the Inbox of VRA portal.

In the portal, the approver can select 'yes' or 'no' and press 'Submit' to approve or reject respectively.

But in the email client, there is no such option. Clicking on the 'Submit' link and sending the composed mail seems to 'Reject' always.

How can we 'approve' using email?

Thanks

0 Kudos
8 Replies
hawks76
Enthusiast
Enthusiast

You might look at external custom events. Not sure that will do exactly what you want, but worth a look i think.
0 Kudos
SeanKohler
Expert
Expert

A little clarity on this please..

"In our workflow, there is a 'user interaction' element which sends mail "

The VRO user interaction sends the email?

I don't know of an OOTB way to do it (might be) or how far down the rabbit hole you want to travel, but if you want we can look at manipulation of the WorkItem service to perform a REST POST to change action state to Submitted or Rejected.  That might require writing your own webservice listener to act as an intermediary between email link and VRA because you would need to get a Bearer token for auth.  We would also need to hijack/customize the email from VRO.

For example if I had a workitem ID below, I could send a Bearer token authorized POST to the service endpoint to Submit or Reject the WorkItem.  This then completes or cancels the VRO workflow on the backend as expected. (I have tested this using an external REST client.)  You could conceivably leverage form entries to take data from the email BACK to the workflow.

POST TO https://VRA/workitem-service/api/workitems/bd96e86c-42db-4518-8352-6ae1f442be07/actions/com.vmware.c...

{

  "workItemId":"bd96e86c-42db-4518-8352-6ae1f442be07",

  "workItemActionId":"com.vmware.csp.asd.workitem.action.submit",

  "formData":{

  }

}

POST TO https://VRA/workitem-service/api/workitems/bd96e86c-42db-4518-8352-6ae1f442be07/actions/com.vmware.c...

{

  "workItemId":"bd96e86c-42db-4518-8352-6ae1f442be07",

  "workItemActionId":"com.vmware.csp.asd.workitem.action.reject",

  "formData":{

  }

}

I will look into the feasibility of completing the email customization.  This is possible through VRA notification scenarios... just not sure on the VRO end.

0 Kudos
SeanKohler
Expert
Expert

Ah... actually backing up a bit. You have your inbound mail server setup properly and clicking Submit from the EMAIL doesn't work? 

This does work properly from our production lab.  (doesn't provide form data... but it works)

submit-reject.jpg

You may want to submit a support ticket and double check your inbound mail config....

0 Kudos
sivakumarss
Enthusiast
Enthusiast

This is the one I am talking about.

Are you able to 'Approve' through email?

To clarify.

The 'User interaction' element will automatically send emails (using VRA mail infra) to the recipient(s).

The recipient can then approve or reject the request. What is happening now is whatever link you create, Reject or Submit, the workflow aborts and the request is cancelled. The inbound email works just fine as we use it for regular approval policies.

The 'User interaction' element also creates entry in the 'Inbox->Manual user action' screen in the VRA portal. In that screen, one can choose 'yes/no' in the Approved field and then press 'Submit' button.

My question was to find out how to set the Approved to 'yes' via the email input. Now it supports only Submit/Reject. Selecting Submit opens a compose window. In this window, how to specify the yes/no option for the approval. (Sorry for any confusion about the writing, my English isn't the best Smiley Sad )

To step further back, our aim is to use allow the user to enter an custom approver ID, instead of the standard approval lists. I had used the 'External workflow' method to read the approver field and then send the request to that person using the User interaction element. This works in theory. But some drawbacks (like the inability to 'Approve') is there.

Is there any other method (other than reading mail within the workflow) to get this task done?

0 Kudos
SeanKohler
Expert
Expert

So... in general we have required Manual Actions (WorkItems) to be Submitted or Rejected in the actual form (in VRA).  But this is because we have used form values that could be changed by the approver during the workflow run.  That said, we have had used inbound email in the past to supply the Submit/Reject buttons in the email as well.

I can absolutely use the buttons now and it working against VRA.  Here is an interesting thing though....  Every time I click Submit in the email (plus then send the email of course), it goes to the mailbox... IMAP or POP picks it up (I tried both)... Manual Action is approved... workflow continues on its way.  So normal behavior, right?

But now when I click Reject... it does reject in the manual action "IN VRA", but the workflow isn't cancelled in VRO!  Bah!  I think there is a bug in the Out of the Box procedure here.  What version of VRA are you in? I am in 7.3.0.  (we decided to hold out for 7.4 before upgrading)

With regard to this... "To step further back, our aim is to use allow the user to enter an custom approver ID, "

Yeah, a Manual Action would work for this (as you already know) because the user can be provided as an LDAP [ ] value.

>>Is there any other method (other than reading mail within the workflow) to get this task done?

All things are possible with REST that works.  And in this case, the REST does work.  The email comes from a template that can be changed in VRA. The problem here is that you would have to build your own URL listener that handles custom links from the email.. and then get the custom links INTO the email.  It might be a dead end... but if you cannot get a patch fix to enable your Submit/Reject (Approval hack)... maybe that would be a way to go.  You also might want to wait until the next VRA version launches.

Sorry I don't have a better answer for you.  Maybe someone else can jump in and provide a more suitable direction.

0 Kudos
sivakumarss
Enthusiast
Enthusiast

So, when you click 'Submit' in your mail and then send it without any modification, your workflow gets 'approved'?

For us, it is getting 'Rejected'. Hence my question.

-Siva

0 Kudos
sivakumarss
Enthusiast
Enthusiast

Can you also remind me where the mail templates can be modified? Thanks

0 Kudos
SeanKohler
Expert
Expert

Yes. Submit does complete the manual task and completes the VRO workflow.

I haven’t tried the email customization in 7.x, But this is how it’s done.

https://blogs.vmware.com/management/2016/09/email-customization-vra.html

0 Kudos