09-03-2019 11:57 AM
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
09-04-2019 06:27 AM
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.
09-04-2019 06:27 AM
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.
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.