Is it possible to clone a workflow activity definition with all activity variables
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2014 10:10 AM
Hello,
I am trying to clone a workflow activity definition "Create Task" with all activity variables. I am able to clone the workflow activity Definition without any activity variables using Insert. Is there a way to clone a workflow activity definition "Create Task" with all activity variables?
- Labels:
-
Service Mapping
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-31-2022 05:25 PM
invalid Activity Definition for [custom copy name]
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2022 04:49 AM
Hi jeff, i am also getting same error. did u resolved it?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-14-2022 02:22 PM
Hi Chitra.
I wasn't able to resolve the issue with cloning the Approval - Group workflow activity. However, I did find an alternative solution to the original issue of the activity deleting previous group approval records.
Good luck ????
// Make sure wf_activity of the last approval is removed to avoid the deletion of the record
var sysid_current = current.sys_id.toString();
var grApproval = new GlideRecord('sysapproval_approver');
grApproval.addEncodedQuery('state=approved^wf_activity!=NULL^sysapproval=' + sysid_current );
grApproval.query();
while (grApproval.next())
{
grApproval.setValue('wf_activity','');
grApproval.setWorkflow(false);
grApproval.update();
}
// Also make sure wf_activity of the last group approval record is removed to avoid the deletion of the record
var grGroupApproval = new GlideRecord('sysapproval_group');
grGroupApproval.addEncodedQuery('approval=approved^wf_activity!=NULL^parent=' + sysid_current );
grGroupApproval.query();
while (grGroupApproval.next())
{
grGroupApproval.setValue('wf_activity','');
grGroupApproval.setWorkflow(false);
grGroupApproval.update();
}