Note that there are some explanatory texts on larger screens.

plurals
  1. POAssign value to workflow variable
    primarykey
    data
    text
    <p>I have one question about Windows Workflow Foundation 4. I have an activity named PositionArrayActivity. This activity has a Sequence activity inside it. I need that in Execute method (during the workflow execution) oneFund variable mapping his value to PORTFOLIO_NAME that is created in Create method.... What have I to do to mapping oneFund value to PORTFOLIO_NAME at runtime? </p> <p>Thanks</p> <pre><code>public sealed class PositionArrayActivity : NativeActivity, IActivityTemplateFactory { [Browsable(false)] public Dictionary&lt;string, List&lt;Entity&gt;&gt; dictionary = new Dictionary&lt;string, List&lt;Entity&gt;&gt;(); public ActivityAction&lt;Entity[]&gt; Body { get; set; } public Entity[] PositionList { get; set; } public SqlDataReader rdr; public SqlDataReader sdr; public Entity[] positionArray; public List&lt;String&gt; fundList; public String oneFund { get; set; } public String date { get; set; } public List&lt;Entity&gt; listToArrayPositions; protected override void CacheMetadata(NativeActivityMetadata metadata) { metadata.AddDelegate(Body); } protected override void Execute(NativeActivityContext context) { // A lot of code.... } public Activity Create(DependencyObject target) { Variable&lt;string&gt; var = new Variable&lt;string&gt; { Name = "PORTFOLIO_NAME" }; var fef = new PositionArrayActivity(); var aa = new ActivityAction&lt;Entity[]&gt;(); var da = new DelegateInArgument&lt;Entity[]&gt;(); da.Name = "positions"; fef.Body = aa; aa.Argument = da; aa.Handler = new Sequence { Variables = { var } }; return fef; } } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload