Easy way to add a large list of variables to multiple Catalog Task Activity in a workflow

peterscaramuzzo
Tera Expert

I inherited a Catalog item that has a workflow with about 10 catalog task activities. The user has asked to restructure the task variables available on the generated task. Problem is that the list is extensive!!! What I would like to do is just remove them all and repopulate with a known list I generated per her wishes rather than selecting them one at a time. Is this possible? I am worried the user will find others she needs and would like to use the same process to add any new ones as well. Also, the drudgery of going through that huge list is not fun. It's not worth consolidating this into one task btw. They are all interconnected with approvals and specific tasks unfortunately.  Is the slush bucket method of selecting one at a time the only way?

6 REPLIES 6

Hi @peterscaramuzzo ,

that would be 

sc_item_option

sc_item_option_mtom

 

here is good blog around it

 

https://davidmac.pro/posts/2024-01-11-sn-variables-reference/

 

Please mark my answer as helpful/correct if it resolves your query.

Regards,
Chaitanya

 

Hi @peterscaramuzzo ,

To show variables on specific Catalog Tasks:
Open the Workflow.
Click on the Catalog Task activity.
In the activity configuration, locate the “Variables” slush bucket.
Select only the variables you want to show for that specific task.
This way, each Catalog Task can have a tailored set of variables without affecting others.

Reusable process You can:

Store the variable list in a Script Include or Custom Table.
Create a UI Action or Scheduled Job to apply the list to tasks as needed. Trigger via UI Action or Scheduled Job
UI Action:
Add a button on the Catalog Task form to run the Script Include.
Script:
new TaskVariableManager().applyVariablesToTask(current.sys_id);

Scheduled Job:

Run periodically to apply variables to new tasks based on your config table.

Please mark my answer as helpful/correct if it resolves your query.

 



Thank you
Chandan