You are viewing limited content. For full access, please sign in.

Discussion

Discussion

Workflow Script - Can you select a Target CPU

posted on September 4, 2018

I am running into an issue with the 32-bit Dymo SDK using the 32-bit Laserfiche Workflow Server. If I run the workflow I get an error, if I press the play button to test in the script editor, the script works fine.

The error leads to a microsoft article that recommends changing the target CPU to "Any CPU". I keep running into this suggestion for fixing multiple SDK bugs, but is there even an option for this?

https://support.microsoft.com/en-us/help/2872151/you-cannot-print-from-a-32-bit-wpf-application-in-an-x64-based-version

0 0
replied on September 11, 2018 Show version history

What version of Workflow are you using? And what is the exact error you're getting?

0 0
replied on September 11, 2018

10.2.0.202.

On the 64-bit server I am no longer getting an error, but when the Dymo prints a vistor label, it is just a full black inked label with nothing on it. When I open the workflow, open the script, click the Play button, it prints a nice Visitor badge. So something is different about the way it is running my code when run from the workflow service.

On the 32-bit server similar experience, got everything working so that when I click Play in the script editor within the workflow, the visitor badge prints perfectly. When I would run the workflow, that runs the script, it would throw this error:

System.Printing.PrintQueueException: PrintTicket provider failed to bind to printer. Win32 error: Access is denied. at MS.Internal.Printing.Configuration.PTProvider..ctor(String deviceName, Int32 maxVersion, Int32 clientVersion)
at System.Printing.PrintTicketManager..ctor(String deviceName, Int32 clientPrintSchemaVersion)
at System.Printing.PrintQueue.get_DefaultPrintTicket()

0 0
replied on September 5, 2018

It sounds like you'll need to use the 64-bit Workflow server so that your code runs in a 64-bit process.  Is there a reason you're using the 32-bit one?

0 0
replied on September 5, 2018

We want to use a Dymo visitor badge printer. Dymo's development kit is 32-bit. They don't seem to list a 64-bit version. I have 64-bit workflow and 32-bit workflow installed, I can use either or but I am just trying to use the proper one for the SDK.

0 0
replied on September 5, 2018

This page makes it sound like they've had 64-bit support for a while, if that's the SDK we're talking about.

0 0
replied on September 5, 2018

Interesting, I will give it another shot next week, I have it installed on the 64-bit server still. I tried to find a 64-bit DLL but their one and only installer seemed to create a 32-bit DLL. Maybe I missed something.

0 0
replied on September 11, 2018

Dymo says to just use the 32-bit DLL from any 64-bit process. Again, it works fine from the Workflow Designer, on the 64-bit OS when testing the script. But if I run the workflow it just prints a black image. There is something outside of my control that changes my code when the workflow runs, something I have no visibility into. The code is perfect until the workflow engine runs it.

0 0
replied on September 5, 2018

I don't know of a way to control how script activities compile. You might try wrapping the library in an external DLL compiled the way you want, and see if Workflow will run it.

0 0
replied on September 5, 2018

I think it already is wrapped in an external DLL. I included the 32-bit dymo DLL and I am only calling methods from that DLL. It works in the workflow designer, but errors when the workflow runs with the unable to bind to printer error. According to Microsoft the problem is related to a CPU target problem in Windows Server 2012 which happens to be the OS for the 32-bit workflow server.

0 0
replied on September 5, 2018

I was thinking about wrapping it in your own assembly, and compiling that the way you want. However, the more I think about it, that won't work.

For reference: https://stackoverflow.com/a/5229805

0 0
replied on September 5, 2018

That article seems to add more confusion to the problem. Microsoft is recommending using Any CPU but they are stating that Any CPU will run at the maximum bit support for the OS, which is going to be 64. I installed the 32-bit Workflow so that it would run with 32-bit instructions, this is because the SDK and the driver are 32-bit and you can't send 64-bit instructions to 32-bit applications or drivers. The thing is, it is working, so it must be using 32-bit instructions. I am just trying to get it working when the workflow runs, where for some reason it seems to be changing my settings, possibly to 64-bit? How can 32-bit workflow use 64-bit instructions though?

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.