cancel
Showing results for 
Search instead for 
Did you mean: 

Transitioning a Document to a Specific Workflow

Kenyon_Krueger
Champ in-the-making
Champ in-the-making

Hi all,

I'm creating an IWorkFlow script that creates a revision of a document using the page data of another.

After this process is complete I would like the document to be transitioned to a specific lifecycle. I'm attempting to use the "AddToLifeCycle" method from the workflow class, but am having a hard time locating the method needed to find the lifecycle the document will be moved to.

Could someone please point me in the right direction?

Thanks,

Kenyon

1 ACCEPTED ANSWER

Kenyon_Krueger
Champ in-the-making
Champ in-the-making

I believe I have found the solution I was looking for. However, the document I am attempting to place in the LifeCycle does not appear in the LifeCycle after the script is executed. Below is the code I am using the move the document into the lifecycle:

 

Workflow workflow = App.Workflow;

LifeCycle lifeCycle = App.Workflow.LifeCycles.Find(117);

workflow.AddToLifeCycle(doc, lifeCycle);

 

Just to update this response: The reason why the above code was not working is because the document attempting to be moved was already present in another lifecycle. Removing the document said lifecycle resolved the issue.

View answer in original post

1 REPLY 1

Kenyon_Krueger
Champ in-the-making
Champ in-the-making

I believe I have found the solution I was looking for. However, the document I am attempting to place in the LifeCycle does not appear in the LifeCycle after the script is executed. Below is the code I am using the move the document into the lifecycle:

 

Workflow workflow = App.Workflow;

LifeCycle lifeCycle = App.Workflow.LifeCycles.Find(117);

workflow.AddToLifeCycle(doc, lifeCycle);

 

Just to update this response: The reason why the above code was not working is because the document attempting to be moved was already present in another lifecycle. Removing the document said lifecycle resolved the issue.