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

Complete Flexi task based on an list item field value

I have a Address change list which contains the following fields.

I am running an approval workflow which contains a "Assign flexi task" which send email to approver to reject or approve through the link in the email or lazy approval. When the  approver takes decision the above two fields Approver Comments and Status set to approve/reject based on the decision.

Now I want if the approver goes directly to the list and set these 2 fields directly on the list then I want to complete the above workflow or set the flexi task to no action required.

Has anybody faced this kind of scenario, Please suggest.

0 Kudos
Reply
6 Replies
Automation Master
Automation Master

Re: Complete Flexi task based on an list item field value

Hi

I would implement this by having a workflow on the list with conditional start on modify (where previous status <> status).

This workflow would terminate the running workflow, which would consequently mark the tasks as no longer required.

Reply
Not applicable

Re: Complete Flexi task based on an list item field value

Thanks for the reply. your solution is really helpful but when I create the termination workflow, even the approver is approving through email or lazy approval still it triggers the termination workflow based on the condition (where previous status <> status). Although by the time termination workflow triggers the above workflows is already completed and there is nothing to terminate but you can see termination workflow ran unnecessarily. I tried to make use of a variable which sets when its approved / rejected through workflow and in termination workflow i added a check in start condition. It works fine but for one cycle, next time I don't have any place to reset this variable.

Any suggestion will be appreciated.

Reply
Automation Master
Automation Master

Re: Complete Flexi task based on an list item field value

Prashant Singh​ Ah yes I see your problem as the flexi task completion also changes the status and then fires the workflow!

Let me have a little play now and see what I find...

Reply
Automation Master
Automation Master

Re: Complete Flexi task based on an list item field value

OK in the update item - what are you passing to your approver comments field?  is it the workflow context - Approver Comments?

Reply
Automation Master
Automation Master

Re: Complete Flexi task based on an list item field value

If you are - this should work.  The approver comments always contain the decision in the response like this (Approve) and (Reject), so update your conditional start options:

ConditionalStart.PNG

I have tested this with direct entry for approval into the list item and with the response via the task, but not with lazy approval.

Reply
Not applicable

Re: Complete Flexi task based on an list item field value

Thanks Cassy! This logic will work great for one iteration of Open -> Approve/Reject.

But in multiple iterations Open -> Reject/Approve(through workflow email) -> user updates ->  Reject/Approve(direct to list) will fail.

I am planning to let termination workflow run in both the cases because by the time it initiates the approver workflow is already completed and its harmless( it tries to kill the wf which is already completed).

If you see any issue in this, Please advice.

Thanks!!

Reply