We have a implemented workflows and in a particular scenario when the component is being imported through Content Porter, I am finishing workflows forcely by using below code snippet:
var processInstance = new ProcessInstance(component.CurrentActivity.Process.Id, session);
processInstance.ForceFinish(new ApprovalStatus(session));
However, this leaves the component in "Unapproved" state.
As a result the page containing this component cannot be published as we have minimum approval status set at Publication Target.
To leave the component in "Undefined" state,I have tried using below lines:
processInstance.ForceFinish(new ApprovalStatus(new TcmUri("tcm:0-0-0"), session));
processInstance.ForceFinish(null);
But no luck, has anyone done something like that?
We have Tridion 2013 SP1.
Thanks in advance.