Hello Everyone,
So far you were very helpful and I really appreciate that!
I'm a new user of Adobe Campaign Classic and I'm facing a problem with some of my workflows.
Some of the workflows I made stops from running because of an error ; ORA-210000 (timeout occurred)
The problem is not due to our database since it's running and there's no issue with it.
My question is, is there any workflow I can build that can restart the workflows that stop from running, please?
Thanks.
Solved! Go to Solution.
Views
Replies
Total Likes
Views
Replies
Total Likes
You could build a workflow that will scan all the "production" workflows status and use api command like:
You create a workflow with the query activity linked to a JS activity.
In the JS, you use a query def function with "vars.targetSchema" as schema declaration: it will select automatically the content of your previous query activity
Data oriented APIs | Adobe Campaign
Then you loop on the query result in order to execute your restart function
Netherless, you have a connection issue with the DB and your AC instance and you should spend time to investigate the root cause as restarting automatically workflows due to this problem is for having a better resilience while the issue is addressed
Views
Replies
Total Likes
Hi @LaurentLam
Thank you for your response,
Do you have any page where this kind of workflow is explained, please? I'm not sure I got all of what you described;
Is this the code I need to put in the JS activity ?
vars.targetSchema
Restart (
String
workflowId
)
Then after the JS activity I just end the workflow there?
Thank you
Views
Replies
Total Likes
Hi, I do not have ACC on this laptop unfortunately so I cannot develop it with you. But no, that's not the code at all I'm describing: you can inspire yourself about this code I've just wrote in notepad:
var wkf2restart = NLWS.xtkQueryDef.create(
<queryDef schema={vars.targetSchema} operation="select">
<select>
<node expr="@internalName"/>
</select>
</queryDef>
);
var workflows = wkf2restart.ExecuteQuery()
for each(var workflow in workflows.*) {
logInfo("restarting :" + workflow.@internalName);
xtk.workflow.restart(workflow.@internalName);
}
Views
Replies
Total Likes
Hi @LaurentLam
Thank you so much.
I will test it ASAP. It would be great if it works until we figure out the root of the problem.
Thanks
Views
Replies
Total Likes
Hi @LaurentLam
I tried to implement the workflow you described and the code you provided to test what would happen to my "not running workflows" but got this error
Here's the query I associated with the JS activity.
It seems that I did something wrong.
Thank you
Views
Replies
Total Likes
Views
Replies
Total Likes
Hi @LaurentLam
I put this query
@InternalName (equal) WKFxxxx (it's the workflow I want to restart if it stops)
and
@State (not equal) Started
Then I attached it to the code you provided but I got the error.
Thanks for your help
Views
Replies
Total Likes
Views
Replies
Total Likes
Thank you for all your responses.
After adding the additional data @internalName
I no longer have that error but I got this one this time, I think it's a code error *
Here's the code I used :
var wkf2restart = NLWS.xtkQueryDef.create(
<queryDef schema={vars.targetSchema} operation="select">
<select>
<node expr="@internalName"/>
</select>
</queryDef>
);
var workflows = wkf2restart.ExecuteQuery()
for each(var workflow in workflows.getElement()) {
logInfo("restarting :" + workflow.@internalName);
xtk.workflow.restart(workflow.@internalName);
}
Views
Replies
Total Likes
Views
Replies
Total Likes
Hi @LaurentLam
It seems that this code doesn't like me. It's still making errors
Here's my code box in case.
I can't thank you enough for your time and help
Views
Replies
Total Likes
Views
Replies
Total Likes
Views
Replies
Total Likes
Hi,
It's not normal to have db connection regularly die at random.
If the db is fine try adjusting client settings?
Thanks,
-Jon
Views
Replies
Total Likes
Thank you so much for your response.
Yes, it's not normal. It happens with a workflow that turns every 8min. We thought that it's due to its frequency. What do you think?
Thanks
Views
Replies
Total Likes
Views
Replies
Total Likes
@LaurentLam Ok, thank you for your feedback it's always so helpful. We will make sure to address the issue
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies