Workflow getting paused without error. | Community
Skip to main content
Level 2
February 20, 2023
Solved

Workflow getting paused without error.

  • February 20, 2023
  • 3 replies
  • 6163 views

Hi ACC Friends,

My Recurring Campaign workflow getting into paused state and in the journal ,i am seeing below warning.

02/20/2023 5:46:02 AM Automatically resuming workflow 82678309 (number of consecutive times: 1).

 

at the end of workflow, we are calling stop method using queryDef (xtk.workflow.Stop(wf.@id)) .

And this issue not happening with every workflow, most of our recurring workflow running fine with above method, but few of them getting paused with above warning no other error.

Does anyone know why this warning is throwing in the workflow?

 

Thanks!!!

@parthasarathy @shubham_goyal__ @_manoj_kumar_ @david--garcia @craig_thonis @costa_n11 @akshaaga 

 

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Pradyumn

Hi @sukrity_wadhwa  ,

I had implemented different solution. did not try Manoj's, solution 
using sqlExec("UPDATE Xtkworkflow SET istate ='"+20+"' WHERE iWorkflowId ='"+instance.id+"'");

Our requirement was marked that workflow finished intensely.

 

Thanks!!

Pradyumn 

3 replies

david--garcia
Level 10
February 20, 2023

Share the whole script.

akshaaga
Adobe Employee
Adobe Employee
February 20, 2023

Hi @pradyumn,

The warning message suggests that your workflow (number 82678309) was paused and then automatically resumed by the system, with one previous occurrence of this happening.

Without more information, it is difficult to pinpoint the exact cause of the pause.

Regarding the warning message, it is the normal behavior of the system to automatically resume a paused workflow after a certain amount of time. This is usually done to prevent the workflow from pausing indefinitely or 

The "xtk.workflow.Stop()" method is used to stop the workflow from running further. However, if the workflow is already in a paused state, calling this method may not have any effect.

To further diagnose the issue, we would need to have the complete logs and detailed error messages. 

PradyumnAuthor
Level 2
February 21, 2023

Hi @akshaaga , please find above few more logs, as the workflow getting in paused state at end activity where we had written the JS code to Finish the workflow forcefully.  And end activity task is also in pending state:

 

However, if the workflow is already in a paused state, calling this method may not have any effect?--> are you saying that if the workflow in pause state , calling xtk.workflow.Stop(wf.@id) method , will make any change in the workflow state ?

 

_Manoj_Kumar_
Community Advisor
Community Advisor
February 20, 2023

Hello @pradyumn ,

 

Sometimes the xtk.workflow.stop does not work within the same workflow.

 

Use these two methods:

xtk.workflow.Stop(wf.@id); xtk.workflow.Kill(wf.@id)
     Manoj     Find me on LinkedIn
PradyumnAuthor
Level 2
February 21, 2023

Hi @_manoj_kumar_  so are you recommending to use Kill method instead of Stop ?

_Manoj_Kumar_
Community Advisor
Community Advisor
February 21, 2023

Hello @pradyumn 

 

I am not sure what else is happening in your workflow. But if you want to stop the workflow and STOP is not working, then Kill will stop the workflow.

 

I have used this in one of my use cases where the workflow was started on demand with Start and was stopped/killed at the end of the workflow.

     Manoj     Find me on LinkedIn
_Manoj_Kumar_
Community Advisor
Community Advisor
March 9, 2023

Hello @pradyumn 

 

Here is the solution:

 

Please create a new workflow. Let's call it a workflow stopper. It will start with an external signal and then a javascript code.

In this Javascript activity, add the following code.

xtk.workflow.Stop(vars.wfid); xtk.workflow.Kill(vars.wfid)

 

Now in your the workflow that you want to stop:

Call this stopper workflow by the postevent and pass the current workflow id as a variable.

xtk.workflow.PostEvent("INERTNAL_NAME_OF_STOPPER_WORKFLOW", "signal", "", <variables wfid={wf.@id} />, false)

 

Let me know if that works for you.

     Manoj     Find me on LinkedIn
Sukrity_Wadhwa
Community Manager
Community Manager
April 4, 2023

Hi @pradyumn,

Was @_manoj_kumar_'s solution helpful to resolve your query? In case it was helpful, then kindly choose it as the 'Correct Reply'. If not and you still need more help, then do let us know.

Thanks!

Sukrity Wadhwa
PradyumnAuthorAccepted solution
Level 2
April 4, 2023

Hi @sukrity_wadhwa  ,

I had implemented different solution. did not try Manoj's, solution 
using sqlExec("UPDATE Xtkworkflow SET istate ='"+20+"' WHERE iWorkflowId ='"+instance.id+"'");

Our requirement was marked that workflow finished intensely.

 

Thanks!!

Pradyumn