Domanda

I want to define a simple object from a class with only one property as a variable in sharepoint 2013 workflow.

The Class code is:

 public class RssFeedItem
{
    public string Title { get; set; }
}

I can create a variable with this type in workflow as you can see at the following image:

enter image description here

After that i add an Assign Activity, and set FeedTitle=MyFeed.Title:

enter image description here

But when i built workflow i get the following error:

enter image description here

Error message is: Failed to translate expression 'MyFeed.Title' because of the following error: Property access conversion to an activity is not supported for property 'Title' defined on type 'FeedReaderLib.RssFeedItem'.

Could anyone help me to solve this problem?

Any help would be appreciated.

È stato utile?

Soluzione 2

I solve my problem.

I just need to update SharePoint 2013 to Service Pack 1, and then Rerun SP-Register workflow service on SharePoint.

Altri suggerimenti

It seems that you have not added the RssFeedItem to the AllowedTypes.xml check if your .dll file for FeedReaderLib and AllowedTypes.xml are placed inside those folders:

C:\Program Files\Workflow Manager\1.0\Workflow\Artifacts
C:\Program Files\Workflow Manager\1.0\Workflow\WFWebRoot\bin

You can find more details on AllowedTypes.xml structure here: Defining and using custom code activities and types in a Workflow Manager

But as the article says :

Extending the set of allowed types and activities has potentially a huge impact on the security, performance, scalability and availability of Workflow Manager 1.0 and should not be considered unless absolutely necessary, for example, when workflows need to perform sophisticated calculations or data transformation that would be impractical to author in an declarative activity. In this case, advanced users may want to use a custom code activity instead. The server administrator can extend the set of allowed types to include this code activity, providing that the administrator fully trust this code activity.

Maybe it is worth giving a try using the DynamicValue type?

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top