Skip to main content
Level 3
Feb 20, 2023 10:09 AM UTC
Solved

Workflow getting paused without error.

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.
PradyumnAccepted solution
Level 3
Apr 4, 2023 6:43 AM UTC

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 

21 replies

david--garcia
Level 10
Feb 20, 2023 12:36 PM UTC

Share the whole script.

Translate
https://www.linkedin.com/in/david-garcia-uk/ | https://martech.network
akshaaga
Adobe Employee
Adobe Employee
Feb 20, 2023 2:13 PM UTC

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. 

Translate
PradyumnAuthor
Level 3
Feb 21, 2023 3:46 AM UTC

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 ?

 

Translate
Manoj_Kumar
Community Advisor
Community Advisor
Feb 20, 2023 10:00 PM UTC

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)
Translate
Manoj  | https://themartech.pro
PradyumnAuthor
Level 3
Feb 21, 2023 3:48 AM UTC

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

Translate
Manoj_Kumar
Community Advisor
Community Advisor
Feb 21, 2023 3:58 AM UTC

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.

Translate
Manoj  | https://themartech.pro
Manoj_Kumar
Community Advisor
Community Advisor
Mar 9, 2023 3:06 AM UTC

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.

Translate
Manoj  | https://themartech.pro
Sukrity_Wadhwa
Level 4
Apr 4, 2023 6:17 AM UTC

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!

Translate
Sukrity Wadhwa
PradyumnAuthorAccepted solution
Level 3
Apr 4, 2023 6:43 AM UTC

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 

Translate