Adobe Campaign Workflow Approval Task | Community
Skip to main content
Level 2
February 13, 2018
Solved

Adobe Campaign Workflow Approval Task

  • February 13, 2018
  • 4 replies
  • 3026 views

Hi,

In a workflow I have an approval task and I need to set the assignee dynamically in the workflow, there are over 40 different possible assignees for the approval and I do not want to have 40 plus approval tasks.

I could see that I can add a 'Filter' assignment type, but when I add a filter condition based on 'Email equals $(instance/vars/@who) I get the message that the variable does not exist in this context.

I have tried various formats $(instance/vars/who) etc. for the variable without any luck so far.

Jeremy

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by jeremyasmith

Hi,

I have taken another look at this today and have managed to do what I want using the following method:

In a previous javascript step set an Instance variable with a list of the operators I want to be approvers.

Then in the approval task I have used a filter assignment type and added a set of dummy conditions that will not match existing operators:

     email equals "noone@nowhere.com"

I then used the approval task advanced tab and in the initialisation javascript I modified the conditions to match the approvers from the instance variable:

activity.assigneeFilter.where.condition[operatorcount].expr = "@email = '" + operator.@email + "'";

This seems to work and I can set up any approvers I want dynamically

Thanks

Jeremy

4 replies

February 14, 2018

Hi Jeremy,

You should be able to select 'operator' assignment type, and pick a single assignee from the Assignee dropdown box.

Level 2
February 14, 2018

Hi,

Thanks for your reply, what I am trying to do is set the assignee dynamically in the task, i.e. set a variable in a javascript just before the approval task based on the context of some sort and use that variable as the assignee in the approval task.

Jeremy

florentlb
Level 10
March 12, 2018

Hi Jeremy,

Since this activity only lets you pick an operator from a defined list, I'm not sure you can use a variable here.

Florent

jeremyasmithAuthorAccepted solution
Level 2
March 21, 2018

Hi,

I have taken another look at this today and have managed to do what I want using the following method:

In a previous javascript step set an Instance variable with a list of the operators I want to be approvers.

Then in the approval task I have used a filter assignment type and added a set of dummy conditions that will not match existing operators:

     email equals "noone@nowhere.com"

I then used the approval task advanced tab and in the initialisation javascript I modified the conditions to match the approvers from the instance variable:

activity.assigneeFilter.where.condition[operatorcount].expr = "@email = '" + operator.@email + "'";

This seems to work and I can set up any approvers I want dynamically

Thanks

Jeremy