3 Replies Latest reply: Jun 8, 2012 9:09 AM by dmccall RSS

    Workflow status not populated

    dmccall
      We want a validator that executes on “Save” that will add a custom section with 100 gram data to the Nutrient Profile. Here’s a brief summary of the steps we do:

      1.     The first thing we do is map your INutrientProfile object to our representation of a nutrient profile. Our nutrient profile object only has properties we are concerned about and want to work with.
      2.     We then go query our nutrient database and get data (100 gram data) and add it to our mapped nutrient profile object from step 1.
      3.     We then take our populated nutrient profile object, with 100 gram data, and map it back to your INutrientProfile object.

      The end result is a Nutrient Profile that has data integrated from our nutrient database. We are having a minor problem that is stopping us. When I click “Create New” for a Nutrient Profile, add a few bits of data to the spec, and click save I noticed the object (see lines 50 and 57) does not have the workflow status yet. I tried two different ways (see line 57 & 58) of getting the nutrient profile. Both times the nutrient profile object workflow status is null or with line 58 I would see the wrong spec in context.

      Email David.mccall@tyson.com for screenshots.


      While in step 3 (see line 61 above or the method below), when we are mapping our object back to the INutrientProfile object, we retrieve the spec in context through the specification service with the Current property. As you can see below it has the workflow status at this moment in time. I have a couple of questions.


      1.     Can you explain why the workflow status is populated in Step 3 using the specification service with the Current property while the nutrient profile (see lines 50 and 57 in the top screen shot) does not have the workflow status yet?
      2.     Can you tell us when the workflow status is populated so we may map the nutrient profile to our object at the right time?

      Thanks.

      Hai Ha
      Programmer/Analyst
      Tyson Foods, Inc.
      phone: 479.290.4652
      email: Hai.Ha@tyson.com