Issue
When calling the complete activity instance web service I get the following error:
System.NullReferenceException: Object reference not set to an instance of an object.
at Advantys.My.Globalization.TimeZoneInformation.GetTimeZone(Int32 timezoneIdentifier)
at Advantys.Workflow.Web.Services.Processes.Runtime.RuntimeService.CompleteActivityInstance(Int32 processInstanceId, Int32 activityInstanceId, String workflowContext)
Configuration
-
The
wfgen_admin
username is entered asmydomain/wfgen_admin
-
The
ApplicationSecurityRemoveDomainPrefix
entry in theweb.config
file has been set to_all
. -
If we remove the
web.config
setting we will get a user is not a participant error when trying to callcompleteactivity
.
Cause
The _all
value in the ApplicationSecurityRemoveDomainPrefix
parameter removes the domain name in the login name, which is why you are getting the error message, because the user is no longer found in the database after the domain name was removed from the login name:
-
The user’s username is stored as
mydomain\wfgen_admin
in the database. -
ApplicationSecurityRemoveDomainPrefix
is set to_all
, which removes the domain name from login name -
When you log in with
mydomain\wfgen_admin
, this will becomewfgen_admin
onceApplicationSecurityRemoveDomainPrefix
is applied. -
WorkflowGen then tries to find a user where username is equal to
wfgen_admin
, but couldn’t find it because the username is stored asmydomain\wfgen_admin
.
Solution
The solution is to not skip the domain name for users whose usernames are prefixed by a domain name.