locked
ActivityBuilder _Property_ Argument usage RRS feed

  • Question

  • Hello

    How can I access ActivityBuilder argument "argument1" defined as Direction Property of type String, for example,in child activity ?

    I'm getting Error :Compiler error(s) encountered processing expression "argument1".

    'argument1' is not declared. It may be inaccessible due to its protection level.

    Thanks

    Wednesday, December 14, 2011 10:10 AM

Answers

  • They're really mainly useless. The only exception I can think of is property reference, which there is no easy way to do.
    Tim
    Thursday, December 22, 2011 6:39 PM

All replies

  • Could you paste your code?
    Friday, December 16, 2011 12:52 AM
  • There is no code.

    I just defined argument as Property in ActivityBuilder. 

    Why arguments are activitybuilder-wide and properties - not ?

     

    Sunday, December 18, 2011 12:54 PM
  • Hi,

    I am sorry I still can't fully understand your scenario, could you please post the steps here, so we can reproduce this issue.

    Note: Properties are set at design time, it is probably the reason you encounter compiler error. Thanks.


    Leo Tang [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Monday, December 19, 2011 2:19 PM
  • 1.In ActivityBuilder define Argument "argument1" with Direction == Property, Type =string, DefaultValue = "test"

    2. Try to use the argument1 in Assign activity :

    a. Drag Sequence into surface

    b. Define  sequence -scope variable var1, type = string

    c. Drag Assing activity into Sequence : To = var1, Value = argument1

    I'm getting compiler error on Assign activity in WF designer.

    Why arguments are activitybuilder-wide and properties - are not ?

    Monday, December 19, 2011 2:41 PM
  • Properties are just not usable from expressions (has to be a Variable or an Argument). This does make them mostly useless within workflow designer.
    Would InArgument or InOutArgument be an acceptable substitute for your scenario?
    Tim


    Monday, December 19, 2011 10:51 PM
  • I thought I can't use expression to assign value to property, didn't know that property can't be used in expression.

    Can you please give the Property usage example ?

    Thanks

    Tuesday, December 20, 2011 8:04 AM
  • They're really mainly useless. The only exception I can think of is property reference, which there is no easy way to do.
    Tim
    Thursday, December 22, 2011 6:39 PM
  •  Thanks Tim

    I saw your blog post  about  InvokeAction designer that uses property reference

    Thursday, December 22, 2011 7:50 PM