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

Question

Question

error CS0117: 'xxxx' does not contain a definition for 'xxxxProperty' when publish workflow

asked on December 7, 2022 Show version history

I have a custom activity that I set a property value to reference another activity's property

 

I selected the reference property and try to publish but I got the following error:

 

The property UseAnchorString is a public property and in the generated proxy I can see

UseAnchorStringPropertyName but not UseAnchorStringProperty

 

If I do not use "make reference to another activity reference" and say set it to a checkbox (boolean) the publish works fine.

Any idea why it failed?

0 0

Replies

replied on December 7, 2022

First, I don't think what you're doing is intended, exactly.  For a boolean property, why not just use tokens? The activity property binding functionality was intended for complex objects, such as a Laserfiche Entry or collections of things.


But to answer your posted question, if I recall correctly (and it's been a long time so take this with a grain of salt...), using the "reference to another activity" functionality requires that your runtime activity has a DependencyProperty. In this case, a DependencyProperty named UseAnchorStringProperty (the property name + "Property").  Something is assuming that property exists and it's throwing an unhandled exception when it doesn't.

For example, for custom activities that have a connection profile, our CustomProfileActivity has a ProfileId property declared like this:


        /// <summary>The name of the connection profile id property.</summary>
        public const string ProfileIdPropertyName = "ProfileId";

        /// <summary>The connection profile id property.</summary>
        public static DependencyProperty ProfileIdProperty;

        /// <summary>
        /// Initializes the <see cref="CustomProfileActivity"/> class.
        /// </summary>
        static CustomProfileActivity()
        {
            ProfileIdProperty = DependencyProperty.Register(ProfileIdPropertyName, typeof(Guid), typeof(CustomProfileActivity), new PropertyMetadata(DependencyPropertyOptions.Metadata));
        }

0 0
replied on December 8, 2022

Hi, 

I also tried your suggestion to add the dependencyProperty. I was able to publish without any error.

 

However, when I run the workflow the whole activity disappear

In designer I have the activity

But when I review the WF history the custom activity is not there

0 0
replied on December 8, 2022

Thanks Jacob. About your statement:
"For a boolean property, why not just use tokens"

 

How can I pass a boolean token to an activity property that is a checkbox (type of boolean)? 

Unlike Text type property which there is an option to "Support Tokens", there is no option to accept token

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

Sign in to reply to this post.