workflow foundation 4 - WF 4.x Receive activity - TrackingParticipant & how to obtain the content parameters -


I am using WF 4.5 with a custom tracking system. Tracking systems will create work records in custom databases. Whenever the activity 'entered' enters the state, the tracking participant will create a task in the database. Tracking perspective, whenever the activity activity attains the 'closed' state, will be completed in the form of a database.

When completing the task, I need to fill the user who completes that task. In the activity received, it will have a custom class with a user property (content parameter), I want to get this user's property from the tracking user.

How do I do this? Public class workflow system tracking partner: Tracking partner (protected override zero track) (Tracking Record Record, TimeSpain Timeout) {ActivityStateRecord aRecord = In the form of an activity Record record; ... // Send the value of the parameters get value}}

just like you Track states and variables, which you also want to track logic.

In your special case you can InArgument & lt; String & gt; , the user you want to {Pre-class = "lang-cs prettyprint-override"> New ActivityStateQuery {variables = {*}, States = {"executed", "closed"}, argument = {"UserArgument"}}

You can now get UserArgument which is available on ActivityStateRecord

  protected override zero track (tracking record record, timespace timeout) {var aRecord = record as activity; Var userName = aRecord.Arguments ["UserArgument"] as string; // which you want to do with 'username'}}    

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -