I have created an Import Workflow For loading Data into Schema from Server.Before the end activity I have placed a js activity.It is used to set value of an option variable(RunningFlag) to 0 in order to indicate that the workflow has finished execution. PFB the screenshot of the same.
The import workflow loads data into Several schema's and receive more than 2000 interface files containing crores of data.But after loading all the schema and upon reaching this js activity,the js activity is in pending state and workflow is in started state for hours. And when i tried to stop the workflow ,the workflow was in stop requested state for hours and finally i had to do unconditional stop to finish the workflow. PFB the log of JS activity.
I have also checked the keep the result of interim populations between to executions option in the workflow properties tab.Is this the reason for the pending state of js activity as this will be storing huge amount of temporary data
Could some one please explain Why js is in pending state for this much time and do i have to follow some steps to avoid this scenario?