Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

RestartTask Workflow SOAP Calls Failure

Avatar

Avatar
Validate 1
Level 2
robertw937098
Level 2

Likes

3 likes

Total Posts

19 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 3
Boost 1
View profile

Avatar
Validate 1
Level 2
robertw937098
Level 2

Likes

3 likes

Total Posts

19 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 3
Boost 1
View profile
robertw937098
Level 2

12-12-2018

Hi,

I am having an issues getting the below JavaScript to run. It continuously fails. Please could you assist?

JavaScript Code

Within the JavaScript code activity is the below script:

xtk.workflow.RestartTask("WKF36072", "fork");

1645050_pastedImage_0.png

Adobe Documentation

https://docs.campaign.adobe.com/doc/AC/en/jsapi/sm-workflow-RestartTask.html?hl=restarttask

Error logs

12/12/2018 15:54:42 JavaScript: error while evaluating script 'WKF36344/js'.

12/12/2018 15:54:42 Error while executing the method 'RestartTask' of service 'xtk:workflow'.

12/12/2018 15:54:42 W0.iTaskIdentifier DESC' could not be executed.   Param(0)=Hello   Param(1)=fork   Param(2)=1

12/12/2018 15:54:42 SQL statement 'SELECT   W0.iWorkflowTaskId, W1.sInternalName, W1.iStatus, W1.mData FROM XtkWorkflowTask W0 JOIN XtkWorkflow W1 ON (W1.iWorkflowId = W0.iWorkflowId) WHERE (W0.iWorkflowId = :#(1)# AND W0.sActivity = :#(2)# AND W0.iStatus = :#(3)#) ORDER BY

12/12/2018 15:54:42 PostgreSQL error: ERROR:  invalid input syntax for integer: "Hello" LINE 1: ...kflowId = W0.iWorkflowId) WHERE (W0.iWorkflowId = E'Hello' A...                                                              ^

Thanks,

Rob

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Validate 1
MVP
Jean-Serge_Biro
MVP

Likes

353 likes

Total Posts

464 posts

Correct Reply

153 solutions
Top badges earned
Validate 1
Boost 50
Boost 5
Boost 3
Boost 250
View profile

Avatar
Validate 1
MVP
Jean-Serge_Biro
MVP

Likes

353 likes

Total Posts

464 posts

Correct Reply

153 solutions
Top badges earned
Validate 1
Boost 50
Boost 5
Boost 3
Boost 250
View profile
Jean-Serge_Biro
MVP

12-12-2018

Hi Robert,

The 1st parameter must be an integer, it means the workflow.id (the primary key value) not the workflow internal name.

Regards
J-Serge

Answers (2)

Answers (2)

Avatar

Avatar
Validate 1
Level 2
robertw937098
Level 2

Likes

3 likes

Total Posts

19 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 3
Boost 1
View profile

Avatar
Validate 1
Level 2
robertw937098
Level 2

Likes

3 likes

Total Posts

19 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
Boost 3
Boost 1
View profile
robertw937098
Level 2

12-12-2018

Amazing, thank you for the answer and quick response!

That works now using the workflow PK, thought it was odd the error wanted an integer.

This must be a mistake in the documentation!

Avatar

Avatar
Validate 1
MVP
Jean-Serge_Biro
MVP

Likes

353 likes

Total Posts

464 posts

Correct Reply

153 solutions
Top badges earned
Validate 1
Boost 50
Boost 5
Boost 3
Boost 250
View profile

Avatar
Validate 1
MVP
Jean-Serge_Biro
MVP

Likes

353 likes

Total Posts

464 posts

Correct Reply

153 solutions
Top badges earned
Validate 1
Boost 50
Boost 5
Boost 3
Boost 250
View profile
Jean-Serge_Biro
MVP

12-12-2018

hum, sorry, strange the documentation says that both identifier and internal name are supported.