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
Bedrock Mission!

Learn more

View all

Sign in to view all badges

onBeforeCall and onAfterCall

Ramaswami
Level 4
Level 4

I see these two functions used in javascript node and written some code under these functions ( they defined the function ) 

like for example: 

 

in the javascript node of a workflow they added : 

function onBeforeCall() {
logInfo("task.activity:" + task.activity);

if ((activity.img.indexOf("nms:activities/delivery.png") != -1) || (activity.img.indexOf("nms:activities/email.png") != -1) || ((activity.img.indexOf("nms:activities/notification.png") != -1) && (task.activity == 'notification'))) {

 

// some code 

}

 

but i can't see where they called this function. Are these two functions called automatically OR these two functions are inbuilt functions. Where can i see them called but the code which is under this function gets executed when the workflow runs. 

 

i can see in some places in logs onAfterCall : 

 

Ramaswami_0-1599235217434.png

 

Is there any documentation available on these functions. 

 

1 Reply
nitesha38268385
Level 2
Level 2

Hi @Ramaswami ,

 

Can you please check in the advance tab of the activity.

 

By Right Click on the activity -> Open -> Advance Tab.

 

Regards,

Nitesh.

Sukrity_Wadhwa
Employee
Employee

Hi @Ramaswami,

Were you able to resolve this query with the given solution? Do let us know.

Thanks!