Tasks getting stuck?

@Randy @aidacra @Nathan_Woolen @Chris_Conn

I think it is either failing to create the correct “object” at this point:

var soForm = Ice.Assemblies.ServiceRenderer.GetService<Erp.Contracts.SalesOrderAckSvcContract>(Db);
SalesOrderAckTableset soTS = soForm.GetNewParameters();
SalesOrderAckParamRow r = soTS.SalesOrderAckParam[0];

OR

at the very end:

soForm.RunDirect(soTS);

Something is not getting set.

Any ideas?

It might be useful to make a BAQ on SysTask and filter her records so you can have look if there are any clues there. Probably the best thing to do is check the box DEBUG IN VISUAL STUDIO on your customization. Then you can put a breakpoint there and actually view the object before it’s passed (and after for that matter)

If you don’t own VS, you can get the community edition for free.

@Chris_Conn I am not sure how to debug in VS. We have tried to do it a few times, but we haven’t had much success. The most we’ve been able to do is correctly reference all the assemblies for a certain BO and then write some code and verify that its syntax is correct.

We have never imported a session to an Epicor environment or done debugging on live events. Do you have any documentation or guides that you use to set this up?

No setup required :slight_smile:

Make sure you have a recent copy of VS installed.
Activate customization mode with wrench icon in E10
Click screen menu you want - selection screen opens
Check DEBUG in VS and select the desired customization
Click OK

VS will automatically open in needed (DO NOT CLOSE VS UNTIL YOU ARE DONE DOING ANY E10 DEBUGGING - if you do, you will also have to restart E10 to debug again)

VS opens up to a breakpoint at the startup of your customization (like at the top of your script)

Put a breakpoint on soForm.RunDirect(soTS);
You can put your cursor on the line and press F9 - you’ll get a red circle to the left, this is the breakpoint icon
Note that F9 toggles, so if you press it again, your breakpoint goes away

Once BP is set - click the green run icon (or F5) - Your form will load up and display. Do whatever triggers your bit of code and the breakpoint will be triggered.

Now you can hover over the soTS object to view its state (or add it watch window).

If it’s null, that’s an issue but also drill down into the object to look at the fields you think you’ve set.

Blockquote

2 Likes

I would like to add that debugging like this on the client affects only the client. You wont cause any issues with other users or the system (unless you really try - and if you do, call me if you want some help to do that haha) - the reason I point this out is because when you start debugging on the server side that’s a horse of different color. Breakpoints on the server - break EVERYONE haha

3 Likes

@Chris_Conn Sweet! Thanks so much, my colleague and I will try it out!

1 Like

@Chris_Conn The debug only works for form customization right? This is a data directive.

You can debug directives too but it’s a much different beast.

@Chris_Conn , makes sense. It seems this issue I am having has to do with the client side printing. I am not sure why it works for everyone else in the company, but not for this one person.

@aidacra @Chris_Conn @josecgomez I have just found in the SysTaskParam table that the report is being printed with the printer name as “PDFCreator” for the user that is having issues. Everyone else has this parameter blank when they print.

Do any of you know where this parameter is getting its value from? This is not a report that you choose a printer for. It is set using code from this thread BPM Method on SSRS Email (print) a Sales Order? - #13 by knash - ERP 10 - Epicor User Help Forum and the code referenced by @Randy above.

Delete any user personalizations (for this user) in this screen and see if it makes a difference. Maybe he has set some saved defaults or something weird.

1 Like

@josecgomez thanks for the quick reply, I have already purged the personalizations for this user.

It is just strange that this parameter field is being set to a different value than everyone else and it doesn’t matter what computer they are on. I can be on my computer logged in as her and the same value comes through. That printer isn’t even installed on my machine.

Just called Epicor and they told me to bring up the print prompt for the specific report (Order Acknowledgement) and then Actions>“Remove Defaults.” This worked!
Apparently these are stored whenever the report is printed for the user. removedefaults

2 Likes

That’s what I meant by saved defaults sorry I wasn’t more clear. Glad it is solved :slight_smile:

3 Likes

I have a set scheduling task order ‘stuck’ as Active - since Midnight - How do I abort it?

You could stop and then start the task agent.

Agreed with @utaylor and if that doesn’t work. Support has helped us before with clearing the task when it was truly stuck back in 10.1.5xx if you happen to be on that version and hit the same issue.

Doesn’t that just restart the task again? - Is there a way to remove the task completely so it doesn’t restart?

It shouldn’t restart the task UNLESS the task is scheduled as continuous processing. Do you have the task scheduled in the system agent?

If you no longer wish to have it scheduled, you need to go to your system agent and find the schedule that it is assigned to.

You are correct - in cancelled and did not restart.

Thank you!

Since we upgraded to 10.2.200.11 over the weekend (from 10.2.400.19) we have had major problems with the task agent service - and when to try to stop it and restart it - it hangs - so I have to run task manager to end the service, restart the service, then go restart the agent. Support even had me recreate the task agent yesterday - doesn’t seem to have fixed the underlying issue. hmm? Any ideas? Anyone else having trouble?

Patty Richter

Able Die Casting

847-678-1992 ext. 28
847-224-5001 (cell)

parichter@ablediecasting.com