You are viewing limited content. For full access, please sign in.

Question

Question

Update a variable with task last action

asked on July 31

I think I'm missing something obvious, or I don't understand how the process variables work with form variables.

I have a leave approval form where the supervisor can either approve or deny after the employee submits the form.  Then the HR team reviews the form after the supervisor approves or denies.  HR then has the option to return the form back to the supervisor if the approval or denial is wrong.  I've got the process logic working but I can't get the form variable for the supervisor review status to update with the most recent action.  The variable seems to get stuck with the first supervisor review task action, not the updated user task action (i.e. change from deny to approve).  I've tried using both Previous Submission Action and Previous User Submission Action process variables and am getting the same results.  I need to use action buttons so the supervisor can do direct approvals in email.

Thanks in advance for any help!

 

 

0 0

Answer

SELECTED ANSWER
replied on August 1

Hi Greg, I am going to base the following explanation on how you have presented your problem. I hope it helps.

I would use the action variable tied specifically to the "Supervisor Review" task instead of "Previous Submission Action":

-User Tasks → Supervisor Review → Action

Its token will look similar to:

{/dataset/_step[@_step_id=7]/_action}
 

Replace "7" with the Supervisor Review task’s actual Step ID.

Laserfiche defines this variable as the last action taken on that specific user task, so the gateway following the supervisor task can evaluate whether the latest action was Approve or Deny.

The other variables work slightly differently:

-Previous Submission Action, returns the action from the immediately preceding user or service task.
-Previous User Submission Action, returns the action from the previous user task only.

Those variables are useful for sequential processes, but they can become ambiguous when the process loops between HR and the supervisor.

Also, Direct Approval completes the task without opening the form. Therefore, if “Supervisor Review Status” is an actual form field, the email action will not automatically rewrite it. If the value must be stored in that field, you could invoke a Workflow after the supervisor task and use "Set Business Process Variables" to update it. Another option would be to use a separate supervisor "Reconsideration" task, giving each review stage its own action variable, in case some like this apply. 

1 0
replied on August 3

Hi Luis,

 

Thanks so much for your response.  I ended up creating additional variables for the updated approval and then using field rules to display the updated approval information.  I'm going to look into using Workflow to update the variable though as it might make the Forms process simpler.

 

Thanks!

Greg

1 0

Replies

You are not allowed to reply in this post.
You are not allowed to follow up in this post.

Sign in to reply to this post.