- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-02-2017 03:13 AM
Hi Community,
I'm wanting to add a new field to the Catalog Task Workflow Activity and for the value to be carried through to the Catalog Task itself, as per the behaviour of the Fulfilment Group, Assigned To and Short Description fields.
I know how to add the fields to the task table and the Workflow Activity Definition but I'm struggling with how to get the value to be set when the task is created.
I can fall back to using "Task Value from Values" rather than "Task Value from Fields" if I absolutely have to but this wouldn't be ideal as the new field is going to need setting on almost every Catalogue Task our Workflows generate, so it would be useful to have its own field in the Workflow Activity to serve as a reminder that it needs to be set for anybody creating Workflows in the future.
Regards,
Kyle
Solved! Go to Solution.
- Labels:
-
Service Catalog
-
Workflow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-05-2017 01:41 AM
I've managed to find the answer after digging around some more.
The Catalog Task Workflow Activity Defintion (where I put my new field to make it appear on the Workflow Activity) doesn't actually set the values from the fields, it invokes the Create Task Activity Definition first.
Once I was looking at the Create Task script it was pretty obvious how the fields were being set and I just needed to add a new line as per the following:
_setValuesFromFields: function(task) {
task.assignment_group = activity.vars.task_fulfillment_group;
task.assigned_to = activity.vars.task_assigned_to;
task.short_description = activity.vars.task_short_description;
task.description = activity.vars.task_instructions;
task.my_new_field = activity.vars.my_new_wf_field
},
Happy days.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-05-2017 01:41 AM
I've managed to find the answer after digging around some more.
The Catalog Task Workflow Activity Defintion (where I put my new field to make it appear on the Workflow Activity) doesn't actually set the values from the fields, it invokes the Create Task Activity Definition first.
Once I was looking at the Create Task script it was pretty obvious how the fields were being set and I just needed to add a new line as per the following:
_setValuesFromFields: function(task) {
task.assignment_group = activity.vars.task_fulfillment_group;
task.assigned_to = activity.vars.task_assigned_to;
task.short_description = activity.vars.task_short_description;
task.description = activity.vars.task_instructions;
task.my_new_field = activity.vars.my_new_wf_field
},
Happy days.