
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā01-05-2019 03:31 PM
Hello all,
I have a simple workflow which generates tasks as part of fulfillment after an end-user submits a ticket via a record producer. On all of these tasks, I have provided the fulfiller with the option to set it to a specific custom state "Rejected by Fulfiller" which in turn will mark the ticket as closed, cancel the workflow (via a business rule) and generate an email to the end-user with certain details. The end-user has an option to re-open their ticket via a UI action which restarts the workflow.
Here's the problem, when the workflow is restarted, the same tasks are re-opened by the workflow instead of new ones being created. This is a problem for several reasons on my end so I need to figure out how to get the workflow to generate brand new tasks instead of re-using existing ones it created previously.
Some things I've tried which still resulted in the same tasks being used: (note - i'm in a scoped app so you will see global in front of workflow below)
1) Restarting the workflow via:
new global.Workflow().restartWorkflow(current, false);
2) Deleting the existing workflow and then creating a new one via: (workflowName is a variable set in another part of my code)
var oldWorkflow = new global.Workflow();
oldWorkflow.deleteWorkflow(current);
var newWorkflow = new global.Workflow();
newWorkflow.startFlow(new global.Workflow().getWorkflowFromName(workflowName), current , '');
Hoping other individuals in the community have a solution which will allow me to restart or create a new instance of the workflow on the ticket and generate new tasks.
Solved! Go to Solution.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā01-06-2019 08:10 AM
I don't think there is a way to create new tasks using the methods that you had specified using create task workflow activity.
If you use Run script activity to generate tasks you can be able to create new tasks using startFlow

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā01-06-2019 08:10 AM
I don't think there is a way to create new tasks using the methods that you had specified using create task workflow activity.
If you use Run script activity to generate tasks you can be able to create new tasks using startFlow