Create a task depending on user choice

dev_K
Tera Contributor
Spoiler
 

Hello,

 

 

I am trying to create 2 tasks assigned to different groups depending on the user selection.

 

Let's say if user selects TST or GTU a task will be assigned to team 'X'. if he selects UAT or PRD it will be assigned to a team 'Y'. However if user selects options that are supposed to be assigned to either X or Y (example: user selects: GTU and UAT) in this case it will be assigned to the group 'X'

 

dev_K_0-1717594330717.png

 

 

in my catalog item i created 2 tasks with order 100, one assigned to X, other to Y

dev_K_1-1717594583458.png

 

 

what will be the advanced start condition for both tasks?

dev_K_2-1717594627526.png

 

 

is 

var environmentsSelected = grReqItem.variables.environment an array or a string?
2 REPLIES 2

AshishKM
Kilo Patron
Kilo Patron

Hi @dev_K , 

Try with below code and test.

 

// check if checkbox value are true
var isTSTChecked = (current.variables.tst == 'true'); // update the field name of TST
var isGTUChecked = (current.variables.gtu == 'true'); // update the field name of GTU
var isUATChecked = (current.variables.uat== 'true'); // update the field name of UAT
var isPRDChecked = (current.variables.prd == 'true'); // update the field name of PRD

// apply the if condition for checked values and assigne the task.assignment_group




 

-Thanks,

AshishKM


Please mark this response as correct and helpful if it helps you can mark more that one reply as accepted solution

Kieran Anson
Kilo Patron

Hi,

I'm not aware of a workflow activity definition that has an advanced start condition. Is this a custom workflow activity?