ERROR "There are no workflow contexts for this document"

Charan
Giga Contributor

When looking at an RITM of a ticket, scrolling down until you select "Show Workflow " in Related Links. When we click that link to see the workflow get an error "There are no workflow contexts for this document" 

 

I have Checked the UI Action Of Show Workflow It was Perfect....

 

find_real_file.png

Regards,

Charan.

1 ACCEPTED SOLUTION

Subrahmanyam2
Giga Guru

Hi Charan,


Workflow gets attached as soon as the request item record gets created in the instance. [Unless you are triggering a workflow from BR rather than standard approach].

If the request item is closed and it has been over 6 months or so since closure, system automatically cleans up the contexts which are no longer running.

Also, unless you or someone customized the show workflow UI action, normally if the context is already cleaned up the show workflow button will not appear.

In your case, since it is still showing there could be two reasons I can think of.

a) Someone with admin rights manually deleted the context record knowingly or unknowingly

b) Show Workflow UI action code is customized in your case and it may be causing it to display the related link without a context record

c) Context field on the sc_req_item table must not be reutilized for anything. If there is code which is doing this then you may land into this issue (Extremely rare case with developers)


There could be many other reasons, but you may need to deep dive inside your system logs to find the reason for the same.

Transaction cancellations also can cause this issue (in rare cases, unless some logic on your BR's causes it to do it )

 

Hope this helps!

 

--

Subrahmanyam

View solution in original post

4 REPLIES 4

Sai Kumar B
Mega Sage
Mega Sage

@Charan 

Is the REQ approved?   You will receive a "There are no workflow contexts for this document" error if the REQ is NOT approved.  The RITM workflows do NOT attach until the REQ is approved.

Also, check if the context is available in the wf_context  table

HI saikumar 

 

REQ is approved 

context is showing Record not found

That means that the workflow has not started.

I'm also assuming that you are not working in a cloned environment as clones will not normally keep the old workflow context.

Subrahmanyam2
Giga Guru

Hi Charan,


Workflow gets attached as soon as the request item record gets created in the instance. [Unless you are triggering a workflow from BR rather than standard approach].

If the request item is closed and it has been over 6 months or so since closure, system automatically cleans up the contexts which are no longer running.

Also, unless you or someone customized the show workflow UI action, normally if the context is already cleaned up the show workflow button will not appear.

In your case, since it is still showing there could be two reasons I can think of.

a) Someone with admin rights manually deleted the context record knowingly or unknowingly

b) Show Workflow UI action code is customized in your case and it may be causing it to display the related link without a context record

c) Context field on the sc_req_item table must not be reutilized for anything. If there is code which is doing this then you may land into this issue (Extremely rare case with developers)


There could be many other reasons, but you may need to deep dive inside your system logs to find the reason for the same.

Transaction cancellations also can cause this issue (in rare cases, unless some logic on your BR's causes it to do it )

 

Hope this helps!

 

--

Subrahmanyam