1

We have a workflow which locks the component on save and goes through the various approval steps.

However, in child publications if any operation is being performed, I want to check on the basis of events performed on that, only if the component is not in the workflow.

I tried using

component.GetProcessDefinition() != null

bu this condition holds true if any workflow is enabled for the component whereas I want to see if the component is in the workflow but with TOM.NET.

Any help would be appreciated.

Thanks.

1 Answer 1

2

You can use:

component.LockType.HasFlag(LockType.InWorkflow)
2
  • Thanks for your answer, it is working. I also tried doing subject.CurrentActivity!=null and it is solving the purpose too, is there any difference?
    – Yash
    May 20, 2016 at 10:34
  • No, that is functionally equivalent. May 20, 2016 at 15:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.