Invoke Workflow Error: not a valid value for Int32

Hello everyone,

When running a process in a workflow, I receive the following error message. What could be the reason for this?

Program Files\Bank Workstation\Bank Workstation_UserID_AG_pruefen.xaml - Invoke Workflow File: 1680, 71, 195, 26 is not a valid value for Int32.

The workflow does not contain any int variables.

The following arguments are available, and there is also a string variable within the workflow.

After the error, I have to reopen the project so that I can access the workflow argument import.

Thank you in advance.

Hi,

The following topic may help you.

Regards,

Unfortunately, that doesn’t help me.

I have the following assign in the initialization:

image

However, this is only needed for a date calculation in the part of the dispatcher.

Can this be the cause of the workflow error and how can I fix it?

Hi,

How about deleting the Assign activity?

Regards,

This is required for the date calculation in the Dispatcher. If I don’t let the assign execute and go directly into process editing, the error doesn’t come.

How else can I use the CultureInfo for the date calculation for Germany or how can I change the value of the CultureInfo of the assign?

@Prisemuetchen,

You can achive this by below logic.

Assign Activity: germanCulture = New CultureInfo("de-DE")
Assign Activity: formattedDate = DateTime.Now.ToString("dd.MM.yyyy", germanCulture)

Unfortunately, that doesn’t work. I get an error when using the following formula.

What can I do?

The string was not recognized as a valid DateTime.

Hi @Prisemuetchen,

Can you confirm what happens before this workflow activity?

Can be the cause that modifications you are doing to data before invoking this workflow is causing this issue. And then when you are passing that data during invoke workflow as in argument, it’s causing issues.

Can you not do the culture modification before passing on the data(in initialisation) but inside the workflow after receiving the data?

I think that should help.

Regards
Sonali

@Prisemuetchen ok and what’s that error you are getting?

This here:
The string was not recognized as a valid DateTime.

@Prisemuetchen,

The error could be due to invalid input date string.
Try creating separate variables for each expressions you have clubbed in a single code expression to debug and find the exact root cause.

Try evaluate each part in immediate panel and see what’s wrong in which part.

Thanks, I found the error. The text in the Excel file was formatted not as text but as a date.

1 Like

@Prisemuetchen cheers!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.