ExpressionTranslator Error when publishing Workflows

Damir Dobric Posts

Next talks:



Follow me on Twitter: #ddobric




When working with Workflows, which running in Workflow Manager (SP devs call it usually SharePoint Workflow) on-premises or in Office 365 you might get following error:

Expression: DateTime.Now.ToString()

"Property access conversion to an activity is not supported for property 'CurrentDomain' defined on type 'System.AppDomain'."

This error occurs during Translation of the workflow. The translation is a step in process of publishing of the Workflow in Workflow Manager. it basically translates all expressions in Workflow Activities in a form
required by XAML, before the workflow is published (installed) to the host.

Following picture shows an expression which will cause described error:


The picture left below shows XAML expression which is translated in a bit different expression (picture right below). Note that DateTime.Now.ToString() is in this case not evaluated. It is a pure string like “BLA, BLA”.

   <Assign sap2010:WorkflowViewState.IdRef="Assign_1">
        <OutArgument x:TypeArguments="x:String">






Right now, it is not possible to access properties within Expressions. To make this working you will unfortunately have to define the type to access properties. For example, if you want to access MyCustomTye.MyProp you will have to create the activity like GetMyCustomPropActivity and define InArgument<MyCustomTye> and OutArgument<yourproptrustedtype>. The later one will hold the value of MyProp.
This activity have to extend trusted surface (se URL below) even if the type is common .NET type like DateTime.

How to create custom activities:

Posted Mar 26 2013, 10:43 PM by Damir Dobric is a .Net Community Blog powered by daenet GmbH.